ScaleDraw Class Reference

#include <ScaleDraw.h>

Inheritance diagram for ScaleDraw:

DateScaleDraw MonthScaleDraw QwtSupersciptsScaleDraw QwtTextScaleDraw TimeScaleDraw WeekDayScaleDraw

List of all members.


Detailed Description

Extension to QwtScaleDraw.

Public Types

enum  TicksStyle { None = 0, Out = 1, Both = 2, In = 3 }

Public Member Functions

QString formulaString ()
virtual QwtText label (double value) const
void labelFormat (char &f, int &prec) const
 Return the number format for the major scale labels.
int labelNumericPrecision ()
int majorTicksStyle ()
int minorTicksStyle ()
 ScaleDraw (const QString &s=QString::null)
void setFormulaString (const QString &formula)
void setLabelFormat (char f, int prec)
 Set the number format for the major scale labels.
void setMajorTicksStyle (TicksStyle type)
void setMinorTicksStyle (TicksStyle type)
double transformValue (double value) const
virtual ~ScaleDraw ()

Protected Member Functions

void drawTick (QPainter *p, double value, int len) const

Private Attributes

char d_fmt
int d_majTicks
int d_minTicks
int d_prec
QString formula_string

Member Enumeration Documentation

enum ScaleDraw::TicksStyle

Enumerator:
None 
Out 
Both 
In 


Constructor & Destructor Documentation

ScaleDraw::ScaleDraw ( const QString &  s = QString::null  ) 

virtual ScaleDraw::~ScaleDraw (  )  [inline, virtual]


Member Function Documentation

void ScaleDraw::drawTick ( QPainter *  p,
double  value,
int  len 
) const [protected]

QString ScaleDraw::formulaString (  )  [inline]

virtual QwtText ScaleDraw::label ( double  value  )  const [inline, virtual]

Reimplemented in QwtTextScaleDraw, TimeScaleDraw, DateScaleDraw, WeekDayScaleDraw, MonthScaleDraw, and QwtSupersciptsScaleDraw.

void ScaleDraw::labelFormat ( char &  f,
int &  prec 
) const

Return the number format for the major scale labels.

Format character and precision have the same meaning as for sprintf().

Parameters:
f format character 'e', 'f' or 'g'
prec 
  • for 'e', 'f': the number of digits after the radix character (point)
  • for 'g': the maximum number of significant digits
See also:
setLabelFormat()

int ScaleDraw::labelNumericPrecision (  )  [inline]

int ScaleDraw::majorTicksStyle (  )  [inline]

int ScaleDraw::minorTicksStyle (  )  [inline]

void ScaleDraw::setFormulaString ( const QString &  formula  )  [inline]

void ScaleDraw::setLabelFormat ( char  f,
int  prec 
)

Set the number format for the major scale labels.

Format character and precision have the same meaning as for sprintf().

Parameters:
f format character 'e', 'f', 'g'
prec 
  • for 'e', 'f': the number of digits after the radix character (point)
  • for 'g': the maximum number of significant digits
See also:
labelFormat()

void ScaleDraw::setMajorTicksStyle ( TicksStyle  type  )  [inline]

void ScaleDraw::setMinorTicksStyle ( TicksStyle  type  )  [inline]

double ScaleDraw::transformValue ( double  value  )  const


Member Data Documentation

char ScaleDraw::d_fmt [private]

int ScaleDraw::d_majTicks [private]

int ScaleDraw::d_minTicks [private]

int ScaleDraw::d_prec [private]

QString ScaleDraw::formula_string [private]


The documentation for this class was generated from the following files:
Generated on Mon Oct 15 06:11:43 2007 for QtiPlot by  doxygen 1.5.3