QScatter3DSeries Class

Base series class for Q3DScatter. More...

Header: #include <QScatter3DSeries>
Since: QtDataVisualization 1.0
Instantiated By: Scatter3DSeries
Inherits: QAbstract3DSeries

Properties

Public Functions

QScatter3DSeries(QObject *parent = Q_NULLPTR)
QScatter3DSeries(QScatterDataProxy *dataProxy, QObject *parent = Q_NULLPTR)
virtual ~QScatter3DSeries()
QScatterDataProxy *dataProxy() const
float itemSize() const
int selectedItem() const
void setDataProxy(QScatterDataProxy *proxy)
void setItemSize(float size)
void setSelectedItem(int index)

Signals

void dataProxyChanged(QScatterDataProxy *proxy)
void itemSizeChanged(float size)
void selectedItemChanged(int index)

Static Public Members

  • 10 static public members inherited from QObject

Additional Inherited Members

  • 1 public slot inherited from QObject
  • 1 public variable inherited from QObject
  • 9 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

Base series class for Q3DScatter.

QScatter3DSeries manages the series specific visual elements, as well as series data (via 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():

@xTitleTitle from X axis
@yTitleTitle from Y axis
@zTitleTitle from Z axis
@xLabelItem value formatted using the same format the X axis attached to the graph uses, see QValue3DAxis::setLabelFormat() for more information.
@yLabelItem value formatted using the same format the Y axis attached to the graph uses, see QValue3DAxis::setLabelFormat() for more information.
@zLabelItem value formatted using the same format the Z axis attached to the graph uses, see QValue3DAxis::setLabelFormat() for more information.
@seriesNameName of the series

For example:


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

See also Qt Data Visualization Data Handling.

Property Documentation

dataProxy : QScatterDataProxy *

This property holds the active data 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 cannot be null or set to another series.

Access functions:

QScatterDataProxy *dataProxy() const
void setDataProxy(QScatterDataProxy *proxy)

Notifier signal:

void dataProxyChanged(QScatterDataProxy *proxy)

itemSize : float

Set item size for the series. Size must be between 0.0f and 1.0f. Setting the size to 0.0f causes item size to be automatically scaled based on combined item count in all the series for the graph. Preset default is 0.0f.

Access functions:

float itemSize() const
void setItemSize(float size)

Notifier signal:

void itemSizeChanged(float size)

selectedItem : int

Selects an item at the index. The index is the index in the data array of the series. Only one item can be selected at a time. To clear selection from this series, set invalidSelectionIndex() as the 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.

Access functions:

int selectedItem() const
void setSelectedItem(int index)

Notifier signal:

void selectedItemChanged(int index)

See also QAbstract3DGraph::clearSelection().

Member Function Documentation

QScatter3DSeries::QScatter3DSeries(QObject *parent = Q_NULLPTR)

Constructs QScatter3DSeries with the given parent.

QScatter3DSeries::QScatter3DSeries(QScatterDataProxy *dataProxy, QObject *parent = Q_NULLPTR)

Constructs QScatter3DSeries with the given dataProxy and the parent.

[virtual] QScatter3DSeries::~QScatter3DSeries()

Destroys QScatter3DSeries.

[static] int QScatter3DSeries::invalidSelectionIndex()

Returns an invalid index for selection. Set this index to selectedItem property if you want to clear the selection from this series.

See also QAbstract3DGraph::clearSelection().