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

double axisBreakHighLimit ()
double axisBreakLowLimit ()
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 (Plot *plot=0, const QString &s=QString::null)
void setAxisBreak (double from, double to)
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)
void setSelected (bool select=true)
double transformValue (double value) const
virtual ~ScaleDraw ()

Protected Member Functions

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

Protected Attributes

Plotd_plot

Private Attributes

double d_break_end
double d_break_start
char d_fmt
int d_majTicks
int d_minTicks
int d_prec
bool d_selected
QString formula_string

Member Enumeration Documentation

enum ScaleDraw::TicksStyle

Enumerator:
None 
Out 
Both 
In 


Constructor & Destructor Documentation

ScaleDraw::ScaleDraw ( Plot plot = 0,
const QString &  s = QString::null 
)

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


Member Function Documentation

double ScaleDraw::axisBreakHighLimit (  )  [inline]

double ScaleDraw::axisBreakLowLimit (  )  [inline]

void ScaleDraw::drawLabel ( QPainter *  painter,
double  value 
) const [protected, virtual]

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

QString ScaleDraw::formulaString (  )  [inline]

QwtText ScaleDraw::label ( double  value  )  const [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::setAxisBreak ( double  from,
double  to 
) [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]

void ScaleDraw::setSelected ( bool  select = true  )  [inline]

double ScaleDraw::transformValue ( double  value  )  const


Member Data Documentation

double ScaleDraw::d_break_end [private]

double ScaleDraw::d_break_start [private]

char ScaleDraw::d_fmt [private]

int ScaleDraw::d_majTicks [private]

int ScaleDraw::d_minTicks [private]

Plot* ScaleDraw::d_plot [protected]

int ScaleDraw::d_prec [private]

bool ScaleDraw::d_selected [private]

QString ScaleDraw::formula_string [private]


The documentation for this class was generated from the following files:
Generated on Thu Feb 7 13:59:29 2008 for QtiPlot by  doxygen 1.5.4