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 (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. More... | |
bool | operator!= (const QwtScaleDiv &) const |
Inequality. More... | |
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 upperLimit() might be smaller than the lowerLimit() to indicate inverted scales.
Scale divisions can be calculated from a QwtScaleEngine.
|
explicit |
Construct a division without ticks
lowerBound | First boundary |
upperBound | Second boundary |
|
explicit |
Construct a scale division
interval | Interval |
ticks | List of major, medium and minor ticks |
|
explicit |
Construct a scale division
lowerBound | First boundary |
upperBound | Second boundary |
ticks | List of major, medium and minor ticks |
|
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 |
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 |
bool QwtScaleDiv::contains | ( | double | value | ) | const |
QwtInterval QwtScaleDiv::interval | ( | ) | const |
void QwtScaleDiv::invert | ( | ) |
Invert the scale division
QwtScaleDiv QwtScaleDiv::inverted | ( | ) | const |
double QwtScaleDiv::lowerBound | ( | ) | const |
bool QwtScaleDiv::operator!= | ( | const QwtScaleDiv & | other | ) | const |
Inequality.
bool QwtScaleDiv::operator== | ( | const QwtScaleDiv & | other | ) | const |
Equality operator.
double QwtScaleDiv::range | ( | ) | const |
void QwtScaleDiv::setInterval | ( | double | lowerBound, |
double | upperBound | ||
) |
Change the interval
lowerBound | First boundary |
upperBound | Second boundary |
void QwtScaleDiv::setInterval | ( | const QwtInterval & | interval | ) |
Change the interval
interval | Interval |
void QwtScaleDiv::setLowerBound | ( | double | lowerBound | ) |
void QwtScaleDiv::setTicks | ( | int | type, |
const QList< double > & | ticks | ||
) |
Assign ticks
type | MinorTick, MediumTick or MajorTick |
ticks | Values of the tick positions |
void QwtScaleDiv::setUpperBound | ( | double | upperBound | ) |
QList< double > QwtScaleDiv::ticks | ( | int | type | ) | const |
Return a list of ticks
type | MinorTick, MediumTick or MajorTick |
double QwtScaleDiv::upperBound | ( | ) | const |