KD Chart API Documentation 3.1
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
KDChart::GlobalMeasureScaling Class Reference

#include <KDChartMeasure.h>

Public Member Functions

 GlobalMeasureScaling ()
 
virtual ~GlobalMeasureScaling ()
 

Static Public Member Functions

static const QPair< qreal, qreal > currentFactors ()
 
static GlobalMeasureScalinginstance ()
 
static QPaintDevicepaintDevice ()
 
static void resetFactors ()
 
static void setFactors (qreal factorX, qreal factorY)
 
static void setPaintDevice (QPaintDevice *paintDevice)
 

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 153 of file KDChartMeasure.h.

Constructor & Destructor Documentation

◆ GlobalMeasureScaling()

KDChart::GlobalMeasureScaling::GlobalMeasureScaling ( )

Definition at line 162 of file KDChartMeasure.cpp.

References QStack::push().

◆ ~GlobalMeasureScaling()

KDChart::GlobalMeasureScaling::~GlobalMeasureScaling ( )
virtual

Definition at line 167 of file KDChartMeasure.cpp.

Member Function Documentation

◆ currentFactors()

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

Return the currently active factors.

Definition at line 190 of file KDChartMeasure.cpp.

References instance(), and QStack::top().

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

◆ instance()

GlobalMeasureScaling * KDChart::GlobalMeasureScaling::instance ( )
static

◆ paintDevice()

QPaintDevice * KDChart::GlobalMeasureScaling::paintDevice ( )
static

Return the paint device to use for calculating font metrics.

Definition at line 200 of file KDChartMeasure.cpp.

References instance().

Referenced by KDChart::Chart::paint(), and setPaintDevice().

◆ resetFactors()

void KDChart::GlobalMeasureScaling::resetFactors ( )
static

Restore factors to the values before the previous call to setFactors. The current values are popped off a stack internally.

Definition at line 183 of file KDChartMeasure.cpp.

References instance(), and QStack::pop().

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

◆ setFactors()

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 saved on a stack internally.

Definition at line 178 of file KDChartMeasure.cpp.

References instance(), and QStack::push().

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

◆ setPaintDevice()

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

Set the paint device to use for calculating font metrics.

Definition at line 195 of file KDChartMeasure.cpp.

References instance(), and paintDevice().

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


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

© 2001 Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
https://www.kdab.com/development-resources/qt-tools/kd-chart/
Generated on Fri Apr 26 2024 00:04:57 for KD Chart API Documentation by doxygen 1.9.8