QBarDataProxy Class
The QBarDataProxy class is the data proxy for a 3D bars graph. More...
Header: | #include <QBarDataProxy> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS DataVisualization) target_link_libraries(mytarget PRIVATE Qt6::DataVisualization) |
qmake: | QT += datavisualization |
Since: | QtDataVisualization 1.0 |
Instantiated By: | BarDataProxy |
Inherits: | QAbstractDataProxy |
Inherited By: |
Properties
- columnLabels : QStringList
- rowCount : const int
- rowLabels : QStringList
- series : QBar3DSeries* const
Public Functions
virtual | ~QBarDataProxy() |
const QBarDataArray * | array() const |
QStringList | columnLabels() const |
void | resetArray() |
int | rowCount() const |
QStringList | rowLabels() const |
QBar3DSeries * | series() const |
void | setColumnLabels() |
void | setRowLabels() |
Signals
void | arrayReset() |
void | columnLabelsChanged() |
void | rowCountChanged() |
void | rowLabelsChanged() |
void | seriesChanged() |
Related Non-Members
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() |
Notifier signal:
void | columnLabelsChanged() |
[read-only]
rowCount : const int
This property holds the number of rows in the array.
Access functions:
int | rowCount() const |
Notifier signal:
void | rowCountChanged() |
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() |
Notifier signal:
void | rowLabelsChanged() |
[read-only]
series : QBar3DSeries* const
This property holds the series this proxy is attached to.
Access functions:
QBar3DSeries * | series() const |
Notifier signal:
void | seriesChanged() |
Member Function Documentation
[virtual]
QBarDataProxy::~QBarDataProxy()
Deletes the bar data proxy.
const QBarDataArray *QBarDataProxy::array() const
Returns the pointer to the data array.
[signal]
void QBarDataProxy::arrayReset()
This signal is emitted when the data array is reset. If the contents of the whole array are changed without calling resetArray(), this signal needs to be emitted to update the graph.
void QBarDataProxy::resetArray()
Clears the existing array and row and column labels.
Related Non-Members
QBarDataArray
A list of pointers to QBarDataRow objects.
QBarDataRow
A list of QBarDataItem objects.