QValue3DAxis Class
The QValue3DAxis class is used for manipulating an axis of a graph. More...
Header: | #include <QValue3DAxis> |
Since: | QtDataVisualization 1.0 |
Instantiated By: | ValueAxis3D |
Inherits: | QAbstract3DAxis |
Properties
|
|
- 10 properties inherited from QAbstract3DAxis
- 1 property inherited from QObject
Public Functions
QValue3DAxis(QObject *parent = Q_NULLPTR) | |
virtual | ~QValue3DAxis() |
QValue3DAxisFormatter * | formatter() const |
QString | labelFormat() const |
bool | reversed() const |
int | segmentCount() const |
void | setFormatter(QValue3DAxisFormatter *formatter) |
void | setLabelFormat(const QString &format) |
void | setReversed(bool enable) |
void | setSegmentCount(int count) |
void | setSubSegmentCount(int count) |
int | subSegmentCount() const |
- 19 public functions inherited from QAbstract3DAxis
- 31 public functions inherited from QObject
Signals
void | formatterChanged(QValue3DAxisFormatter *formatter) |
void | labelFormatChanged(const QString &format) |
void | reversedChanged(bool enable) |
void | segmentCountChanged(int count) |
void | subSegmentCountChanged(int count) |
- 10 signals inherited from QAbstract3DAxis
- 2 signals inherited from QObject
Additional Inherited Members
- 1 public slot inherited from QObject
- 11 static public members inherited from QObject
- 9 protected functions inherited from QObject
Detailed Description
The QValue3DAxis class is used for manipulating an axis of a graph.
QValue3DAxis provides an axis that can be given a range of values and segment and subsegment counts to divide the range into.
Labels are drawn between each segment. Grid lines are drawn between each segment and each subsegment.
Note: If visible, there will always be at least two grid lines and labels indicating the minimum and the maximum values of the range, as there is always at least one segment.
Property Documentation
formatter : QValue3DAxisFormatter *
Defines the axis formatter to be used. Any existing formatter is deleted when a new formatter is set.
This property was introduced in QtDataVisualization 1.1.
Access functions:
QValue3DAxisFormatter * | formatter() const |
void | setFormatter(QValue3DAxisFormatter *formatter) |
Notifier signal:
void | formatterChanged(QValue3DAxisFormatter *formatter) |
labelFormat : QString
Defines the label format to be used for the labels on this axis. How the format is interpreted depends on the axis formatter and the locale in use. Using the default formatter and default locale ("C"
), the formatting uses QString::sprintf(). Supported specifiers are: d, i, o, x, X, f, F, e, E, g, G, c
. See QString::sprintf() for additional details. For other locales, the default formatter uses reduced set of printf format specifiers: d, i, f, F, e, E, g, G
. In these cases, the only supported modifier is the precision modifier for the floating point and exponential formats. The decimal point and other locale dependent formatting is done according to the graph locale.
Usage example:
axis->setLabelFormat("%.2f mm");
Access functions:
QString | labelFormat() const |
void | setLabelFormat(const QString &format) |
Notifier signal:
void | labelFormatChanged(const QString &format) |
See also formatter and QAbstract3DGraph::locale.
reversed : bool
If true
, the axis will be rendered in reverse, i.e. the positions of minimum and maximum values are swapped when the graph is rendered. This property doesn't affect the actual minimum and maximum values of the axis.
This property was introduced in QtDataVisualization 1.1.
Access functions:
bool | reversed() const |
void | setReversed(bool enable) |
Notifier signal:
void | reversedChanged(bool enable) |
segmentCount : int
Defines the number of segments on the axis. This indicates how many labels are drawn. The number of grid lines to be drawn is calculated with formula: segments * subsegments + 1
. The preset default is 5
, and it can not be below 1
.
Access functions:
int | segmentCount() const |
void | setSegmentCount(int count) |
Notifier signal:
void | segmentCountChanged(int count) |
See also setSubSegmentCount().
subSegmentCount : int
Defines the number of subsegments inside each segment on the axis. Grid lines are drawn between each subsegment, in addition to each segment. The preset default is 1
, and it can not be below 1
.
Access functions:
int | subSegmentCount() const |
void | setSubSegmentCount(int count) |
Notifier signal:
void | subSegmentCountChanged(int count) |
See also setSegmentCount().
Member Function Documentation
QValue3DAxis::QValue3DAxis(QObject *parent = Q_NULLPTR)
Constructs QValue3DAxis with the given parent.
[virtual]
QValue3DAxis::~QValue3DAxis()
Destroys QValue3DAxis.
© 2017 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.