QwtScaleEngine(3)
πΈ NAME πΈ
QwtScaleEngine β the base class for scale engines, bestie</p> β¨
β¨ SYNOPSIS β¨
#include <qwt_scale_engine.h>
Inherited by QwtLinearScaleEngine, and QwtLog10ScaleEngine. it's giving family tree π
</p>
π Public Types π
enum Attribute { NoAttribute = 0, IncludeReference = 1, Symmetric =
2, Floating = 4, Inverted = 8 }
π Public Member Functions π
QwtScaleEngine ()
virtual ~QwtScaleEngine ()
int attributes () const
virtual void autoScale (int maxNumSteps, double &x1, double &x2, double
&stepSize) const =0
virtual QwtScaleDiv divideScale (double x1, double x2, int maxMajSteps,
int maxMinSteps, double stepSize=0.0) const =0
double lowerMargin () const
double reference () const
void setAttribute (Attribute, bool on=true)
void setAttributes (int)
void setMargins (double lower, double upper)
void setReference (double reference)
bool testAttribute (Attribute) const
virtual QwtScaleTransformation * transformation () const =0
double upperMargin () const
π¦ Protected Member Functions π¦
QwtDoubleInterval buildInterval (double v) const
bool contains (const QwtDoubleInterval &, double val) const
double divideInterval (double interval, int numSteps) const
QwtValueList strip (const QwtValueList &, const QwtDoubleInterval &)
const
π DETAILED DESCRIPTION π
Base class for scale engines.
Okay so picture this: a scale engine is the little genius that looks at your data and goes "mmhmm, I know what reasonable ranges and step sizes should look like for this scale." That's literally its whole job. π«Ά
And the way the scale is laid out? You can vibe-check it with setAttribute(). customisation era</p>
Qwt ships with implementations for logarithmic (log10) and linear scales. And if you wanna contribute other types of scale engines (date/time, log2 ... )? they are welcome, no cap π
π MEMBER ENUMERATION DOCUMENTATION π
πΈ enum QwtScaleEngine::Attribute πΈ
IncludeReference</p> β Build a scale which includes thereference()value. β¨Symmetricβ Build a scale which is symmetric to thereference()value. π¦Floatingβ The endpoints of the scale are supposed to be equal the outmost included values plus the specified margins (seesetMargins()). If this attribute is not set, the endpoints of the scale will be integer multiples of the step size. lowkey important, remember this oneInvertedβ Turn the scale upside down. π flip it, reverse it
See also: setAttribute(), testAttribute(), reference(), lowerMargin(), upperMargin()
π MEMBER FUNCTION DOCUMENTATION π
π int QwtScaleEngine::attributes () const
Return the scale attributes. just hands you the whole attribute vibe in one int
See also: Attribute, setAttributes(), testAttribute()
π virtual void QwtScaleEngine::autoScale (int maxNumSteps, double &x1, double &x2, double &stepSize) const [pure virtual]
Align and divide an interval. it's giving "let me fix this range for you" energy
Parameters:
maxNumStepsβ Max. number of stepsx1β First limit of the interval (In/Out)x2β Second limit of the interval (In/Out)stepSizeβ Step size (Return value)
Implemented in QwtLog10ScaleEngine, and QwtLinearScaleEngine. β¨
π QwtDoubleInterval QwtScaleEngine::buildInterval (double v) const [protected]
Build an interval for a value. In case of v == 0.0 the interval is [-0.5, 0.5], otherwide it is [0.5 * v, 1.5 * v] yes the original says "otherwide", iconic tbh π
π bool QwtScaleEngine::contains (const QwtDoubleInterval & interval, double value) const [protected]
Check if an interval 'contains' a value. quote-unquote "contains", the scare quotes are in the original, I don't make the rules π
Parameters:
intervalβ Intervalvalueβ Value
See also: QwtScaleArithmetic::compareEps()
π double QwtScaleEngine::divideInterval (double intervalSize, int numSteps) const [protected]
Calculate a step size for an interval size. math girlies rise up π§
Parameters:
intervalSizeβ Interval sizenumStepsβ Number of steps
Returns: Step size
π virtual QwtScaleDiv QwtScaleEngine::divideScale (double x1, double x2, int maxMajSteps, int maxMinSteps, double stepSize = 0.0) const [pure virtual]
Calculate a scale division.
Parameters:
x1β First interval limitx2β Second interval limitmaxMajStepsβ Maximum for the number of major stepsmaxMinStepsβ Maximum number of minor stepsstepSizeβ Step size. IfstepSize == 0.0, thescaleEnginecalculates one. it'll do the math itself, independent queen π
Implemented in QwtLog10ScaleEngine, and QwtLinearScaleEngine. β¨
π double QwtScaleEngine::lowerMargin () const
Returns: the margin at the lower end of the scale. The default margin is 0. zero, zilch, nada, that's the default bestie
See also: setMargins()
π double QwtScaleEngine::reference () const
Returns: the reference value
See also: setReference(), setAttribute()
π void QwtScaleEngine::setAttribute (Attribute attribute, bool on = true)
Change a scale attribute. glow-up button for your scale's layout
Parameters:
attributeβ Attribute to changeonβ On/Off
See also: Attribute, testAttribute()
π void QwtScaleEngine::setAttributes (int attributes)
Change the scale attribute.
Parameters:
attributesβ Set scale attributes
See also: Attribute, attributes()
π void QwtScaleEngine::setMargins (double lower, double upper)
Specify margins at the scale's endpoints.
Parameters:
lowerβ minimum distance between the scale's lower boundary and the smallest enclosed valueupperβ minimum distance between the scale's upper boundary and the greatest enclosed value
Margins can be used to leave a minimum amount of space between the enclosed intervals and the boundaries of the scale. basically personal space for your scale π«Ά
β οΈ Warning: QwtLog10ScaleEngine measures the margins in decades. Yes. Decades. Not your usual units. Don't get caught slipping. π
See also: upperMargin(), lowerMargin()
π void QwtScaleEngine::setReference (double r)
Specify a reference point.
Parameters:
rβ new reference value
The reference point is needed if options IncludeReference or Symmetric are active. Its default value is 0.0. zero point zero, always, unless you say otherwise
See also: Attribute
π QwtValueList QwtScaleEngine::strip (const QwtValueList & ticks, const QwtDoubleInterval & interval) const [protected]
Remove ticks from a list, that are not inside an interval. declutter era β¨
Parameters:
ticksβ Tick listintervalβ Interval
Returns: Stripped tick list
π bool QwtScaleEngine::testAttribute (Attribute attribute) const
Check if a attribute is set. goes straight to the point, we love that
Parameters:
attributeβ Attribute to be tested
See also: Attribute, setAttribute()
π virtual QwtScaleTransformation * QwtScaleEngine::transformation () const [pure virtual]
Returns: a transformation
Implemented in QwtLog10ScaleEngine, and QwtLinearScaleEngine. β¨
π double QwtScaleEngine::upperMargin () const
Returns: the margin at the upper end of the scale. The default margin is 0. again, default is zero, we're consistent here
See also: setMargins()
π AUTHOR π
Generated automatically by Doxygen for Qwt User's Guide from the source code. not me getting auto-generated, the robots wrote me fr fr π€π
and that's the whole page bestie, you ate it, no crumbs left π β¨
Version 5.2.3 β dated Tue Nov 20 2012 β and it's still serving QwtScaleEngine(3) realness to this very day. periodt. ππΈ
π¦ 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