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

QScatter3DSeries Class

The QScatter3DSeries class represents a data series in a 3D scatter graph.

This class was introduced in QtDataVisualization 1.0.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QScatter3DSeries Class

  • Header: QScatter3DSeries

  • 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-scatter3dseries.xml

  • Inherits: QAbstract3DSeries

Detailed Description

This class manages the series specific visual elements, as well as the series data (via a data proxy).

If no data proxy is set explicitly for the series, the series creates a default proxy. Setting another proxy will destroy the existing proxy and all data added to it.

QScatter3DSeries supports the following format tags for QAbstract3DSeries::setItemLabelFormat():

@xTitle

Title from x-axis

@yTitle

Title from y-axis

@zTitle

Title from z-axis

@xLabel

Item value formatted using the format of the x-axis. For more information, see QValue3DAxis::setLabelFormat().

@yLabel

Item value formatted using the format of the y-axis. For more information, see QValue3DAxis::setLabelFormat().

@zLabel

Item value formatted using the format of the z-axis. For more information, see QValue3DAxis::setLabelFormat().

@seriesName

Name of the series

For example:

 
Sélectionnez
proxy->setItemLabelFormat(QStringLiteral("@valueTitle for (@rowLabel, @colLabel): %.1f"));

See Also

Property Documentation

 

dataProxy : QScatterDataProxy*

This property holds the active data proxy.

Access functions:

Notifier signal:

  • void dataProxyChanged( *proxy)

itemSize : float

Item size for the series.

The size must be between 0.0f and 1.0f. Setting the size to 0.0f causes the item size to be automatically scaled based on the total number of items in all the series for the graph.

The preset default is 0.0f.

Access functions:

  • float itemSize() const

  • void setItemSize(float size)

Notifier signal:

  • void itemSizeChanged(float size)

selectedItem : int

This property holds the item that is selected in the series.

Access functions:

Notifier signal:

  • void selectedItemChanged(int index)

Member Function Documentation

 

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

Constructs a scatter 3D series with the parent parent.

[explicit] QScatter3DSeries::QScatter3DSeries(QScatterDataProxy *dataProxy, QObject *parent = nullptr)

Constructs a scatter 3D series with the data proxy dataProxy and the parent parent.

[virtual] QScatter3DSeries::~QScatter3DSeries()

Deletes the scatter 3D series.

[static] int QScatter3DSeries::invalidSelectionIndex()

Returns an invalid index for selection. This index is set to the selectedItem property to clear the selection from this series.

See Also

void QScatter3DSeries::setDataProxy(QScatterDataProxy *proxy)

Sets the active data proxy for the series to proxy. The series assumes ownership of any proxy set to it and deletes any previously set proxy when a new one is added. The proxy argument cannot be null or set to another series.

Setter function for property dataProxy.

See Also

See also dataProxy()

void QScatter3DSeries::setSelectedItem(int index)

Selects the item at the index index in the data array of the series. Only one item can be selected at a time.

To clear selection from this series, invalidSelectionIndex() is set as index. If this series is added to a graph, the graph can adjust the selection according to user interaction or if it becomes invalid. Selecting an item on another added series will also clear the selection.

Removing items from or inserting items to the series before the selected item will adjust the selection so that the same item will stay selected.

Setter function for property selectedItem.

See Also

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