33 #include <KDABLibFakes> 54 mOrientation( orientation )
60 : mValue( r.
value() ),
89 const QObject* autoArea = &theAutoArea;
90 const QObject* area = mArea ? mArea : autoArea;
95 orientation = autoOrientation;
101 orientation = autoOrientation;
109 if ( area == autoArea )
114 qreal referenceValue = 0;
115 switch ( orientation ) {
118 referenceValue = qMin( size.width(), size.height() );
121 referenceValue = qMax( size.width(), size.height() );
124 referenceValue = size.width();
127 referenceValue = size.height();
130 value = mValue / 1000.0 * referenceValue;
153 size = kdcArea->geometry().size();
165 size = widget->geometry().size();
169 size = QSizeF(1.0, 1.0);
176 return QSizeF(size.width() * factors.first, size.height() * factors.second);
182 return( mValue == r.
value() &&
191 mFactors.push( qMakePair(qreal(1.0), qreal(1.0)) );
207 instance()->mFactors.push( qMakePair(factorX, factorY) );
213 if (
instance()->mFactors.count() > 1 )
234 #if !defined(QT_NO_DEBUG_STREAM) 237 dbg <<
"KDChart::Measure(" 238 <<
"value="<<m.
value()
MeasureOrientation
Measure orientation mode: the way how the absolute value of a KDChart::Measure is determined during K...
Project global class providing some enums needed both by KDChartParams and by KDChartCustomBox.
An area in the chart with a background, a frame, etc.
static const QPair< qreal, qreal > currentFactors()
Return the currently active factors.
Auxiliary class used by the KDChart::Measure and KDChart::Chart class.
qreal calculatedValue(const QObject *autoArea, KDChartEnums::MeasureOrientation autoOrientation) const
The reference area must either be derived from AbstractArea or from QWidget, so it can also be derive...
Measure & operator=(const Measure &)
static void setPaintDevice(QPaintDevice *paintDevice)
Set the paint device to use for calculating font metrics.
KDChartEnums::MeasureOrientation referenceOrientation() const
virtual ~GlobalMeasureScaling()
bool operator==(const Measure &) const
const QObject * referenceArea() const
The returned reference area will be derived from AbstractArea or QWidget or both. ...
static QPaintDevice * paintDevice()
Return the paint device to use for calculating font metrics.
QRectF visibleDiagramArea() const
Returns the visible part of the diagram area, i.e.
static GlobalMeasureScaling * instance()
Declaring the class KDChart::Measure.
static void resetFactors()
Restore factors to the values before the previous call to setFactors.
MeasureCalculationMode
Measure calculation mode: the way how the absolute value of a KDChart::Measure is determined during K...
const QSizeF sizeOfArea(const QObject *area) const
KDChartEnums::MeasureCalculationMode calculationMode() const
Measure is used to specify relative and absolute sizes in KDChart, e.g.
Class only listed here to document inheritance of some KDChart classes.
Cartesian coordinate plane.
QDebug operator<<(QDebug stream, const DataDimension &r)
static void setFactors(qreal factorX, qreal factorY)
Set new factors to be used by all Measure objects from now on.