QwtScaleDiv − A class representing a scale division.
#include <qwt_scale_div.h>
enum
TickType { NoTick = -1, MinorTick,
MediumTick, MajorTick, NTickTypes }
Scale tick types.
QwtScaleDiv
(double lowerBound=0.0, double upperBound=0.0)
QwtScaleDiv (const QwtInterval &,
QList< double >[NTickTypes])
QwtScaleDiv (double lowerBound, double
upperBound, QList< double
>[NTickTypes])
QwtScaleDiv (double lowerBound, double
upperBound, const QList< double >
&minorTicks, const QList< double >
&mediumTicks, const QList< double >
&majorTicks)
bool operator== (const QwtScaleDiv &)
const
Equality operator.
bool operator!= (const QwtScaleDiv &)
const
Inequality.
void setInterval (double lowerBound, double
upperBound)
void setInterval (const QwtInterval &)
QwtInterval interval () const
void setLowerBound (double)
double lowerBound () const
void setUpperBound (double)
double upperBound () const
double range () const
bool contains (double value) const
void setTicks (int tickType, const QList<
double > &)
QList< double > ticks (int tickType) const
bool 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 ()
QwtScaleDiv inverted () const
QwtScaleDiv bounded (double lowerBound, double
upperBound) const
A class representing a scale division.
A Qwt scale is defined by its boundaries and 3 list for the positions of the major, medium and minor ticks.
The upperBound() might be smaller than the lowerBound() to indicate inverted scales.
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.
Scale tick types.
Enumerator
|
NoTick |
No ticks. |
MinorTick
Minor ticks.
MediumTick
Medium ticks.
MajorTick
Major ticks.
NTickTypes
Number of valid tick types.
Definition at line 37 of file qwt_scale_div.h.
Construct a division without ticks
Parameters
lowerBound First
boundary
upperBound Second boundary
Note
lowerBound might be greater than upperBound for inverted scales
Definition at line 21 of file qwt_scale_div.cpp.
Construct a scale division
Parameters
interval Interval
ticks List of major, medium and minor ticks
Definition at line 33 of file qwt_scale_div.cpp.
Construct a scale division
Parameters
lowerBound First
boundary
upperBound Second boundary
ticks List of major, medium and minor ticks
Note
lowerBound might be greater than upperBound for inverted scales
Definition at line 51 of file qwt_scale_div.cpp.
Construct a scale division
Parameters
lowerBound First
boundary
upperBound Second boundary
minorTicks List of minor ticks
mediumTicks List medium ticks
majorTicks List of major ticks
Note
lowerBound might be greater than upperBound for inverted scales
Definition at line 71 of file qwt_scale_div.cpp.
Return a scale division with an interval [lowerBound, upperBound] where all ticks outside this interval are removed
Parameters
lowerBound Lower bound
upperBound Upper bound
Returns
Scale division with all ticks inside of the given interval
Note
lowerBound might be greater than upperBound for inverted scales
Definition at line 263 of file qwt_scale_div.cpp.
Return if a value is between lowerBound() and upperBound()
Parameters
value Value
Returns
true/false
Definition at line 212 of file qwt_scale_div.cpp.
Returns
lowerBound -> upperBound
Definition at line 111 of file qwt_scale_div.cpp.
Invert the scale division
See also
inverted()
Definition at line 224 of file qwt_scale_div.cpp.
Returns
A scale division with inverted boundaries and ticks
See also
invert()
Definition at line 244 of file qwt_scale_div.cpp.
Check if the scale division is empty( lowerBound() == upperBound() )
Definition at line 195 of file qwt_scale_div.cpp.
Check if the scale division is increasing( lowerBound() <= upperBound() )
Definition at line 201 of file qwt_scale_div.cpp.
Returns
First boundary
See also
upperBound()
Definition at line 131 of file qwt_scale_div.cpp.
Inequality.
Returns
true if this instance is not equal to other
Definition at line 189 of file qwt_scale_div.cpp.
Equality operator.
Returns
true if this instance is equal to other
Definition at line 168 of file qwt_scale_div.cpp.
Returns
upperBound() - lowerBound()
Definition at line 159 of file qwt_scale_div.cpp.
Change the interval
Parameters
interval Interval
Definition at line 102 of file qwt_scale_div.cpp.
Change the interval
Parameters
lowerBound First
boundary
upperBound Second boundary
Note
lowerBound might be greater than upperBound for inverted scales
Definition at line 91 of file qwt_scale_div.cpp.
Set the first boundary
Parameters
lowerBound First boundary
See also
lowerBound(), setUpperBound()
Definition at line 122 of file qwt_scale_div.cpp.
Assign ticks
Parameters
tickType MinorTick,
MediumTick or MajorTick
ticks Values of the tick positions
Definition at line 297 of file qwt_scale_div.cpp.
Set the second boundary
Parameters
upperBound Second boundary
See also
upperBound(), setLowerBound()
Definition at line 142 of file qwt_scale_div.cpp.
Return a list of ticks
Parameters
tickType MinorTick, MediumTick or MajorTick
Returns
Tick list
Definition at line 309 of file qwt_scale_div.cpp.
Returns
upper bound
See also
lowerBound()
Definition at line 151 of file qwt_scale_div.cpp.
Generated automatically by Doxygen for Qwt User’s Guide from the source code.