|
QWT API (English) 7.0.1
Qt Widget Library for Technical Applications - English API Documentation
|
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) | |
| Construct a division without ticks. | |
| QwtScaleDiv (const QwtInterval &, QList< double >[NTickTypes]) | |
| Construct a scale division. | |
| QwtScaleDiv (double lowerBound, double upperBound, QList< double >[NTickTypes]) | |
| Construct a scale division. | |
| QwtScaleDiv (double lowerBound, double upperBound, const QList< double > &minorTicks, const QList< double > &mediumTicks, const QList< double > &majorTicks) | |
| Construct a scale division. | |
| bool | operator== (const QwtScaleDiv &) const |
| Equality operator. | |
| bool | operator!= (const QwtScaleDiv &) const |
| Inequality operator. | |
| bool | fuzzyCompare (const QwtScaleDiv &other) const |
| Fuzzy comparison. | |
| void | setInterval (double lowerBound, double upperBound) |
| Change the interval. | |
| void | setInterval (const QwtInterval &) |
| Change the interval. | |
| QwtInterval | interval () const |
| Get the interval from lowerBound to upperBound. | |
| void | setLowerBound (double) |
| Set the first boundary. | |
| double | lowerBound () const |
| Get the first boundary. | |
| void | setUpperBound (double) |
| Set the second boundary. | |
| double | upperBound () const |
| Get the upper bound. | |
| double | range () const |
| Get the range (upperBound - lowerBound) | |
| bool | contains (double value) const |
| Check if a value is between lowerBound() and upperBound() | |
| void | setTicks (int tickType, const QList< double > &) |
| Assign ticks. | |
| QList< double > | ticks (int tickType) const |
| Return a list of ticks. | |
| bool | isEmpty () const |
| Check if the scale division is empty. | |
| bool | isIncreasing () const |
| Check if the scale division is increasing. | |
| void | invert () |
| Invert the scale division. | |
| QwtScaleDiv | inverted () const |
| Get a scale division with inverted boundaries and ticks. | |
| QwtScaleDiv | bounded (double lowerBound, double upperBound) const |
| Return a scale division with an interval [lowerBound, upperBound] where all ticks outside this interval are removed. | |
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.
Qwt 刻度由其边界以及分别表示主刻度、中刻度和次刻度位置的三个列表定义。
upperBound() 可能小于 lowerBound(),以此表示刻度是反向的。
刻度划分可通过 QwtScaleEngine 计算得出。
|
explicit |
Construct a division without ticks.
|
explicit |
Construct a scale division.
|
explicit |
Construct a scale division.
|
explicit |
Construct a scale division.
| 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.
| bool QwtScaleDiv::contains | ( | double | value | ) | const |
Check if a value is between lowerBound() and upperBound()
| bool QwtScaleDiv::fuzzyCompare | ( | const QwtScaleDiv & | other | ) | const |
Fuzzy comparison.
| QwtInterval QwtScaleDiv::interval | ( | ) | const |
Get the interval from lowerBound to upperBound.
| void QwtScaleDiv::invert | ( | ) |
Invert the scale division.
| QwtScaleDiv QwtScaleDiv::inverted | ( | ) | const |
Get a scale division with inverted boundaries and ticks.
| bool QwtScaleDiv::isEmpty | ( | ) | const |
Check if the scale division is empty.
| bool QwtScaleDiv::isIncreasing | ( | ) | const |
Check if the scale division is increasing.
| double QwtScaleDiv::lowerBound | ( | ) | const |
Get the first boundary.
| bool QwtScaleDiv::operator!= | ( | const QwtScaleDiv & | other | ) | const |
Inequality operator.
| bool QwtScaleDiv::operator== | ( | const QwtScaleDiv & | other | ) | const |
Equality operator.
| double QwtScaleDiv::range | ( | ) | const |
Get the range (upperBound - lowerBound)
| void QwtScaleDiv::setInterval | ( | const QwtInterval & | interval | ) |
Change the interval.
| void QwtScaleDiv::setInterval | ( | double | lowerBound, |
| double | upperBound | ||
| ) |
Change the interval.
| void QwtScaleDiv::setLowerBound | ( | double | lowerBound | ) |
Set the first boundary.
| void QwtScaleDiv::setTicks | ( | int | tickType, |
| const QList< double > & | ticks | ||
| ) |
Assign ticks.
| void QwtScaleDiv::setUpperBound | ( | double | upperBound | ) |
Set the second boundary.
| QList< double > QwtScaleDiv::ticks | ( | int | tickType | ) | const |
Return a list of ticks.
| double QwtScaleDiv::upperBound | ( | ) | const |
Get the upper bound.