A class representing a scale division. More...
#include <qwt_scale_div.h>
Public Types | |
enum | TickType { NoTick = -1, MinorTick, MediumTick, MajorTick, NTickTypes } |
Scale tick types. More... | |
Public Member Functions | |
QwtScaleDiv | bounded (double lowerBound, double upperBound) const |
bool | contains (double value) const |
QwtInterval | interval () const |
void | invert () |
QwtScaleDiv | inverted () const |
bool | isEmpty () const |
Check if the scale division is empty( lowerBound() == upperBound() ) More... | |
bool | isIncreasing () const |
Check if the scale division is increasing( lowerBound() <= upperBound() ) More... | |
double | lowerBound () const |
bool | operator!= (const QwtScaleDiv &) const |
Inequality. More... | |
bool | operator== (const QwtScaleDiv &) const |
Equality operator. More... | |
QwtScaleDiv (const QwtInterval &, QList< double >[NTickTypes]) | |
QwtScaleDiv (double lowerBound, double upperBound, const QList< double > &minorTicks, const QList< double > &mediumTicks, const QList< double > &majorTicks) | |
QwtScaleDiv (double lowerBound, double upperBound, QList< double >[NTickTypes]) | |
QwtScaleDiv (double lowerBound=0.0, double upperBound=0.0) | |
double | range () const |
void | setInterval (const QwtInterval &) |
void | setInterval (double lowerBound, double upperBound) |
void | setLowerBound (double) |
void | setTicks (int tickType, const QList< double > &) |
void | setUpperBound (double) |
QList< double > | ticks (int tickType) const |
double | upperBound () const |
Private Attributes | |
double | m_lowerBound |
QList< double > | m_ticks [NTickTypes] |
double | m_upperBound |
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.
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.
|
explicit |
Construct a division without ticks
lowerBound | First boundary |
upperBound | Second boundary |
Definition at line 21 of file qwt_scale_div.cpp.
|
explicit |
Construct a scale division
interval | Interval |
ticks | List of major, medium and minor ticks |
Definition at line 33 of file qwt_scale_div.cpp.
|
explicit |
Construct a scale division
lowerBound | First boundary |
upperBound | Second boundary |
ticks | List of major, medium and minor ticks |
Definition at line 51 of file qwt_scale_div.cpp.
|
explicit |
Construct a scale division
lowerBound | First boundary |
upperBound | Second boundary |
minorTicks | List of minor ticks |
mediumTicks | List medium ticks |
majorTicks | List of major ticks |
Definition at line 71 of file qwt_scale_div.cpp.
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
lowerBound | Lower bound |
upperBound | Upper bound |
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()
value | Value |
Definition at line 212 of file qwt_scale_div.cpp.
QwtInterval QwtScaleDiv::interval | ( | ) | const |
Definition at line 111 of file qwt_scale_div.cpp.
void QwtScaleDiv::invert | ( | ) |
QwtScaleDiv QwtScaleDiv::inverted | ( | ) | const |
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 |
bool QwtScaleDiv::operator!= | ( | const QwtScaleDiv & | other | ) | const |
Inequality.
Definition at line 189 of file qwt_scale_div.cpp.
bool QwtScaleDiv::operator== | ( | const QwtScaleDiv & | other | ) | const |
Equality operator.
Definition at line 168 of file qwt_scale_div.cpp.
double QwtScaleDiv::range | ( | ) | const |
Definition at line 159 of file qwt_scale_div.cpp.
void QwtScaleDiv::setInterval | ( | const QwtInterval & | interval | ) |
void QwtScaleDiv::setInterval | ( | double | lowerBound, |
double | upperBound | ||
) |
Change the interval
lowerBound | First boundary |
upperBound | Second boundary |
Definition at line 91 of file qwt_scale_div.cpp.
void QwtScaleDiv::setLowerBound | ( | double | lowerBound | ) |
Set the first boundary
lowerBound | First boundary |
Definition at line 122 of file qwt_scale_div.cpp.
void QwtScaleDiv::setTicks | ( | int | tickType, |
const QList< double > & | ticks | ||
) |
Assign ticks
tickType | MinorTick, MediumTick or MajorTick |
ticks | Values of the tick positions |
Definition at line 297 of file qwt_scale_div.cpp.
void QwtScaleDiv::setUpperBound | ( | double | upperBound | ) |
Set the second boundary
upperBound | Second boundary |
Definition at line 142 of file qwt_scale_div.cpp.
QList< double > QwtScaleDiv::ticks | ( | int | tickType | ) | const |
Return a list of ticks
tickType | MinorTick, MediumTick or MajorTick |
Definition at line 309 of file qwt_scale_div.cpp.
double QwtScaleDiv::upperBound | ( | ) | const |
|
private |
Definition at line 96 of file qwt_scale_div.h.
|
private |
Definition at line 98 of file qwt_scale_div.h.
|
private |
Definition at line 97 of file qwt_scale_div.h.