QwtAbstractScale(3)
okay so bestie, welcome to QwtAbstractScale(3) from the Library Functions Manual β this is the abstract base class for widgets that have a scale, and it is lowkey foundational. slay π
π NAME π
QwtAbstractScale - an abstract base class for widgets having a scale. periodt, that's the whole name vibe: scale-having widget energy. β¨
β¨ SYNOPSIS β¨
#include <qwt_abstract_scale.h>
Inherits QWidget.
Inherited by QwtAbstractSlider, and QwtThermo.
So it's a QWidget, and QwtAbstractSlider and QwtThermo inherit from it. it's giving family tree realness. πΈ
π Public Member Functions π
QwtAbstractScale (QWidget *parent=NULL)β the constructor, with parent as aQWidget *.virtual ~QwtAbstractScale ()β destructor. bye bestie.void setScale (double lowerBound, double upperBound)β specify a scale.void setScale (const QwtInterval &)β specify a scale.void setScale (const QwtScaleDiv &)β specify a scale.const QwtScaleDiv & scaleDiv () constβ the scale division getter.void setLowerBound (double value)β lower-bound setter.double lowerBound () constβ lower-bound getter.void setUpperBound (double value)β upper-bound setter.double upperBound () constβ upper-bound getter.void setScaleStepSize (double stepSize)β set the step size used for calculating a scale division.double scaleStepSize () constβ step-size getter.void setScaleMaxMajor (int ticks)β set the maximum number of major tick intervals.int scaleMaxMinor () constβ max minor tick intervals getter. yes, this one shows up before its setter in the original β iconic order, no notes.void setScaleMaxMinor (int ticks)β set the maximum number of minor tick intervals.int scaleMaxMajor () constβ max major tick intervals getter.void setScaleEngine (QwtScaleEngine *)β set a scale engine.const QwtScaleEngine * scaleEngine () constβ const scale-engine getter.QwtScaleEngine * scaleEngine ()β scale-engine getter.int transform (double) constβ transform call: takes adouble, returns anint.double invTransform (int) constβ inverse transform call: takes anint, returns adouble.bool isInverted () constβ inverted check, returns abool.double minimum () constβ minimum getter.double maximum () constβ maximum getter.const QwtScaleMap & scaleMap () constβ scale-map getter.
π¦ Protected Member Functions π¦
virtual void changeEvent (QEvent *) overrideβ change-event override.void rescale (double lowerBound, double upperBound, double stepSize)β rescale with lowerBound, upperBound, and stepSize.void setAbstractScaleDraw (QwtAbstractScaleDraw *)β set a scale draw.const QwtAbstractScaleDraw * abstractScaleDraw () constβ const abstract-scale-draw getter.QwtAbstractScaleDraw * abstractScaleDraw ()β abstract-scale-draw getter.void updateScaleDraw ()β update the scale draw.virtual void scaleChange ()β notify changed scale.
π Detailed Description π
An abstract base class for widgets having a scale.
The scale of an QwtAbstractScale is determined by a QwtScaleDiv definition, that contains the boundaries and the ticks of the scale. The scale is painted using a QwtScaleDraw object. obsessed with this separation of concerns. β¨
The scale division might be assigned explicitly - but usually it is calculated from the boundaries using a QwtScaleEngine.
The scale engine also decides the type of transformation of the scale ( linear, logarithmic ... ). linear? logarithmic? the scale engine said choose your fighter.
Definition at line 36 of file qwt_abstract_scale.h.
π§ Constructor & Destructor Documentation π§
QwtAbstractScale::QwtAbstractScale (QWidget * parent = NULL) [explicit]
Constructor. π
Parameters
- parent β parent widget.
Creates a default QwtScaleDraw and a QwtLinearScaleEngine. The initial scale boundaries are set to [ 0.0, 100.0 ]
The scaleStepSize() is initialized to 0.0, scaleMaxMajor() to 5 and scaleMaxMajor to 3.
bestie, yes, the original literally says scaleMaxMajor twice there β I am not fixing it, I am respecting the lore. iykyk π
Definition at line 57 of file qwt_abstract_scale.cpp.
QwtAbstractScale::~QwtAbstractScale () [virtual]
Destructor. cleanup era. π
Definition at line 65 of file qwt_abstract_scale.cpp.
π Member Function Documentation π
okay bestie, this is the member-function half of the page β every method, every return, every see-also, all of it. no skips, no cap. β¨
π abstractScaleDraw() β non-const glow-up
QwtAbstractScaleDraw * QwtAbstractScale::abstractScaleDraw () [protected]
- Returns: Scale draw π
- See also:
setAbstractScaleDraw() - Definition: Definition at line 293 of file
qwt_abstract_scale.cpp.
π¦ abstractScaleDraw() β const queen
const QwtAbstractScaleDraw * QwtAbstractScale::abstractScaleDraw () const
[protected]
- Returns: Scale draw β¨
- See also:
setAbstractScaleDraw() - Definition: Definition at line 302 of file
qwt_abstract_scale.cpp.
πΈ changeEvent() β the event-handler moment
void QwtAbstractScale::changeEvent (QEvent * event) [override],
[protected], [virtual]
Change Event handler, literally.
- Parameters:
eventβ Change event - Invalidates internal caches if necessary π§Ή
- Reimplemented in
QwtDial,QwtKnob,QwtSlider, andQwtThermo. - Definition: Definition at line 453 of file
qwt_abstract_scale.cpp.
π§ invTransform() β widget coord β scale value
double QwtAbstractScale::invTransform (int value) const
Translate a widget coordinate into a scale value. it's giving translator bestie π
- Parameters:
valueβ Widget coordinate - Returns: Corresponding scale coordinate for
value - See also:
scaleMap(),transform() - Definition: Definition at line 381 of file
qwt_abstract_scale.cpp.
π¦ isInverted() β is the scale going backwards?
bool QwtAbstractScale::isInverted () const
- Returns: True, when the scale is increasing in opposite direction to the widget coordinates π
- Definition: Definition at line 390 of file
qwt_abstract_scale.cpp.
π lowerBound() β bottom of the scale
double QwtAbstractScale::lowerBound () const
- Returns: Lower bound of the scale
- See also:
setLowerBound(),setScale(),upperBound() - Definition: Definition at line 88 of file
qwt_abstract_scale.cpp.
π maximum() β the bigger boundary
double QwtAbstractScale::maximum () const
- Returns: The boundary with the larger value
- See also:
minimum(),lowerBound(),upperBound() - Definition: Definition at line 409 of file
qwt_abstract_scale.cpp.
π minimum() β the smaller boundary
double QwtAbstractScale::minimum () const
- Returns: The boundary with the smaller value
- See also:
maximum(),lowerBound(),upperBound() - Definition: Definition at line 399 of file
qwt_abstract_scale.cpp.
π₯ rescale() β recalculate + update
void QwtAbstractScale::rescale (double lowerBound, double upperBound, double
stepSize) [protected]
Recalculate the scale division and update the scale. main character energy, fr fr.
- Parameters:
lowerBoundβ Lower limit of the scale intervalupperBoundβ Upper limit of the scale intervalstepSizeβ Major step size
- See also:
scaleChange() - Definition: Definition at line 429 of file
qwt_abstract_scale.cpp.
π« scaleChange() β notify changed scale
void QwtAbstractScale::scaleChange () [protected], [virtual]
Notify changed scale. that's the whole vibe.
- Reimplemented in
QwtAbstractSlider,QwtDial,QwtSlider, andQwtThermo. - Definition: Definition at line 416 of file
qwt_abstract_scale.cpp.
π scaleDiv() β boundaries + tick positions
const QwtScaleDiv & QwtAbstractScale::scaleDiv () const
- Returns: Scale boundaries and positions of the ticks
- The scale division might have been assigned explicitly or calculated implicitly by
rescale(). iykyk π«Ά - Definition: Definition at line 349 of file
qwt_abstract_scale.cpp.
π§ scaleEngine() β non-const version
QwtScaleEngine * QwtAbstractScale::scaleEngine ()
- Returns: Scale engine
- See also:
setScaleEngine() - Definition: Definition at line 338 of file
qwt_abstract_scale.cpp.
π¦ scaleEngine() β const version
const QwtScaleEngine * QwtAbstractScale::scaleEngine () const
- Returns: Scale engine
- See also:
setScaleEngine() - Definition: Definition at line 329 of file
qwt_abstract_scale.cpp.
πΊοΈ scaleMap() β the coordinate map
const QwtScaleMap & QwtAbstractScale::scaleMap () const
- Returns: Map to translate between scale and widget coordinates
- Definition: Definition at line 357 of file
qwt_abstract_scale.cpp.
π
scaleMaxMajor() β max major intervals
int QwtAbstractScale::scaleMaxMajor () const
- Returns: Maximal number of major tick intervals
- See also:
setScaleMaxMajor(),scaleMaxMinor() - Definition: Definition at line 202 of file
qwt_abstract_scale.cpp.
πΈ scaleMaxMinor() β max minor intervals
int QwtAbstractScale::scaleMaxMinor () const
- Returns: Maximal number of minor tick intervals
- See also:
setScaleMaxMinor(),scaleMaxMajor() - Definition: Definition at line 232 of file
qwt_abstract_scale.cpp.
β scaleStepSize() β step-size hint
double QwtAbstractScale::scaleStepSize () const
- Returns: Hint for the step size of the scale
- See also:
setScaleStepSize(),QwtScaleEngine::divideScale() - Definition: Definition at line 264 of file
qwt_abstract_scale.cpp.
π setAbstractScaleDraw() β adopt a scale draw
void QwtAbstractScale::setAbstractScaleDraw (QwtAbstractScaleDraw *
scaleDraw) [protected]
Set a scale draw. scaleDraw has to be created with new and will be deleted in the destructor or the next call of setAbstractScaleDraw(). no leaks, bestie π
- See also:
abstractScaleDraw() - Definition: Definition at line 277 of file
qwt_abstract_scale.cpp.
π setLowerBound() β set the lower bound
void QwtAbstractScale::setLowerBound (double value)
Set the lower bound of the scale.
- Parameters:
valueβ Lower bound - See also:
lowerBound(),setScale(),setUpperBound() - Note: For inverted scales the lower bound is greater than the upper bound π
- Definition: Definition at line 79 of file
qwt_abstract_scale.cpp.
π§ setScale() β scale by interval
void QwtAbstractScale::setScale (const QwtInterval & interval)
Specify a scale. Define a scale by an interval.
The ticks are calculated using scaleMaxMinor(), scaleMaxMajor() and scaleStepSize(). math girlie behavior, honestly.
- Parameters:
intervalβ Interval - Definition: Definition at line 145 of file
qwt_abstract_scale.cpp.
π¦ setScale() β scale by scale division
void QwtAbstractScale::setScale (const QwtScaleDiv & scaleDiv)
Specify a scale. scaleMaxMinor(), scaleMaxMajor() and scaleStepSize() and have no effect. yes, that's the note β fr fr.
- Parameters:
scaleDivβ Scale division - See also:
setAutoScale() - Definition: Definition at line 158 of file
qwt_abstract_scale.cpp.
π setScale() β scale by two bounds
void QwtAbstractScale::setScale (double lowerBound, double upperBound)
Specify a scale. Define a scale by an interval.
The ticks are calculated using scaleMaxMinor(), scaleMaxMajor() and scaleStepSize().
- Parameters:
lowerBoundβ lower limit of the scale intervalupperBoundβ upper limit of the scale interval
- Note: For inverted scales the lower bound is greater than the upper bound π
- Definition: Definition at line 130 of file
qwt_abstract_scale.cpp.
π₯ setScaleEngine() β swap in a scale engine
void QwtAbstractScale::setScaleEngine (QwtScaleEngine * scaleEngine)
Set a scale engine. The scale engine is responsible for calculating the scale division and provides a transformation between scale and widget coordinates. that's a lot of responsibility, tbh.
scaleEngine has to be created with new and will be deleted in the destructor or the next call of setScaleEngine.
- Definition: Definition at line 316 of file
qwt_abstract_scale.cpp.
π« setScaleMaxMajor() β cap those major ticks
void QwtAbstractScale::setScaleMaxMajor (int ticks)
Set the maximum number of major tick intervals. The scale's major ticks are calculated automatically such that the number of major intervals does not exceed ticks.
The default value is 5. periodt.
- Parameters:
ticksβ Maximal number of major ticks. - See also:
scaleMaxMajor(),setScaleMaxMinor(),setScaleStepSize(),QwtScaleEngine::divideInterval() - Definition: Definition at line 189 of file
qwt_abstract_scale.cpp.
πΈ setScaleMaxMinor() β cap those minor ticks
void QwtAbstractScale::setScaleMaxMinor (int ticks)
Set the maximum number of minor tick intervals. The scale's minor ticks are calculated automatically such that the number of minor intervals does not exceed ticks. The default value is 3. slay.
- Parameters:
ticksβ Maximal number of minor ticks. - See also:
scaleMaxMajor(),setScaleMaxMinor(),setScaleStepSize(),QwtScaleEngine::divideInterval() - Definition: Definition at line 219 of file
qwt_abstract_scale.cpp.
β setScaleStepSize() β hint the step size
void QwtAbstractScale::setScaleStepSize (double stepSize)
Set the step size used for calculating a scale division. The step size is hint for calculating the intervals for the major ticks of the scale. A value of 0.0 is interpreted as no hint.
- Parameters:
stepSizeβ Hint for the step size of the scale - See also:
scaleStepSize(),QwtScaleEngine::divideScale() - Note: Position and distance between the major ticks also depends on
scaleMaxMajor(). - Definition: Definition at line 251 of file
qwt_abstract_scale.cpp.
π setUpperBound() β set the upper bound
void QwtAbstractScale::setUpperBound (double value)
Set the upper bound of the scale.
- Parameters:
valueβ Upper bound - See also:
upperBound(),setScale(),setLowerBound() - Note: For inverted scales the lower bound is greater than the upper bound π
- Definition: Definition at line 102 of file
qwt_abstract_scale.cpp.
πΊοΈ transform() β scale value β widget coord
int QwtAbstractScale::transform (double value) const
Translate a scale value into a widget coordinate.
- Parameters:
valueβ Scale value - Returns: Corresponding widget coordinate for
value - See also:
scaleMap(),invTransform() - Definition: Definition at line 369 of file
qwt_abstract_scale.cpp.
π§Ή updateScaleDraw() β recalculate everything
void QwtAbstractScale::updateScaleDraw () [protected]
Recalculate ticks and scale boundaries. get that refresh, bestie β¨
- Definition: Definition at line 466 of file
qwt_abstract_scale.cpp.
π upperBound() β top of the scale
double QwtAbstractScale::upperBound () const
- Returns: Upper bound of the scale
- See also:
setUpperBound(),setScale(),lowerBound() - Definition: Definition at line 111 of file
qwt_abstract_scale.cpp.
π Author π
Generated automatically by Doxygen for Qwt User's Guide from the source code. yes, the robots wrote this bit, and it ate. π
and that's the footer vibe, bestie β source/version says Qwt User's Guide, page QwtAbstractScale(3), no extra drama, just a cute little sign-off β¨π«Ά
π¦ 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