#include <KDChartMeasure.h>
Collaboration diagram for KDChart::GlobalMeasureScaling:
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 148 of file KDChartMeasure.h.
Public Member Functions | |
| GlobalMeasureScaling () | |
| virtual | ~GlobalMeasureScaling () |
Static Public Member Functions | |
| const QPair< qreal, qreal > | currentFactors () |
| Returns the currently active factors. | |
| GlobalMeasureScaling * | instance () |
| void | resetFactors () |
| Reset factors to the values active before the previous call of setFactors. | |
| void | setFactors (qreal factorX, qreal factorY) |
| Set new factors to be used by all Measure objects from now on. | |
|
|
Definition at line 187 of file KDChartMeasure.cpp.
00188 {
00189 mFactors.push( qMakePair(1.0, 1.0) );
00190 }
|
|
|
Definition at line 192 of file KDChartMeasure.cpp.
00193 {
00194 // this space left empty intentionally
00195 }
|
|
|
Returns the currently active factors.
Definition at line 215 of file KDChartMeasure.cpp. References instance(), and mFactors.
00216 {
00217 return instance()->mFactors.top();
00218 }
|
|
|
Definition at line 197 of file KDChartMeasure.cpp. References instance(). Referenced by currentFactors(), instance(), resetFactors(), and setFactors().
00198 {
00199 static GlobalMeasureScaling instance;
00200 return &instance;
00201 }
|
|
|
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 208 of file KDChartMeasure.cpp. References instance(), and mFactors.
|
|
||||||||||||
|
Set new factors to be used by all Measure objects from now on. Previous values will be stored. Definition at line 203 of file KDChartMeasure.cpp. References instance(), and mFactors.
00204 {
00205 instance()->mFactors.push( qMakePair(factorX, factorY) );
00206 }
|
1.3.6