A class representing a scale division
更多...
#include <qwt_scale_div.h>
|
| | 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
|
| |
|
| QwtScaleDiv (const QwtScaleDiv &) |
| | Copy constructor
|
| |
|
| QwtScaleDiv (QwtScaleDiv &&) noexcept=default |
| |
|
QwtScaleDiv & | operator= (const QwtScaleDiv &) |
| | Copy assignment
|
| |
|
QwtScaleDiv & | operator= (QwtScaleDiv &&) noexcept=default |
| |
| 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) noexcept |
| | Set the first boundary
|
| |
| double | lowerBound () const noexcept |
| | Get the first boundary
|
| |
| void | setUpperBound (double) noexcept |
| | Set the second boundary
|
| |
| double | upperBound () const noexcept |
| | Get the upper bound
|
| |
| double | range () const noexcept |
| | 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.
- 参见
- QwtScaleEngine::divideScale(), QwtPlot::setAxisScaleDiv(), QwtAbstractSlider::setScaleDiv()
◆ TickType
Scale tick types
| 枚举值 |
|---|
| NoTick | No ticks
|
| MinorTick | Minor ticks
|
| MediumTick | Medium ticks
|
| MajorTick | Major ticks
|
| NTickTypes | Number of valid tick types
|
◆ QwtScaleDiv() [1/4]
| QwtScaleDiv::QwtScaleDiv |
( |
double |
lowerBound = 0.0, |
|
|
double |
upperBound = 0.0 |
|
) |
| |
|
explicit |
Construct a division without ticks
- 参数
-
| lowerBound | First boundary |
| upperBound | Second boundary |
- 注解
- lowerBound might be greater than upperBound for inverted scales
◆ QwtScaleDiv() [2/4]
| QwtScaleDiv::QwtScaleDiv |
( |
const QwtInterval & |
interval, |
|
|
QList< double > |
ticks[NTickTypes] |
|
) |
| |
|
explicit |
Construct a scale division
- 参数
-
| interval | Interval |
| ticks | List of major, medium and minor ticks |
◆ QwtScaleDiv() [3/4]
| QwtScaleDiv::QwtScaleDiv |
( |
double |
lowerBound, |
|
|
double |
upperBound, |
|
|
QList< double > |
ticks[NTickTypes] |
|
) |
| |
|
explicit |
Construct a scale division
- 参数
-
| lowerBound | First boundary |
| upperBound | Second boundary |
| ticks | List of major, medium and minor ticks |
- 注解
- lowerBound might be greater than upperBound for inverted scales
◆ QwtScaleDiv() [4/4]
| QwtScaleDiv::QwtScaleDiv |
( |
double |
lowerBound, |
|
|
double |
upperBound, |
|
|
const QList< double > & |
minorTicks, |
|
|
const QList< double > & |
mediumTicks, |
|
|
const QList< double > & |
majorTicks |
|
) |
| |
|
explicit |
Construct a scale division
- 参数
-
| lowerBound | First boundary |
| upperBound | Second boundary |
| minorTicks | List of minor ticks |
| mediumTicks | List of medium ticks |
| majorTicks | List of major ticks |
- 注解
- lowerBound might be greater than upperBound for inverted scales
◆ bounded()
| 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 |
- 返回
- Scale division with all ticks inside of the given interval
- 注解
- lowerBound might be greater than upperBound for inverted scales
◆ contains()
| bool QwtScaleDiv::contains |
( |
double |
value | ) |
const |
◆ fuzzyCompare()
| bool QwtScaleDiv::fuzzyCompare |
( |
const QwtScaleDiv & |
other | ) |
const |
Fuzzy comparison
- 参数
-
| other | Other scale division |
- 返回
- true if this instance is approximately equal to other
◆ interval()
Get the interval from lowerBound to upperBound
- 返回
- Interval from lowerBound to upperBound
◆ invert()
| void QwtScaleDiv::invert |
( |
| ) |
|
◆ inverted()
Get a scale division with inverted boundaries and ticks
- 返回
- A scale division with inverted boundaries and ticks
- 参见
- invert()
◆ isEmpty()
| bool QwtScaleDiv::isEmpty |
( |
| ) |
const |
◆ isIncreasing()
| bool QwtScaleDiv::isIncreasing |
( |
| ) |
const |
◆ lowerBound()
| double QwtScaleDiv::lowerBound |
( |
| ) |
const |
|
noexcept |
◆ operator!=()
| bool QwtScaleDiv::operator!= |
( |
const QwtScaleDiv & |
other | ) |
const |
Inequality operator
- 返回
- true if this instance is not equal to other
◆ operator==()
| bool QwtScaleDiv::operator== |
( |
const QwtScaleDiv & |
other | ) |
const |
Equality operator
- 返回
- true if this instance is equal to other
◆ range()
| double QwtScaleDiv::range |
( |
| ) |
const |
|
noexcept |
◆ setInterval() [1/2]
| void QwtScaleDiv::setInterval |
( |
const QwtInterval & |
interval | ) |
|
◆ setInterval() [2/2]
| void QwtScaleDiv::setInterval |
( |
double |
lowerBound, |
|
|
double |
upperBound |
|
) |
| |
Change the interval
- 参数
-
| lowerBound | First boundary |
| upperBound | Second boundary |
- 注解
- lowerBound might be greater than upperBound for inverted scales
◆ setLowerBound()
| void QwtScaleDiv::setLowerBound |
( |
double |
lowerBound | ) |
|
|
noexcept |
◆ setTicks()
| void QwtScaleDiv::setTicks |
( |
int |
tickType, |
|
|
const QList< double > & |
ticks |
|
) |
| |
Assign ticks
- 参数
-
| tickType | MinorTick, MediumTick or MajorTick |
| ticks | Values of the tick positions |
◆ setUpperBound()
| void QwtScaleDiv::setUpperBound |
( |
double |
upperBound | ) |
|
|
noexcept |
◆ ticks()
| QList< double > QwtScaleDiv::ticks |
( |
int |
tickType | ) |
const |
Return a list of ticks
- 参数
-
| tickType | MinorTick, MediumTick or MajorTick |
- 返回
- Tick list
◆ upperBound()
| double QwtScaleDiv::upperBound |
( |
| ) |
const |
|
noexcept |
该类的文档由以下文件生成:
- /home/runner/work/QWT/QWT/src/core/qwt_scale_div.h
- /home/runner/work/QWT/QWT/src/core/qwt_scale_div.cpp