QwtDoubleRange(3)
π QwtDoubleRange π
okay so bestie, welcome to the Qwt User's Guide β that's the manual this page lives in β and today's main character is QwtDoubleRange. sit down, get comfy, we're doing inheritance and step rasters and it's gonna be adorable. π
π NAME π
QwtDoubleRange β and the description? literally nothing. the original page just has a lonely little dash hanging there with no words after it. iconic behavior honestly. the vibe is mysterious. π
β¨ SYNOPSIS β¨
#include <qwt_double_range.h>
Inherited by QwtAbstractSlider, and QwtCounter. (so if you're reading this because one of those two sent you here β hi, you're in the right place π«Ά)
π Public Member Functions π
QwtDoubleRange ()virtual ~QwtDoubleRange ()virtual void fitValue (double)virtual void incPages (int)virtual void incValue (int)bool isValid () constdouble maxValue () constdouble minValue () constint pageSize () constbool periodic () constvoid setPeriodic (bool tf)void setRange (double vmin, double vmax, double vstep=0.0, int pagesize=1)void setStep (double)void setValid (bool)virtual void setValue (double)double step () constdouble value () const
π¦ Protected Member Functions π¦
double exactPrevValue () constdouble exactValue () constdouble prevValue () constvirtual void rangeChange ()virtual void stepChange ()virtual void valueChange ()
πΈ Detailed Description πΈ
so what is this thing? it's a class which controls a value within an interval. periodt.
it's useful as a base class, or as a member, for sliders. it represents an interval of type double within which a value can be moved. and the value can be one of two flavors:
- an arbitrary point inside the interval β see
QwtDoubleRange::setValue - OR fitted into a step raster β see
QwtDoubleRange::fitValueandQwtDoubleRange::incValue
and then there's the special case, the plot twist: a QwtDoubleRange can be periodic. what that means is a value outside the interval gets mapped to a value inside the interval whenever QwtDoubleRange::setValue(), QwtDoubleRange::fitValue(), QwtDoubleRange::incValue() or QwtDoubleRange::incPages() get called. it just cannot stay outside. it always comes home. π
π Constructor & Destructor Documentation π
QwtDoubleRange::QwtDoubleRange ()
fresh out of the box, the range is initialized to [0.0, 100.0], the step size is 1.0, and the value is 0.0. baby's first defaults, she's perfect. β¨
π Member Function Documentation π
double QwtDoubleRange::exactValue () const [protected]
returns the exact value. and what even is that? it's the value which QwtDoubleRange::value would have returned if the value hadn't been adjusted to the step raster. so it only differs from the current value if QwtDoubleRange::fitValue or QwtDoubleRange::incValue have been used before β otherwise they're the same girl.
this one is for internal use in derived classes, so it's not for everyone. iykyk. π€«
void QwtDoubleRange::fitValue (double x) [virtual]
adjusts the value to the closest point in the step raster. snapping into place, no cap.
Parameters:
- x β value
β οΈ Warning: the value is clipped when it lies outside the range. but when the range is QwtDoubleRange::periodic, it will be mapped to a point in the interval such that
new value := x + n * (max. value - min. value)
with an integer number n.
Reimplemented in QwtAbstractSlider.
void QwtDoubleRange::incPages (int nPages) [virtual]
increments the value by a specified number of pages. like flipping pages in a book but the book is a slider. π
Parameters:
- nPages β Number of pages to increment. A negative number decrements the value.
β οΈ Warning: the page size is specified in the constructor. so if you're looking for it hereβ¦ it's not here, bestie. it's over there. π
void QwtDoubleRange::incValue (int nSteps) [virtual]
increments the value by a specified number of steps. π¦Ά
Parameters:
- nSteps β Number of steps to increment
β οΈ Warning: as a result of this operation, the new value will always be adjusted to the step raster. no exceptions, she's committed.
Reimplemented in QwtAbstractSlider.
double QwtDoubleRange::maxValue () const
returns the value of the second border of the range. maxValue returns the value which has been specified as the second parameter in QwtDoubleRange::setRange.
See also: setRange()
double QwtDoubleRange::minValue () const
returns the value at the first border of the range. minValue returns the value which has been specified as the first parameter in setRange().
See also: setRange()
bool QwtDoubleRange::periodic () const
returns true if the range is periodic. that's it, that's the function. simple queen. π
See also: setPeriodic()
void QwtDoubleRange::rangeChange () [protected], [virtual]
notify a change of the range. this virtual function gets called whenever the range changes. and the default implementation? does absolutely nothing. silent. unbothered. π
Reimplemented in QwtDial, QwtCounter, and QwtSlider.
void QwtDoubleRange::setPeriodic (bool tf)
makes the range periodic. when the range is periodic, the value will be set to a point inside the interval such that
point = value + n * width .fi
if the user tries to set a new value which is outside the range. (yes the .fi is really in there, it's a whole Doxygen artifact, we don't question it, we respect it π)
if the range is nonperiodic (which is the default), values outside the range will be clipped instead. no mapping, no math, just βοΈ.
Parameters:
- tf β true for a periodic range
void QwtDoubleRange::setRange (double vmin, double vmax, double vstep = 0.0, int pageSize = 1)
specify range and step size. the glow-up setup call. β¨
Parameters:
- vmin β lower boundary of the interval
- vmax β higher boundary of the interval
- vstep β step width
- pageSize β page size in steps
β οΈ Warning: - A change of the range changes the value if it lies outside the new range. The current value will not be adjusted to the new step raster. -vmax<vminis allowed. - If the step size is left out or set to zero, it will be set to 1/100 of the interval length. - If the step size has an absurd value, it will be corrected to a better one. (the class is doing a vibe check on your step size and fixing it for you π«Ά)
void QwtDoubleRange::setStep (double vstep)
change the step raster.
Parameters:
- vstep β new step width
β οΈ Warning: the value will not be adjusted to the new step raster. she's staying exactly where she is, thank you.
Reimplemented in QwtCounter.
void QwtDoubleRange::setValue (double x) [virtual]
sets a new value without adjusting to the step raster. free-spirited. ungovernable. π¦
Parameters:
- x β new value
β οΈ Warning: the value is clipped when it lies outside the range. when the range is QwtDoubleRange::periodic, it will be mapped to a point in the interval such that
new value := x + n * (max. value - min. value)
with an integer number n.
Reimplemented in QwtCounter, and QwtAbstractSlider.
double QwtDoubleRange::step () const
Returns:
- the step size
See also: setStep(), setRange()
Reimplemented in QwtCounter.
void QwtDoubleRange::stepChange () [protected], [virtual]
notify a change of the step size. this virtual function gets called whenever the step size changes. default implementation? nothing. nada. silence, but make it chic. π€
void QwtDoubleRange::valueChange () [protected], [virtual]
notify a change of value. this virtual function gets called whenever the value changes. default implementation does nothing, again. consistent icon.
Reimplemented in QwtDial, QwtAbstractSlider, QwtSlider, and QwtWheel.
π Author π
Generated automatically by Doxygen for Qwt User's Guide from the source code. yes bestie, a robot wrote this about a robot-adjacent thing. we love a full circle moment. π
and that's the whole page!! mwah. π this was Version 5.2.3, dated Tue Nov 20 2012 β so yes, she's a vintage queen and she still slays. go adjust some step rasters, you got this. πβ¨πΈπ¦
π¦ where this page comes from
- epel 9: qwt5-qt5-devel 5.2.3a-12.20210522gita2b11e3.el9 Β· LGPLv2+ with exceptions
- fedora 43: qwt5-qt5-devel 5.2.3a-22.20210522gita2b11e3.fc43 Β· LGPL-2.1-or-later WITH Qwt-exception-1.0
- fedora 43: qwt5-qt5-devel 5.2.3a-22.20210522gita2b11e3.fc43 Β· LGPL-2.1-or-later WITH Qwt-exception-1.0
- fedora 44: qwt5-qt5-devel 5.2.3a-23.20210522gita2b11e3.fc44 Β· LGPL-2.1-or-later WITH Qwt-exception-1.0
- fedora 44: qwt5-qt5-devel 5.2.3a-23.20210522gita2b11e3.fc44 Β· LGPL-2.1-or-later WITH Qwt-exception-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms