diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2013-09-10 16:26:11 +0300 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2013-09-11 10:42:53 +0300 |
commit | d93f5f3b64fdb52cc150232f6b6d80ffdb57db78 (patch) | |
tree | 4a99ecc02c2e885b56abb1082527e482967b84f8 /src/datavisualization/data/qbardataproxy_p.h | |
parent | d315336b202ec1c1260f96945a23fde6d2c41b69 (diff) |
QBarDataProxy now has list of row and column labels
Category axes use those labels if no explicit labels are set to them.
+ Other misc fixes
Task-number: QTRD-2252
Change-Id: Idc15e0cc1cdeb08195b2e2baeead9cfef2533e04
Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'src/datavisualization/data/qbardataproxy_p.h')
-rw-r--r-- | src/datavisualization/data/qbardataproxy_p.h | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/datavisualization/data/qbardataproxy_p.h b/src/datavisualization/data/qbardataproxy_p.h index ab64c4a1..6aa9d2cb 100644 --- a/src/datavisualization/data/qbardataproxy_p.h +++ b/src/datavisualization/data/qbardataproxy_p.h @@ -42,23 +42,29 @@ public: QBarDataProxyPrivate(QBarDataProxy *q); virtual ~QBarDataProxyPrivate(); - bool resetArray(QBarDataArray *newArray); - void setRow(int rowIndex, QBarDataRow *row); - void setRows(int rowIndex, const QBarDataArray &rows); + bool resetArray(QBarDataArray *newArray, const QStringList *rowLabels, + const QStringList *columnLabels); + void setRow(int rowIndex, QBarDataRow *row, const QString *label); + void setRows(int rowIndex, const QBarDataArray &rows, const QStringList *labels); void setItem(int rowIndex, int columnIndex, const QBarDataItem &item); - int addRow(QBarDataRow *row); - int addRows(const QBarDataArray &rows); - void insertRow(int rowIndex, QBarDataRow *row); - void insertRows(int rowIndex, const QBarDataArray &rows); - void removeRows(int rowIndex, int removeCount); + int addRow(QBarDataRow *row, const QString *label); + int addRows(const QBarDataArray &rows, const QStringList *labels); + void insertRow(int rowIndex, QBarDataRow *row, const QString *label); + void insertRows(int rowIndex, const QBarDataArray &rows, const QStringList *labels); + void removeRows(int rowIndex, int removeCount, bool removeLabels); - QPair<GLfloat, GLfloat> limitValues(int startRow, int startColumn, int rowCount, int columnCount); + QPair<GLfloat, GLfloat> limitValues(int startRow, int startColumn, int rowCount, + int columnCount); private: + QBarDataProxy *qptr(); void clearRow(int rowIndex); void clearArray(); + void fixRowLabels(int startIndex, int count, const QStringList &newLabels, bool isInsert); QBarDataArray *m_dataArray; + QStringList m_rowLabels; + QStringList m_columnLabels; private: friend class QBarDataProxy; |