QLogValueAxis Class
The QLogValueAxis class adds a logarithmic scale to a chart's axis. 更多...
头文件: | #include <QLogValueAxis> |
Instantiated By: | LogValueAxis |
基类: | QAbstractAxis |
属性
|
|
- 27 个属性继承自 QAbstractAxis
- 1 个属性继承自 QObject
公有函数
QLogValueAxis(QObject *parent = Q_NULLPTR) | |
~QLogValueAxis() | |
qreal | base() const |
QString | labelFormat() const |
qreal | max() const |
qreal | min() const |
int | minorTickCount() const |
void | setBase(qreal base) |
void | setLabelFormat(const QString &format) |
void | setMax(qreal max) |
void | setMin(qreal min) |
void | setMinorTickCount(int minorTickCount) |
void | setRange(qreal min, qreal max) |
int | tickCount() const |
重新实现的公有函数
virtual AxisType | type() const |
- 58 个公有函数继承自 QAbstractAxis
- 32 个公有函数继承自 QObject
信号
void | baseChanged(qreal base) |
void | labelFormatChanged(const QString &format) |
void | maxChanged(qreal max) |
void | minChanged(qreal min) |
void | minorTickCountChanged(int minorTickCount) |
void | rangeChanged(qreal min, qreal max) |
void | tickCountChanged(int tickCount) |
- 25 个信号继承自 QAbstractAxis
- 2 个信号继承自 QObject
其他继承的成员
- 1 个公有槽函数继承自 QObject
- 1 个公有变量继承自 QObject
- 10 个静态公有成员继承自 QObject
- 9 个受保护的函数继承自 QObject
- 2 个受保护的变量继承自 QObject
详细描述
The QLogValueAxis class adds a logarithmic scale to a chart's axis.
A logarithmic scale is a nonlinear scale that is based on orders of magnitude, so that each tick mark on the axis is the previous tick mark multiplied by a value.
Note: If QLogValueAxis is attached to a series with one or more points with negative or zero values on the associated dimension, the series will not be plotted at all. This is particularly relevant when XYModelMappers are used, since empty cells in models typically contain zero values.
属性
base : qreal
This property holds the base of the logarithm.
The value has to be greater than 0 and cannot equal 1.
访问函数:
qreal | base() const |
void | setBase(qreal base) |
Notifier signal:
void | baseChanged(qreal base) |
labelFormat : QString
This property holds the label format of the axis.
The format string supports the following conversion specifiers, length modifiers, and flags provided by printf()
in the standard C++ library: d, i, o, x, X, f, F, e, E, g, G, c.
If QChart::localizeNumbers is true
, the supported specifiers are limited to: d, e, E, f, g, G, and i. Also, only the precision modifier is supported. The rest of the formatting comes from the default QLocale of the application.
访问函数:
QString | labelFormat() const |
void | setLabelFormat(const QString &format) |
Notifier signal:
void | labelFormatChanged(const QString &format) |
参见 QString::asprintf().
max : qreal
This property holds the maximum value on the axis.
When setting this property, the minimum value is adjusted if necessary, to ensure that the range remains valid. The value has to be greater than 0.
访问函数:
qreal | max() const |
void | setMax(qreal max) |
Notifier signal:
void | maxChanged(qreal max) |
min : qreal
This property holds the minimum value on the axis.
When setting this property, the maximum value is adjusted if necessary, to ensure that the range remains valid. The value has to be greater than 0.
访问函数:
qreal | min() const |
void | setMin(qreal min) |
Notifier signal:
void | minChanged(qreal min) |
minorTickCount : int
This property holds the number of minor tick marks on the axis. This indicates how many grid lines are drawn between major ticks on the chart. Labels are not drawn for minor ticks. The default value is 0. Set the value to -1 and the number of grid lines between major ticks will be calculated automatically.
访问函数:
int | minorTickCount() const |
void | setMinorTickCount(int minorTickCount) |
Notifier signal:
void | minorTickCountChanged(int minorTickCount) |
tickCount : const int
This property holds the number of tick marks on the axis. This indicates how many grid lines are drawn on the chart. This value is read-only.
访问函数:
int | tickCount() const |
Notifier signal:
void | tickCountChanged(int tickCount) |
成员函数
QLogValueAxis::QLogValueAxis(QObject *parent = Q_NULLPTR)
Constructs an axis object that is a child of parent.
QLogValueAxis::~QLogValueAxis()
Destroys the object.
[signal]
void QLogValueAxis::baseChanged(qreal base)
This signal is emitted when the base of the logarithm of the axis changes.
Note: Notifier signal for property base.
[signal]
void QLogValueAxis::labelFormatChanged(const QString &format)
This signal is emitted when the format of axis labels changes.
Note: Notifier signal for property labelFormat.
[signal]
void QLogValueAxis::maxChanged(qreal max)
This signal is emitted when the maximum value of the axis, specified by max, changes.
Note: Notifier signal for property max.
[signal]
void QLogValueAxis::minChanged(qreal min)
This signal is emitted when the minimum value of the axis, specified by min, changes.
Note: Notifier signal for property min.
[signal]
void QLogValueAxis::minorTickCountChanged(int minorTickCount)
This signal is emitted when the number of minor tick marks on the axis, specified by minorTickCount, changes.
Note: Notifier signal for property minorTickCount.
[signal]
void QLogValueAxis::rangeChanged(qreal min, qreal max)
This signal is emitted when the minimum or maximum value of the axis, specified by min and max, changes.
void QLogValueAxis::setRange(qreal min, qreal max)
Sets the range from min to max on the axis. If min is greater than max, this function returns without making any changes.
[signal]
void QLogValueAxis::tickCountChanged(int tickCount)
This signal is emitted when the number of tick marks on the axis, specified by tickCount, changes.
Note: Notifier signal for property tickCount.
[virtual]
AxisType QLogValueAxis::type() const
Reimplemented from QAbstractAxis::type().
Returns the type of the axis.