123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568 |
- .TH "QwtPlotRescaler" 3 "Mon Dec 28 2020" "Version 6.1.6" "Qwt User's Guide" \" -*- nroff -*-
- .ad l
- .nh
- .SH NAME
- QwtPlotRescaler \- \fBQwtPlotRescaler\fP takes care of fixed aspect ratios for plot scales\&.
- .SH SYNOPSIS
- .br
- .PP
- .PP
- \fC#include <qwt_plot_rescaler\&.h>\fP
- .PP
- Inherits QObject\&.
- .SS "Public Types"
- .in +1c
- .ti -1c
- .RI "enum \fBRescalePolicy\fP { \fBFixed\fP, \fBExpanding\fP, \fBFitting\fP }"
- .br
- .ti -1c
- .RI "enum \fBExpandingDirection\fP { \fBExpandUp\fP, \fBExpandDown\fP, \fBExpandBoth\fP }"
- .br
- .in -1c
- .SS "Public Member Functions"
- .in +1c
- .ti -1c
- .RI "\fBQwtPlotRescaler\fP (QWidget *\fBcanvas\fP, int \fBreferenceAxis\fP=\fBQwtPlot::xBottom\fP, \fBRescalePolicy\fP=\fBExpanding\fP)"
- .br
- .ti -1c
- .RI "virtual \fB~QwtPlotRescaler\fP ()"
- .br
- .RI "Destructor\&. "
- .ti -1c
- .RI "void \fBsetEnabled\fP (bool)"
- .br
- .RI "En/disable the rescaler\&. "
- .ti -1c
- .RI "bool \fBisEnabled\fP () const"
- .br
- .ti -1c
- .RI "void \fBsetRescalePolicy\fP (\fBRescalePolicy\fP)"
- .br
- .ti -1c
- .RI "\fBRescalePolicy\fP \fBrescalePolicy\fP () const"
- .br
- .ti -1c
- .RI "void \fBsetExpandingDirection\fP (\fBExpandingDirection\fP)"
- .br
- .ti -1c
- .RI "void \fBsetExpandingDirection\fP (int axis, \fBExpandingDirection\fP)"
- .br
- .ti -1c
- .RI "\fBExpandingDirection\fP \fBexpandingDirection\fP (int axis) const"
- .br
- .ti -1c
- .RI "void \fBsetReferenceAxis\fP (int axis)"
- .br
- .ti -1c
- .RI "int \fBreferenceAxis\fP () const"
- .br
- .ti -1c
- .RI "void \fBsetAspectRatio\fP (double ratio)"
- .br
- .ti -1c
- .RI "void \fBsetAspectRatio\fP (int axis, double ratio)"
- .br
- .ti -1c
- .RI "double \fBaspectRatio\fP (int axis) const"
- .br
- .ti -1c
- .RI "void \fBsetIntervalHint\fP (int axis, const \fBQwtInterval\fP &)"
- .br
- .ti -1c
- .RI "\fBQwtInterval\fP \fBintervalHint\fP (int axis) const"
- .br
- .ti -1c
- .RI "QWidget * \fBcanvas\fP ()"
- .br
- .ti -1c
- .RI "const QWidget * \fBcanvas\fP () const"
- .br
- .ti -1c
- .RI "\fBQwtPlot\fP * \fBplot\fP ()"
- .br
- .ti -1c
- .RI "const \fBQwtPlot\fP * \fBplot\fP () const"
- .br
- .ti -1c
- .RI "virtual bool \fBeventFilter\fP (QObject *, QEvent *)"
- .br
- .RI "Event filter for the plot canvas\&. "
- .ti -1c
- .RI "void \fBrescale\fP () const"
- .br
- .RI "Adjust the plot axes scales\&. "
- .in -1c
- .SS "Protected Member Functions"
- .in +1c
- .ti -1c
- .RI "virtual void \fBcanvasResizeEvent\fP (QResizeEvent *)"
- .br
- .ti -1c
- .RI "virtual void \fBrescale\fP (const QSize &oldSize, const QSize &newSize) const"
- .br
- .ti -1c
- .RI "virtual \fBQwtInterval\fP \fBexpandScale\fP (int axis, const QSize &oldSize, const QSize &newSize) const"
- .br
- .ti -1c
- .RI "virtual \fBQwtInterval\fP \fBsyncScale\fP (int axis, const \fBQwtInterval\fP &reference, const QSize &size) const"
- .br
- .ti -1c
- .RI "virtual void \fBupdateScales\fP (\fBQwtInterval\fP intervals[\fBQwtPlot::axisCnt\fP]) const"
- .br
- .ti -1c
- .RI "Qt::Orientation \fBorientation\fP (int axis) const"
- .br
- .ti -1c
- .RI "\fBQwtInterval\fP \fBinterval\fP (int axis) const"
- .br
- .ti -1c
- .RI "\fBQwtInterval\fP \fBexpandInterval\fP (const \fBQwtInterval\fP &, double width, \fBExpandingDirection\fP) const"
- .br
- .in -1c
- .SH "Detailed Description"
- .PP
- \fBQwtPlotRescaler\fP takes care of fixed aspect ratios for plot scales\&.
- \fBQwtPlotRescaler\fP auto adjusts the axes of a \fBQwtPlot\fP according to fixed aspect ratios\&.
- .SH "Member Enumeration Documentation"
- .PP
- .SS "enum \fBQwtPlotRescaler::ExpandingDirection\fP"
- When \fBrescalePolicy()\fP is set to Expanding its direction depends on ExpandingDirection
- .PP
- \fBEnumerator\fP
- .in +1c
- .TP
- \fB\fIExpandUp \fP\fP
- The upper limit of the scale is adjusted\&.
- .TP
- \fB\fIExpandDown \fP\fP
- The lower limit of the scale is adjusted\&.
- .TP
- \fB\fIExpandBoth \fP\fP
- Both limits of the scale are adjusted\&.
- .SS "enum \fBQwtPlotRescaler::RescalePolicy\fP"
- The rescale policy defines how to rescale the reference axis and their depending axes\&.
- .PP
- \fBSee also\fP
- .RS 4
- \fBExpandingDirection\fP, \fBsetIntervalHint()\fP
- .RE
- .PP
- .PP
- \fBEnumerator\fP
- .in +1c
- .TP
- \fB\fIFixed \fP\fP
- 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\&.
- .TP
- \fB\fIExpanding \fP\fP
- The interval of the reference axis will be shrunk/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\&.
- .TP
- \fB\fIFitting \fP\fP
- The intervals of the axes are calculated, so that all axes include their interval hint\&.
- .SH "Constructor & Destructor Documentation"
- .PP
- .SS "QwtPlotRescaler::QwtPlotRescaler (QWidget * canvas, int referenceAxis = \fC\fBQwtPlot::xBottom\fP\fP, \fBRescalePolicy\fP policy = \fC\fBExpanding\fP\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
- .SH "Member Function Documentation"
- .PP
- .SS "double QwtPlotRescaler::aspectRatio (int axis) const"
- .PP
- \fBReturns\fP
- .RS 4
- Aspect ratio between an axis and the reference axis\&.
- .RE
- .PP
- \fBParameters\fP
- .RS 4
- \fIaxis\fP Axis index ( see QwtPlot::AxisId )
- .RE
- .PP
- \fBSee also\fP
- .RS 4
- \fBsetAspectRatio()\fP
- .RE
- .PP
- .SS "QWidget * QwtPlotRescaler::canvas ()"
- .PP
- \fBReturns\fP
- .RS 4
- plot canvas
- .RE
- .PP
- .SS "const QWidget * QwtPlotRescaler::canvas () const"
- .PP
- \fBReturns\fP
- .RS 4
- plot canvas
- .RE
- .PP
- .SS "void QwtPlotRescaler::canvasResizeEvent (QResizeEvent * event)\fC [protected]\fP, \fC [virtual]\fP"
- Event handler for resize events of the plot canvas
- .PP
- \fBParameters\fP
- .RS 4
- \fIevent\fP Resize event
- .RE
- .PP
- \fBSee also\fP
- .RS 4
- \fBrescale()\fP
- .RE
- .PP
- .SS "\fBQwtPlotRescaler::ExpandingDirection\fP QwtPlotRescaler::expandingDirection (int axis) const"
- .PP
- \fBReturns\fP
- .RS 4
- Direction in which an axis should be expanded
- .RE
- .PP
- \fBParameters\fP
- .RS 4
- \fIaxis\fP Axis index ( see QwtPlot::AxisId )
- .RE
- .PP
- \fBSee also\fP
- .RS 4
- \fBsetExpandingDirection()\fP
- .RE
- .PP
- .SS "\fBQwtInterval\fP QwtPlotRescaler::expandInterval (const \fBQwtInterval\fP & interval, double width, \fBExpandingDirection\fP direction) 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 "\fBQwtInterval\fP QwtPlotRescaler::expandScale (int axis, const QSize & oldSize, const QSize & newSize) const\fC [protected]\fP, \fC [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 "\fBQwtInterval\fP QwtPlotRescaler::interval (int axis) const\fC [protected]\fP"
- .PP
- \fBParameters\fP
- .RS 4
- \fIaxis\fP Axis index ( see QwtPlot::AxisId )
- .RE
- .PP
- \fBReturns\fP
- .RS 4
- Normalized interval of an axis
- .RE
- .PP
- .SS "\fBQwtInterval\fP QwtPlotRescaler::intervalHint (int axis) const"
- .PP
- \fBParameters\fP
- .RS 4
- \fIaxis\fP Axis, see \fBQwtPlot::Axis\fP
- .RE
- .PP
- \fBReturns\fP
- .RS 4
- Interval hint
- .RE
- .PP
- \fBSee also\fP
- .RS 4
- \fBsetIntervalHint()\fP, \fBRescalePolicy\fP
- .RE
- .PP
- .SS "bool QwtPlotRescaler::isEnabled () const"
- .PP
- \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 (int axis) const\fC [protected]\fP"
- .PP
- \fBReturns\fP
- .RS 4
- Orientation of an axis
- .RE
- .PP
- \fBParameters\fP
- .RS 4
- \fIaxis\fP Axis index ( see QwtPlot::AxisId )
- .RE
- .PP
- .SS "\fBQwtPlot\fP * QwtPlotRescaler::plot ()"
- .PP
- \fBReturns\fP
- .RS 4
- plot widget
- .RE
- .PP
- .SS "const \fBQwtPlot\fP * QwtPlotRescaler::plot () const"
- .PP
- \fBReturns\fP
- .RS 4
- plot widget
- .RE
- .PP
- .SS "int QwtPlotRescaler::referenceAxis () const"
- .PP
- \fBReturns\fP
- .RS 4
- Reference axis ( see RescalePolicy )
- .RE
- .PP
- \fBSee also\fP
- .RS 4
- \fBsetReferenceAxis()\fP
- .RE
- .PP
- .SS "void QwtPlotRescaler::rescale (const QSize & oldSize, const QSize & newSize) const\fC [protected]\fP, \fC [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"
- .PP
- \fBReturns\fP
- .RS 4
- Rescale policy
- .RE
- .PP
- \fBSee also\fP
- .RS 4
- \fBsetRescalePolicy()\fP
- .RE
- .PP
- .SS "void QwtPlotRescaler::setAspectRatio (double ratio)"
- 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::setAspectRatio (int axis, double ratio)"
- 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::setEnabled (bool on)"
- .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 (\fBExpandingDirection\fP direction)"
- 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::setExpandingDirection (int axis, \fBExpandingDirection\fP direction)"
- 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::setIntervalHint (int axis, const \fBQwtInterval\fP & interval)"
- Set an interval hint for an axis
- .PP
- In Fitting mode, the hint is used as minimal interval that always needs to be displayed\&.
- .PP
- \fBParameters\fP
- .RS 4
- \fIaxis\fP Axis, see \fBQwtPlot::Axis\fP
- .br
- \fIinterval\fP Axis
- .RE
- .PP
- \fBSee also\fP
- .RS 4
- \fBintervalHint()\fP, \fBRescalePolicy\fP
- .RE
- .PP
- .SS "void QwtPlotRescaler::setReferenceAxis (int axis)"
- 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\fP policy)"
- 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 "\fBQwtInterval\fP QwtPlotRescaler::syncScale (int axis, const \fBQwtInterval\fP & reference, const QSize & size) const\fC [protected]\fP, \fC [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
- \fBReturns\fP
- .RS 4
- New interval for axis
- .RE
- .PP
- .SS "void QwtPlotRescaler::updateScales (\fBQwtInterval\fP intervals[QwtPlot::axisCnt]) const\fC [protected]\fP, \fC [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\&.
|