QwtPlotRescaler(3)
๐ธ QwtPlotRescaler(3) โ Library Functions Manual ๐ธ
okay bestie, sit down, grab a strawberry drink ๐, because we're diving into QwtPlotRescaler โ and no, it's not a plugin for making your plots look thinner. it's the icon that handles fixed aspect ratios for plot scales. periodt. ๐
โจ NAME โจ
QwtPlotRescaler โ literally takes care of fixed aspect ratios for plot scales. that's the whole job. that's the gig. she's focused. ๐
โจ SYNOPSIS โจ
#include <qwt_plot_rescaler.h>
Inherits QObject. yes, she's a proper Qt citizen, she's got signals-and-slots energy, she belongs. ๐ซถ
๐ Public Types ๐
enum RescalePolicy { Fixed, Expanding, Fitting }โ the three vibes of how she rescales stuff.enum ExpandingDirection { ExpandUp, ExpandDown, ExpandBoth }โ which end of the scale gets to grow when she's in her Expanding era.
๐ฆ Public Member Functions ๐ฆ
QwtPlotRescaler (QWidget *canvas, QwtAxisId referenceAxis=QwtAxis::XBottom, RescalePolicy=Expanding)โ the constructor, aka her grand entrance โจvirtual ~QwtPlotRescaler ()โ Destructor. she's leaving, say bye ๐void setEnabled (bool)โ En/disable the rescaler. she can be turned on and off, like your read receipts.bool isEnabled () constโ is she enabled tho? ๐คvoid setRescalePolicy (RescalePolicy)โ pick her rescale strategy.RescalePolicy rescalePolicy () constโ tells you which strategy she's currently serving.void setExpandingDirection (ExpandingDirection)โ set the direction for the default/every-axis case.void setExpandingDirection (QwtAxisId, ExpandingDirection)โ same but for one specific axis, iykyk.ExpandingDirection expandingDirection (QwtAxisId) constโ ask about one axis's expanding direction.void setReferenceAxis (QwtAxisId)โ crowns a new reference axis ๐QwtAxisId referenceAxis () constโ who's the reference axis rn?void setAspectRatio (double ratio)โ set the ratio for the whole plot.void setAspectRatio (QwtAxisId, double ratio)โ set the ratio for one axis specifically.double aspectRatio (QwtAxisId) constโ get the ratio for an axis.void setIntervalHint (QwtAxisId, const QwtInterval &)โ drop an interval hint for an axis.QwtInterval intervalHint (QwtAxisId) constโ read back the interval hint.QWidget * canvas ()โ the canvas pointer, non-const edition.const QWidget * canvas () constโ the canvas pointer, const edition, no touchy.QwtPlot * plot ()โ the plot pointer.const QwtPlot * plot () constโ const plot pointer, look don't touch.virtual bool eventFilter (QObject *, QEvent *) overrideโ Event filter for the plot canvas. she's watching. ๐void rescale () constโ Adjust the plot axes scales. the main character moment.
๐ Protected Member Functions ๐
virtual void canvasResizeEvent (QResizeEvent *)โ handles the canvas resize.virtual void rescale (const QSize &oldSize, const QSize &newSize) constโ the internal rescale doing the math between two sizes.virtual QwtInterval expandScale (QwtAxisId, const QSize &oldSize, const QSize &newSize) constโ works out the expanded scale for an axis.virtual QwtInterval syncScale (QwtAxisId, const QwtInterval &reference, const QSize &size) constโ syncs a scale to a reference interval at a given size.virtual void updateScales (QwtInterval intervals[QwtAxis::AxisPositions]) constโ pushes the new intervals into all the axes.Qt::Orientation orientation (QwtAxisId) constโ horizontal or vertical? the axis decides.QwtInterval interval (QwtAxisId) constโ grab the current interval for an axis.QwtInterval expandInterval (const QwtInterval &, double width, ExpandingDirection) constโ expand a given interval by a width, in a chosen direction.
โจ Detailed Description โจ
QwtPlotRescaler takes care of fixed aspect ratios for plot scales. fr fr, that's her whole personality and she's thriving. ๐
QwtPlotRescaler auto adjusts the axes of a QwtPlot according to fixed aspect ratios. so you don't have to sit there manually nudging axis limits every time the window resizes โ she handles it, you vibe. ๐
Definition at line 29 of file qwt_plot_rescaler.h. (yes she has receipts. ๐)
๐ง Member Enumeration Documentation ๐ง
๐ซ enum QwtPlotRescaler::ExpandingDirection ๐ซ
when rescalePolicy() is set to Expanding, its direction depends on ExpandingDirection. so this enum is literally the steering wheel for her expanding era. ๐ฅ
Enumerators
ExpandUpโ The upper limit of the scale is adjusted. she grows upward, ambitious queen. โญExpandDownโ The lower limit of the scale is adjusted. going down, but make it deliberate. ๐ฆExpandBothโ Both limits of the scale are adjusted. why choose, bestie. ๐
Definition at line 70 of file qwt_plot_rescaler.h.
๐ซ enum QwtPlotRescaler::RescalePolicy ๐ซ
The rescale policy defines how to rescale the reference axis and their depending axes. this is the big-picture strategy, the blueprint, the vision board. โจ
See also: ExpandingDirection, setIntervalHint()
Enumerators
Fixedโ 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. so the reference axis stays exactly as she is, no cap, and everyone else adapts to her. main character reference axis energy honestly. ๐Expandingโ 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. and โ important detail, don't skip it โ the interval, that is represented by one pixel is fixed. ๐Fittingโ The intervals of the axes are calculated, so that all axes include their interval hint. this is where those interval hints fromsetIntervalHint()finally get their moment. ๐ธ
Definition at line 40 of file qwt_plot_rescaler.h.
๐ Constructor & Destructor Documentation ๐
๐ QwtPlotRescaler::QwtPlotRescaler (QWidget * canvas, QwtAxisId referenceAxis = QwtAxis::XBottom, RescalePolicy policy = Expanding) [explicit] ๐
Constructor. her debut. the origin story. ๐
- Parameters:
canvasโ CanvasreferenceAxisโ Reference axis, seeRescalePolicypolicyโ Rescale policy
See also: setRescalePolicy(), setReferenceAxis()
Definition at line 71 of file qwt_plot_rescaler.cpp.
๐ QwtPlotRescaler::~QwtPlotRescaler () [virtual] ๐
Destructor. she's logging off, closing her tabs, turning off her phone. goodbye icon. ๐ญ๐
Definition at line 83 of file qwt_plot_rescaler.cpp.
to be continued, bestie โ there's more where this came from ๐ฆ
๐ MEMBER FUNCTION DOCUMENTATION ๐
okay bestie, buckle up โ this is the full member-function lineup, and every single one is getting its moment. no skipping, no โweโll come back to it,โ periodt. ๐โจ
double QwtPlotRescaler::aspectRatio (QwtAxisId axisId) const
Returns: the aspect ratio between an axis and the reference axis. cute, concise, iconic. ๐ธ
axisIdโ Axis
See also: setAspectRatio()
Definition: at line 243 of file qwt_plot_rescaler.cpp.
QWidget * QwtPlotRescaler::canvas ()
Returns: plot canvas ๐จ
Definition: at line 282 of file qwt_plot_rescaler.cpp.
const QWidget * QwtPlotRescaler::canvas () const
Returns: plot canvas ๐จ
Definition: at line 288 of file qwt_plot_rescaler.cpp.
void QwtPlotRescaler::canvasResizeEvent (QResizeEvent * event) โ [protected], [virtual]
Event handler for resize events of the plot canvas. very โnotify me when the canvas changesโ energy. ๐ฆ
eventโ Resize event
See also: rescale()
Definition: at line 343 of file qwt_plot_rescaler.cpp.
bool QwtPlotRescaler::eventFilter (QObject * object, QEvent * event) โ [override], [virtual]
Event filter for the plot canvas. thatโs it, thatโs the whole mood. ๐
Definition: at line 314 of file qwt_plot_rescaler.cpp.
QwtPlotRescaler::ExpandingDirection QwtPlotRescaler::expandingDirection (QwtAxisId axisId) const
Returns: the direction in which an axis should be expanded. directional queen ๐
axisIdโ Axis
See also: setExpandingDirection()
Definition: at line 197 of file qwt_plot_rescaler.cpp.
QwtInterval QwtPlotRescaler::expandInterval (const QwtInterval & interval, double width, ExpandingDirection direction) const โ [protected]
Expand the interval. literally stretching the vibe. ๐
intervalโ Interval to be expandedwidthโ Distance to be added to the intervaldirectionโ Direction of the expand operation
Returns: expanded interval
Definition: at line 526 of file qwt_plot_rescaler.cpp.
QwtInterval QwtPlotRescaler::expandScale (QwtAxisId axisId, const QSize & oldSize, const QSize & newSize) const โ [protected], [virtual]
Calculate the new scale interval of a plot axis. math but make it fashion. ๐งฎโจ
axisIdโ AxisoldSizeโ Previous size of the canvasnewSizeโ New size of the canvas
Returns: calculated new interval for the axis
Definition: at line 405 of file qwt_plot_rescaler.cpp.
QwtInterval QwtPlotRescaler::interval (QwtAxisId axisId) const โ [protected]
axisIdโ Axis
Returns: normalized interval of an axis
Definition: at line 509 of file qwt_plot_rescaler.cpp.
QwtInterval QwtPlotRescaler::intervalHint (QwtAxisId axisId) const
axisIdโ Axis
Returns: interval hint
See also: setIntervalHint(), RescalePolicy
Definition: at line 273 of file qwt_plot_rescaler.cpp.
bool QwtPlotRescaler::isEnabled () const
Returns: true when enabled, false otherwise. binary baddie behavior. ๐
See also: setEnabled, eventFilter()
Definition: at line 118 of file qwt_plot_rescaler.cpp.
Qt::Orientation QwtPlotRescaler::orientation (QwtAxisId axisId) const โ [protected]
Returns: orientation of an axis ๐งญ
axisIdโ Axis
Definition: at line 500 of file qwt_plot_rescaler.cpp.
QwtPlot * QwtPlotRescaler::plot ()
Returns: plot widget ๐
Definition: at line 294 of file qwt_plot_rescaler.cpp.
const QwtPlot * QwtPlotRescaler::plot () const
Returns: plot widget ๐
Definition: at line 304 of file qwt_plot_rescaler.cpp.
QwtAxisId QwtPlotRescaler::referenceAxis () const
Returns: reference axis (see RescalePolicy). the main-character axis, basically. ๐
See also: setReferenceAxis()
Definition: at line 158 of file qwt_plot_rescaler.cpp.
void QwtPlotRescaler::rescale () const
Adjust the plot axes scales. go off, scales. ๐ฅ
Definition: at line 355 of file qwt_plot_rescaler.cpp.
void QwtPlotRescaler::rescale (const QSize & oldSize, const QSize & newSize) const โ [protected], [virtual]
Adjust the plot axes scales. same energy, now with size lore. ๐
oldSizeโ Previous size of the canvasnewSizeโ New size of the canvas
Definition: at line 367 of file qwt_plot_rescaler.cpp.
QwtPlotRescaler::RescalePolicy QwtPlotRescaler::rescalePolicy () const
Returns: rescale policy ๐
See also: setRescalePolicy()
Definition: at line 138 of file qwt_plot_rescaler.cpp.
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. slay that default. ๐
ratioโ Aspect ratio
See also: aspectRatio()
Definition: at line 212 of file qwt_plot_rescaler.cpp.
void QwtPlotRescaler::setAspectRatio (QwtAxisId axisId, double ratio)
Set the aspect ratio between the scale of the reference axis and another scale. The default ratio is 1.0. yes, again, and it ate. โจ
axisIdโ Axisratioโ Aspect ratio
See also: aspectRatio()
Definition: at line 226 of file qwt_plot_rescaler.cpp.
void QwtPlotRescaler::setEnabled (bool on)
En/disable the rescaler. When enabled is true, an event filter is installed for the canvas; otherwise the event filter is removed. toggle toggle, bestie. ๐
onโtrueorfalse
See also: isEnabled(), eventFilter()
Definition: at line 97 of file qwt_plot_rescaler.cpp.
void QwtPlotRescaler::setExpandingDirection (ExpandingDirection direction)
Set the direction in which all axis should be expanded. all of them. collectively. ๐ซ
directionโ Direction
See also: expandingDirection()
Definition: at line 169 of file qwt_plot_rescaler.cpp.
void QwtPlotRescaler::setExpandingDirection (QwtAxisId axisId, ExpandingDirection direction)
Set the direction in which an axis should be expanded. one axis, very personal. ๐
axisIdโ Axisdirectionโ Direction
See also: expandingDirection()
Definition: at line 183 of file qwt_plot_rescaler.cpp.
void QwtPlotRescaler::setIntervalHint (QwtAxisId axisId, const QwtInterval & interval)
Set an interval hint for an axis. In Fitting mode, the hint is used as minimal interval that always needs to be displayed. noted and respected. ๐
axisIdโ Axisintervalโ Axis
See also: intervalHint(), RescalePolicy
Definition: at line 261 of file qwt_plot_rescaler.cpp.
void QwtPlotRescaler::setReferenceAxis (QwtAxisId axisId)
Set the reference axis (see RescalePolicy). crown the reference axis, honestly. ๐
axisIdโ Axis
See also: referenceAxis()
Definition: at line 149 of file qwt_plot_rescaler.cpp.
void QwtPlotRescaler::setRescalePolicy (RescalePolicy policy)
Change the rescale policy. new policy, who dis? ๐ฆ
policyโ Rescale policy
See also: rescalePolicy()
Definition: at line 129 of file qwt_plot_rescaler.cpp.
QwtInterval QwtPlotRescaler::syncScale (QwtAxisId axisId, const QwtInterval & reference, const QSize & size) const โ [protected], [virtual]
Synchronize an axis scale according to the scale of the reference axis. teamwork makes the dream work. ๐ซถ
axisIdโ Axisreferenceโ Interval of the reference axissizeโ Size of the canvas
Returns: new interval for axis
Definition: at line 469 of file qwt_plot_rescaler.cpp.
void QwtPlotRescaler::updateScales (QwtInterval intervals[QwtAxis::AxisPositions]) const โ [protected], [virtual]
Update the axes scales. all together now. ๐
intervalsโ Scale intervals
Definition: at line 588 of file qwt_plot_rescaler.cpp.
โจ AUTHOR โจ
Generated automatically by Doxygen for Qwt User's Guide from the source code. iconic autogenerated behavior, no notes. ๐
๐ footer vibe check, bestie: this page is auto-generated by Doxygen for Qwt User's Guide from the source code, and the footer tag is QwtPlotRescaler(3) โ no actual date/version line on this one, so Iโm not inventing one. byeee ๐ โจ
๐ฆ where this page comes from
- alpine 3.24: qwt-doc 6.3.0-r0 ยท custom
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms