QwtScaleDiv(3)
π QwtScaleDiv π
okay so real talk β this page comes to you straight out of the Library Functions Manual, and it's all about QwtScaleDiv, a class representing a scale division. she's iconic, she's geometric, she's got main character energy. let's get into it π
β¨ NAME β¨
QwtScaleDiv β a class representing a scale division. no cap, that's literally the whole thing π
π¦ SYNOPSIS π¦
#include <qwt_scale_div.h>
πΈ Public Types πΈ
enum TickType { NoTick = -1, MinorTick, MediumTick, MajorTick,
NTickTypes }
Scale tick types β¨ (yes bestie, there are four of them, we'll get there)
π«Ά Public Member Functions π«Ά
QwtScaleDiv (double lowerBound=0.0, double upperBound=0.0)β the basic constructorQwtScaleDiv (const QwtInterval &, QList< double >[NTickTypes])β constructor from an interval plus a tick arrayQwtScaleDiv (double lowerBound, double upperBound, QList< double >[NTickTypes])β constructor from two bounds plus a tick arrayQwtScaleDiv (double lowerBound, double upperBound, const QList< double > &minorTicks, const QList< double > &mediumTicks, const QList< double > &majorTicks)β the "gimme all three tick lists explicitly" constructorbool operator== (const QwtScaleDiv &) constβ Equality operator. π―bool operator!= (const QwtScaleDiv &) constβ Inequality. the opposite vibe πvoid setInterval (double lowerBound, double upperBound)β set the interval from two numbersvoid setInterval (const QwtInterval &)β set the interval from aQwtIntervalQwtInterval interval () constβ grab the interval back outvoid setLowerBound (double)β set the lower bounddouble lowerBound () constβ read the lower boundvoid setUpperBound (double)β set the upper bounddouble upperBound () constβ read the upper bounddouble range () constβ the rangebool contains (double value) constβ is this value in here or notvoid setTicks (int tickType, const QList< double > &)β assign ticksQList< double > ticks (int tickType) constβ get the tick list for a typebool isEmpty () constβ Check if the scale division is empty(lowerBound() == upperBound()). βbool isIncreasing () constβ Check if the scale division is increasing(lowerBound() <= upperBound()). βvoid invert ()β flip it in placeQwtScaleDiv inverted () constβ get a flipped copyQwtScaleDiv bounded (double lowerBound, double upperBound) constβ clamp a copy to an interval
π Detailed Description π
A class representing a scale division. periodt.
A Qwt scale is defined by its boundaries and 3 list for the positions of the major, medium and minor ticks. (three lists, three tick flavors β she's organized π )
the tea on upperBound(): it might be smaller than the lowerBound() to indicate inverted scales. yes bestie, that's on purpose, that's not a bug, don't come for her π
Scale divisions can be calculated from a QwtScaleEngine. π§
See also:QwtScaleEngine::divideScale(),QwtPlot::setAxisScaleDiv(),QwtAbstractSlider::setScaleDiv()
Definition at line 33 of file qwt_scale_div.h.
π Member Enumeration Documentation π
enum QwtScaleDiv::TickType
Scale tick types. the whole tick taxonomy, laid out π¦
Enumerator:
NoTickβ No ticks. literally none. the void. πMinorTickβ Minor ticks. the little ones πMediumTickβ Medium ticks. the middle children πΈMajorTickβ Major ticks. the main characters πNTickTypesβ Number of valid tick types.
Definition at line 37 of file qwt_scale_div.h.
β¨ Constructor & Destructor Documentation β¨
QwtScaleDiv::QwtScaleDiv (double lowerBound = 0.0, double upperBound = 0.0)
[explicit]
Construct a division without ticks. a clean slate, no little marks anywhere, just vibes π«Ά
Parameters:
lowerBoundβ First boundaryupperBoundβ Second boundary
Note:lowerBoundmight be greater thanupperBoundfor inverted scales. (inverted is a look, okay?)
Definition at line 21 of file qwt_scale_div.cpp.
QwtScaleDiv::QwtScaleDiv (const QwtInterval & interval, QList< double > ticks[NTickTypes])
[explicit]
Construct a scale division π
Parameters:
intervalβ Intervalticksβ List of major, medium and minor ticks
Definition at line 33 of file qwt_scale_div.cpp.
QwtScaleDiv::QwtScaleDiv (double lowerBound, double upperBound, QList< double > ticks[NTickTypes])
[explicit]
Construct a scale division π
Parameters:
lowerBoundβ First boundaryupperBoundβ Second boundaryticksβ List of major, medium and minor ticks
Note:lowerBoundmight be greater thanupperBoundfor inverted scales.
Definition at line 51 of file qwt_scale_div.cpp.
QwtScaleDiv::QwtScaleDiv (double lowerBound, double upperBound, const QList< double > & minorTicks, const QList< double > & mediumTicks, const QList< double > & majorTicks)
[explicit]
Construct a scale division π (this one wants all three lists handed to her directly, no array, we love an explicit queen)
Parameters:
lowerBoundβ First boundaryupperBoundβ Second boundaryminorTicksβ List of minor ticksmediumTicksβ List medium ticksmajorTicksβ List of major ticks
Note:lowerBoundmight be greater thanupperBoundfor inverted scales.
Definition at line 71 of file qwt_scale_div.cpp.
π Member Function Documentation π
QwtScaleDiv QwtScaleDiv::bounded (double lowerBound, double upperBound) const
Return a scale division with an interval [lowerBound, upperBound] where all ticks outside this interval are removed. she's doing a little cleanup, a little curation, a little "you're not on the guest list" energy β¨
Parameters:
lowerBoundβ Lower boundupperBoundβ Upper bound
Returns: Scale division with all ticks inside of the given interval
Note:lowerBoundmight be greater thanupperBoundfor inverted scales.
Definition at line 263 of file qwt_scale_div.cpp.
bool QwtScaleDiv::contains (double value) const
Return if a value is between lowerBound() and upperBound(). the vibe check for numbers π«Ά
Parameters:
valueβ Value
Returns: true/false
Definition at line 212 of file qwt_scale_div.cpp.
QwtInterval QwtScaleDiv::interval () const
Returns: lowerBound -> upperBound
Definition at line 111 of file qwt_scale_div.cpp.
void QwtScaleDiv::invert ()
Invert the scale division. do it in place, no copy, no drama π
See also: inverted()
Definition at line 224 of file qwt_scale_div.cpp.
QwtScaleDiv QwtScaleDiv::inverted () const
Returns: A scale division with inverted boundaries and ticks
See also: invert()
Definition at line 244 of file qwt_scale_div.cpp.
bool QwtScaleDiv::isEmpty () const
Check if the scale division is empty( lowerBound() == upperBound() ). π
Definition at line 195 of file qwt_scale_div.cpp.
bool QwtScaleDiv::isIncreasing () const
Check if the scale division is increasing( lowerBound() <= upperBound() ). β
Definition at line 201 of file qwt_scale_div.cpp.
double QwtScaleDiv::lowerBound () const
Returns: First boundary
See also: upperBound()
Definition at line 131 of file qwt_scale_div.cpp.
bool QwtScaleDiv::operator!= (const QwtScaleDiv & other) const
Inequality. π
Returns: true if this instance is not equal to other
Definition at line 189 of file qwt_scale_div.cpp.
bool QwtScaleDiv::operator== (const QwtScaleDiv & other) const
Equality operator. π―
Returns: true if this instance is equal to other
Definition at line 168 of file qwt_scale_div.cpp.
double QwtScaleDiv::range () const
Returns: upperBound() - lowerBound()
Definition at line 159 of file qwt_scale_div.cpp.
void QwtScaleDiv::setInterval (const QwtInterval & interval)
Change the interval.
Parameters:
intervalβ Interval
Definition at line 102 of file qwt_scale_div.cpp.
void QwtScaleDiv::setInterval (double lowerBound, double upperBound)
Change the interval.
Parameters:
lowerBoundβ First boundaryupperBoundβ Second boundary
Note:lowerBoundmight be greater thanupperBoundfor inverted scales.
Definition at line 91 of file qwt_scale_div.cpp.
void QwtScaleDiv::setLowerBound (double lowerBound)
Set the first boundary.
Parameters:
lowerBoundβ First boundary
See also:lowerBound(),setUpperBound()
Definition at line 122 of file qwt_scale_div.cpp.
void QwtScaleDiv::setTicks (int tickType, const QList< double > & ticks)
Assign ticks. π
Parameters:
tickTypeβMinorTick,MediumTickorMajorTickticksβ Values of the tick positions
Definition at line 297 of file qwt_scale_div.cpp.
void QwtScaleDiv::setUpperBound (double upperBound)
Set the second boundary.
Parameters:
upperBoundβ Second boundary
See also:upperBound(),setLowerBound()
Definition at line 142 of file qwt_scale_div.cpp.
QList< double > QwtScaleDiv::ticks (int tickType) const
Return a list of ticks. πΈ
Parameters:
tickTypeβMinorTick,MediumTickorMajorTick
Returns: Tick list
Definition at line 309 of file qwt_scale_div.cpp.
double QwtScaleDiv::upperBound () const
Returns: upper bound
See also: lowerBound()
Definition at line 151 of file qwt_scale_div.cpp.
π Author π
Generated automatically by Doxygen for Qwt User's Guide from the source code.
and that's the whole page bestie π«Ά this div came to you from the Qwt User's Guide, auto-generated by Doxygen straight from the source code β so if you're picturing a tired little robot typing this out at 3am, you're honestly not far off ππ slay, go build something pretty with it. πβ¨
π¦ 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