.TH "QwtPlotRescaler" 3 "Mon Aug 1 2011" "Version 5.2.2" "Qwt User's Guide" \" -*- nroff -*- .ad l .nh .SH NAME QwtPlotRescaler \- .PP \fBQwtPlotRescaler\fP takes care of fixed aspect ratios for plot scales. .SH SYNOPSIS .br .PP .PP \fC#include \fP .SS "Public Types" .in +1c .ti -1c .RI "enum \fBExpandingDirection\fP { \fBExpandUp\fP, \fBExpandDown\fP, \fBExpandBoth\fP }" .br .ti -1c .RI "enum \fBRescalePolicy\fP { \fBFixed\fP, \fBExpanding\fP, \fBFitting\fP }" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "double \fBaspectRatio\fP (int axis) const " .br .ti -1c .RI "\fBQwtPlotCanvas\fP * \fBcanvas\fP ()" .br .ti -1c .RI "const \fBQwtPlotCanvas\fP * \fBcanvas\fP () const " .br .ti -1c .RI "virtual bool \fBeventFilter\fP (QObject *, QEvent *)" .br .ti -1c .RI "ExpandingDirection \fBexpandingDirection\fP (int axis) const " .br .ti -1c .RI "\fBQwtDoubleInterval\fP \fBintervalHint\fP (int axis) const " .br .ti -1c .RI "bool \fBisEnabled\fP () const " .br .ti -1c .RI "\fBQwtPlot\fP * \fBplot\fP ()" .br .ti -1c .RI "const \fBQwtPlot\fP * \fBplot\fP () const " .br .ti -1c .RI "\fBQwtPlotRescaler\fP (\fBQwtPlotCanvas\fP *, int referenceAxis=QwtPlot::xBottom, \fBRescalePolicy\fP=Expanding)" .br .ti -1c .RI "int \fBreferenceAxis\fP () const " .br .ti -1c .RI "void \fBrescale\fP () const " .br .ti -1c .RI "\fBRescalePolicy\fP \fBrescalePolicy\fP () const " .br .ti -1c .RI "void \fBsetAspectRatio\fP (int axis, double ratio)" .br .ti -1c .RI "void \fBsetAspectRatio\fP (double ratio)" .br .ti -1c .RI "void \fBsetEnabled\fP (bool)" .br .ti -1c .RI "void \fBsetExpandingDirection\fP (int axis, ExpandingDirection)" .br .ti -1c .RI "void \fBsetExpandingDirection\fP (ExpandingDirection)" .br .ti -1c .RI "void \fBsetIntervalHint\fP (int axis, const \fBQwtDoubleInterval\fP &)" .br .ti -1c .RI "void \fBsetReferenceAxis\fP (int axis)" .br .ti -1c .RI "void \fBsetRescalePolicy\fP (\fBRescalePolicy\fP)" .br .ti -1c .RI "virtual \fB~QwtPlotRescaler\fP ()" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "virtual void \fBcanvasResizeEvent\fP (QResizeEvent *)" .br .ti -1c .RI "\fBQwtDoubleInterval\fP \fBexpandInterval\fP (const \fBQwtDoubleInterval\fP &, double width, ExpandingDirection) const " .br .ti -1c .RI "virtual \fBQwtDoubleInterval\fP \fBexpandScale\fP (int axis, const QSize &oldSize, const QSize &newSize) const " .br .ti -1c .RI "\fBQwtDoubleInterval\fP \fBinterval\fP (int axis) const " .br .ti -1c .RI "Qt::Orientation \fBorientation\fP (int axis) const " .br .ti -1c .RI "virtual void \fBrescale\fP (const QSize &oldSize, const QSize &newSize) const " .br .ti -1c .RI "virtual \fBQwtDoubleInterval\fP \fBsyncScale\fP (int axis, const \fBQwtDoubleInterval\fP &reference, const QSize &size) const " .br .ti -1c .RI "virtual void \fBupdateScales\fP (\fBQwtDoubleInterval\fP intervals[QwtPlot::axisCnt]) const " .br .in -1c .SH "Detailed Description" .PP \fBQwtPlotRescaler\fP takes care of fixed aspect ratios for plot scales. \fBQwtPlotRescaler\fP autoadjusts the axes of a \fBQwtPlot\fP according to fixed aspect ratios. .SH "Member Enumeration Documentation" .PP .SS "enum \fBQwtPlotRescaler::RescalePolicy\fP" .PP Rescale Policy. The rescale policy defines how to rescale the reference axis and their depending axes. .PP .IP "\(bu" 2 Fixed .PP .PP The interval of the reference axis remains unchanged, when the geometry of the canvas changes. All other axes will be adjusted according to their aspect ratio. .PP .IP "\(bu" 2 Expanding .PP .PP The interval of the reference axis will be shrinked/expanded, when the geometry of the canvas changes. All other axes will be adjusted according to their aspect ratio. .PP The interval, that is represented by one pixel is fixed. .PP .IP "\(bu" 2 Fitting .PP .PP The intervals of the axes are calculated, so that all axes include their minimal interval. .SH "Constructor & Destructor Documentation" .PP .SS "QwtPlotRescaler::QwtPlotRescaler (\fBQwtPlotCanvas\fP *canvas, intreferenceAxis = \fCQwtPlot::xBottom\fP, \fBRescalePolicy\fPpolicy = \fCExpanding\fP)\fC [explicit]\fP"Constructor .PP \fBParameters:\fP .RS 4 \fIcanvas\fP Canvas .br \fIreferenceAxis\fP Reference axis, see RescalePolicy .br \fIpolicy\fP Rescale policy .RE .PP \fBSee also:\fP .RS 4 \fBsetRescalePolicy()\fP, \fBsetReferenceAxis()\fP .RE .PP .SS "QwtPlotRescaler::~QwtPlotRescaler ()\fC [virtual]\fP" .PP Destructor. .SH "Member Function Documentation" .PP .SS "double QwtPlotRescaler::aspectRatio (intaxis) const"Return aspect ratio between an axis and the reference axis. .PP \fBParameters:\fP .RS 4 \fIaxis\fP Axis index ( see QwtPlot::AxisId ) .RE .PP \fBSee also:\fP .RS 4 \fBsetAspectRatio()\fP .RE .PP .SS "const \fBQwtPlotCanvas\fP * QwtPlotRescaler::canvas () const"\fBReturns:\fP .RS 4 plot canvas .RE .PP .SS "\fBQwtPlotCanvas\fP * QwtPlotRescaler::canvas ()"\fBReturns:\fP .RS 4 plot canvas .RE .PP .SS "bool QwtPlotRescaler::eventFilter (QObject *o, QEvent *e)\fC [virtual]\fP" .PP Event filter for the plot canvas. .SS "QwtPlotRescaler::ExpandingDirection QwtPlotRescaler::expandingDirection (intaxis) const"Return direction in which an axis should be expanded .PP \fBParameters:\fP .RS 4 \fIaxis\fP Axis index ( see QwtPlot::AxisId ) .RE .PP \fBSee also:\fP .RS 4 \fBsetExpandingDirection()\fP .RE .PP .SS "\fBQwtDoubleInterval\fP QwtPlotRescaler::expandInterval (const \fBQwtDoubleInterval\fP &interval, doublewidth, ExpandingDirectiondirection) const\fC [protected]\fP"Expand the interval .PP \fBParameters:\fP .RS 4 \fIinterval\fP Interval to be expanded .br \fIwidth\fP Distance to be added to the interval .br \fIdirection\fP Direction of the expand operation .RE .PP \fBReturns:\fP .RS 4 Expanded interval .RE .PP .SS "\fBQwtDoubleInterval\fP QwtPlotRescaler::expandScale (intaxis, const QSize &oldSize, const QSize &newSize) const\fC [protected, virtual]\fP"Calculate the new scale interval of a plot axis .PP \fBParameters:\fP .RS 4 \fIaxis\fP Axis index ( see QwtPlot::AxisId ) .br \fIoldSize\fP Previous size of the canvas .br \fInewSize\fP New size of the canvas .RE .PP \fBReturns:\fP .RS 4 Calculated new interval for the axis .RE .PP .SS "\fBQwtDoubleInterval\fP QwtPlotRescaler::interval (intaxis) const\fC [protected]\fP"Return interval of an axis .PP \fBParameters:\fP .RS 4 \fIaxis\fP Axis index ( see QwtPlot::AxisId ) .RE .PP .SS "bool QwtPlotRescaler::isEnabled () const"\fBReturns:\fP .RS 4 true when enabled, false otherwise .RE .PP \fBSee also:\fP .RS 4 \fBsetEnabled\fP, \fBeventFilter()\fP .RE .PP .SS "Qt::Orientation QwtPlotRescaler::orientation (intaxis) const\fC [protected]\fP"Return orientation of an axis .PP \fBParameters:\fP .RS 4 \fIaxis\fP Axis index ( see QwtPlot::AxisId ) .RE .PP .SS "\fBQwtPlot\fP * QwtPlotRescaler::plot ()"\fBReturns:\fP .RS 4 plot widget .RE .PP .SS "const \fBQwtPlot\fP * QwtPlotRescaler::plot () const"\fBReturns:\fP .RS 4 plot widget .RE .PP .SS "int QwtPlotRescaler::referenceAxis () const"\fBReturns:\fP .RS 4 Reference axis ( see RescalePolicy ) .RE .PP \fBSee also:\fP .RS 4 \fBsetReferenceAxis()\fP .RE .PP .SS "void QwtPlotRescaler::rescale () const" .PP Adjust the plot axes scales. .SS "void QwtPlotRescaler::rescale (const QSize &oldSize, const QSize &newSize) const\fC [protected, virtual]\fP"Adjust the plot axes scales .PP \fBParameters:\fP .RS 4 \fIoldSize\fP Previous size of the canvas .br \fInewSize\fP New size of the canvas .RE .PP .SS "\fBQwtPlotRescaler::RescalePolicy\fP QwtPlotRescaler::rescalePolicy () const"\fBReturns:\fP .RS 4 Rescale policy .RE .PP \fBSee also:\fP .RS 4 \fBsetRescalePolicy()\fP .RE .PP .SS "void QwtPlotRescaler::setAspectRatio (intaxis, doubleratio)"Set the aspect ratio between the scale of the reference axis and another scale. The default ratio is 1.0 .PP \fBParameters:\fP .RS 4 \fIaxis\fP Axis index ( see QwtPlot::AxisId ) .br \fIratio\fP Aspect ratio .RE .PP \fBSee also:\fP .RS 4 \fBaspectRatio()\fP .RE .PP .SS "void QwtPlotRescaler::setAspectRatio (doubleratio)"Set the aspect ratio between the scale of the reference axis and the other scales. The default ratio is 1.0 .PP \fBParameters:\fP .RS 4 \fIratio\fP Aspect ratio .RE .PP \fBSee also:\fP .RS 4 \fBaspectRatio()\fP .RE .PP .SS "void QwtPlotRescaler::setEnabled (boolon)" .PP En/disable the rescaler. When enabled is true an event filter is installed for the canvas, otherwise the event filter is removed. .PP \fBParameters:\fP .RS 4 \fIon\fP true or false .RE .PP \fBSee also:\fP .RS 4 \fBisEnabled()\fP, \fBeventFilter()\fP .RE .PP .SS "void QwtPlotRescaler::setExpandingDirection (intaxis, ExpandingDirectiondirection)"Set the direction in which an axis should be expanded .PP \fBParameters:\fP .RS 4 \fIaxis\fP Axis index ( see QwtPlot::AxisId ) .br \fIdirection\fP Direction .RE .PP \fBSee also:\fP .RS 4 \fBexpandingDirection()\fP .RE .PP .SS "void QwtPlotRescaler::setExpandingDirection (ExpandingDirectiondirection)"Set the direction in which all axis should be expanded .PP \fBParameters:\fP .RS 4 \fIdirection\fP Direction .RE .PP \fBSee also:\fP .RS 4 \fBexpandingDirection()\fP .RE .PP .SS "void QwtPlotRescaler::setReferenceAxis (intaxis)"Set the reference axis ( see RescalePolicy ) .PP \fBParameters:\fP .RS 4 \fIaxis\fP Axis index ( \fBQwtPlot::Axis\fP ) .RE .PP \fBSee also:\fP .RS 4 \fBreferenceAxis()\fP .RE .PP .SS "void QwtPlotRescaler::setRescalePolicy (\fBRescalePolicy\fPpolicy)"Change the rescale policy .PP \fBParameters:\fP .RS 4 \fIpolicy\fP Rescale policy .RE .PP \fBSee also:\fP .RS 4 \fBrescalePolicy()\fP .RE .PP .SS "\fBQwtDoubleInterval\fP QwtPlotRescaler::syncScale (intaxis, const \fBQwtDoubleInterval\fP &reference, const QSize &size) const\fC [protected, virtual]\fP"Synchronize an axis scale according to the scale of the reference axis .PP \fBParameters:\fP .RS 4 \fIaxis\fP Axis index ( see QwtPlot::AxisId ) .br \fIreference\fP Interval of the reference axis .br \fIsize\fP Size of the canvas .RE .PP .SS "void QwtPlotRescaler::updateScales (\fBQwtDoubleInterval\fPintervals[QwtPlot::axisCnt]) const\fC [protected, virtual]\fP"Update the axes scales .PP \fBParameters:\fP .RS 4 \fIintervals\fP Scale intervals .RE .PP .SH "Author" .PP Generated automatically by Doxygen for Qwt User's Guide from the source code.