QBarDataProxy Class

The QBarDataProxy class is the data proxy for a 3D bars graph. More...

Header: #include <QBarDataProxy>
qmake: QT += datavisualization
Since: QtDataVisualization 1.0
Instantiated By: BarDataProxy
Inherits: QAbstractDataProxy
Inherited By:

QItemModelBarDataProxy

This class was introduced in QtDataVisualization 1.0.

Properties

Public Functions

QStringList columnLabels() const
int rowCount() const
QStringList rowLabels() const
QBar3DSeries *series() const
void setColumnLabels(const QStringList &labels)
void setRowLabels(const QStringList &labels)

Signals

void columnLabelsChanged()
void rowCountChanged(int count)
void rowLabelsChanged()
void seriesChanged(QBar3DSeries *series)
typedef QBarDataArray
typedef QBarDataRow

Detailed Description

A bar data proxy handles adding, inserting, changing, and removing rows of data.

The data array is a list of vectors (rows) of QBarDataItem instances. Each row can contain a different number of items or even be null.

QBarDataProxy takes ownership of all QtDataVisualization::QBarDataRow objects passed to it, whether directly or in a QtDataVisualization::QBarDataArray container. If bar data row pointers are used to directly modify data after adding the array to the proxy, the appropriate signal must be emitted to update the graph.

QBarDataProxy optionally keeps track of row and column labels, which QCategory3DAxis can utilize to show axis labels. The row and column labels are stored in a separate array from the data and row manipulation methods provide alternate versions that do not affect the row labels. This enables the option of having row labels that relate to the position of the data in the array rather than the data itself.

See also Qt Data Visualization Data Handling.

Property Documentation

columnLabels : QStringList

This property holds the optional column labels for the array.

Indexes in this array match column indexes in rows. If the list is shorter than the longest row, all columns will not get labels.

Access functions:

QStringList columnLabels() const
void setColumnLabels(const QStringList &labels)

Notifier signal:

void columnLabelsChanged()

rowCount : const int

This property holds the number of rows in the array.

Access functions:

int rowCount() const

Notifier signal:

void rowCountChanged(int count)

rowLabels : QStringList

This property holds the optional row labels for the array.

Indexes in this array match the row indexes in the data array. If the list is shorter than the number of rows, all rows will not get labels.

Access functions:

QStringList rowLabels() const
void setRowLabels(const QStringList &labels)

Notifier signal:

void rowLabelsChanged()

series : QBar3DSeries* const

This property holds the series this proxy is attached to.

Access functions:

QBar3DSeries *series() const

Notifier signal:

void seriesChanged(QBar3DSeries *series)

Related Non-Members

typedef QBarDataArray

A list of pointers to QBarDataRow objects.

typedef QBarDataRow

A vector of QBarDataItem objects.