Public Member Functions | Static Public Member Functions

KDChart::GlobalMeasureScaling Class Reference

Auxiliary class used by the KDChart::Measure and KDChart::Chart class. More...

#include <KDChartMeasure.h>

Collaboration diagram for KDChart::GlobalMeasureScaling:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 GlobalMeasureScaling ()
virtual ~GlobalMeasureScaling ()

Static Public Member Functions

static const QPair< qreal, qreal > currentFactors ()
 Returns the currently active factors.
static GlobalMeasureScalinginstance ()
static QPaintDevicepaintDevice ()
 Returns the paint device usable for calculating fort metrics.
static void resetFactors ()
 Reset factors to the values active before the previous call of setFactors.
static void setFactors (qreal factorX, qreal factorY)
 Set new factors to be used by all Measure objects from now on.
static void setPaintDevice (QPaintDevice *paintDevice)
 Sets the paint device usable for calculating fort metrics.

Detailed Description

Auxiliary class used by the KDChart::Measure and KDChart::Chart class.

Normally there should be no need to call any of these methods yourself.

They are used by KDChart::Chart::paint( QPainter*, const QRect& ) to adjust all of the relative Measures according to the target rectangle's size.

Default factors are (1.0, 1.0)

Definition at line 142 of file KDChartMeasure.h.


Constructor & Destructor Documentation

KDChart::GlobalMeasureScaling::GlobalMeasureScaling (  ) 

Definition at line 191 of file KDChartMeasure.cpp.

KDChart::GlobalMeasureScaling::~GlobalMeasureScaling (  )  [virtual]

Definition at line 196 of file KDChartMeasure.cpp.


Member Function Documentation

const QPair< qreal, qreal > KDChart::GlobalMeasureScaling::currentFactors (  )  [static]

Returns the currently active factors.

Definition at line 219 of file KDChartMeasure.cpp.

References instance().

Referenced by KDChart::Measure::sizeOfArea().

GlobalMeasureScaling * KDChart::GlobalMeasureScaling::instance (  )  [static]
QPaintDevice * KDChart::GlobalMeasureScaling::paintDevice (  )  [static]

Returns the paint device usable for calculating fort metrics.

Definition at line 229 of file KDChartMeasure.cpp.

References instance().

Referenced by KDChart::Chart::paint(), and KDChart::CartesianAxis::paintCtx().

void KDChart::GlobalMeasureScaling::resetFactors (  )  [static]

Reset factors to the values active before the previous call of setFactors.

This works on a stack, so recursive calls works fine, like: setFactors, setFactors, unserFactors, unsetFactors

Definition at line 212 of file KDChartMeasure.cpp.

References instance().

Referenced by KDChart::Chart::paint().

void KDChart::GlobalMeasureScaling::setFactors ( qreal  factorX,
qreal  factorY 
) [static]

Set new factors to be used by all Measure objects from now on.

Previous values will be stored.

Definition at line 207 of file KDChartMeasure.cpp.

References instance().

Referenced by KDChart::Chart::paint().

void KDChart::GlobalMeasureScaling::setPaintDevice ( QPaintDevice paintDevice  )  [static]

Sets the paint device usable for calculating fort metrics.

Definition at line 224 of file KDChartMeasure.cpp.

References instance().

Referenced by KDChart::Chart::paint().


The documentation for this class was generated from the following files: