IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QValue3DAxis Class

The QValue3DAxis class manipulates an axis of a graph.

This class was introduced in QtDataVisualization 1.0.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QValue3DAxis Class

  • Header: QValue3DAxis

  • Since: QtDataVisualization 1.0

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS DataVisualization)

    target_link_libraries(mytarget PRIVATE Qt6::DataVisualization)

  • qmake: QT += datavisualization

  • Inherited By:

  • Instantiated By: qml-qtdatavisualization-valueaxis3d.xml

  • Inherits: QAbstract3DAxis

Detailed Description

A value axis 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.

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

 

[since QtDataVisualization 1.1] formatter : QValue3DAxisFormatter*

This property holds 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:

  • *formatter() const

  • void setFormatter( *formatter)

Notifier signal:

  • void formatterChanged( *formatter)

labelFormat : QString

This property holds the label format to be used for the labels on this 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 QAbstract3DGraph::locale is anything else than "C", 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.

Usage example:

axis->setLabelFormat("%.2f mm");

Access functions:

  • labelFormat() const

  • void setLabelFormat(const &format)

Notifier signal:

  • void labelFormatChanged(const &format)

See Also

[since QtDataVisualization 1.1] reversed : bool

This property holds whether the axis is rendered in reverse.

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

This property holds 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. The value cannot be below 1.

Access functions:

  • int segmentCount() const

  • void setSegmentCount(int count)

Notifier signal:

  • void segmentCountChanged(int count)

See Also

See also setSubSegmentCount()

subSegmentCount : int

This property holds 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. The value cannot be below 1.

Access functions:

  • int subSegmentCount() const

  • void setSubSegmentCount(int count)

Notifier signal:

  • void subSegmentCountChanged(int count)

See Also

See also setSegmentCount()

Member Function Documentation

 

[explicit] QValue3DAxis::QValue3DAxis(QObject *parent = nullptr)

Constructs QValue3DAxis with the given parent.

[virtual] QValue3DAxis::~QValue3DAxis()

Destroys QValue3DAxis.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+