diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2014-05-12 11:10:46 +0300 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2014-05-12 12:26:20 +0300 |
commit | 4dcef4be656aedb7c6c9e222f291a1a508641007 (patch) | |
tree | 1fe53e7b4ddba8c8ac719f95c04eac298cb22dc3 /src/datavisualization/data/qitemmodelsurfacedataproxy.h | |
parent | 8e97d823208ed314278a22a924f0da10c9328839 (diff) |
Enable mapping single role to multiple properties for surface
Task-number: QTRD-3074
Change-Id: If40de067526b6f24b3e55bf64ed804a79d473e5f
Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Reviewed-by: Titta Heikkala <titta.heikkala@digia.com>
Diffstat (limited to 'src/datavisualization/data/qitemmodelsurfacedataproxy.h')
-rw-r--r-- | src/datavisualization/data/qitemmodelsurfacedataproxy.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/datavisualization/data/qitemmodelsurfacedataproxy.h b/src/datavisualization/data/qitemmodelsurfacedataproxy.h index b1ebbeed..8fe736f5 100644 --- a/src/datavisualization/data/qitemmodelsurfacedataproxy.h +++ b/src/datavisualization/data/qitemmodelsurfacedataproxy.h @@ -22,6 +22,7 @@ #include <QtDataVisualization/qsurfacedataproxy.h> #include <QtCore/QAbstractItemModel> #include <QtCore/QStringList> +#include <QtCore/QRegExp> QT_BEGIN_NAMESPACE_DATAVISUALIZATION @@ -41,6 +42,16 @@ class QT_DATAVISUALIZATION_EXPORT QItemModelSurfaceDataProxy : public QSurfaceDa Q_PROPERTY(bool useModelCategories READ useModelCategories WRITE setUseModelCategories NOTIFY useModelCategoriesChanged) Q_PROPERTY(bool autoRowCategories READ autoRowCategories WRITE setAutoRowCategories NOTIFY autoRowCategoriesChanged) Q_PROPERTY(bool autoColumnCategories READ autoColumnCategories WRITE setAutoColumnCategories NOTIFY autoColumnCategoriesChanged) + Q_PROPERTY(QRegExp rowRolePattern READ rowRolePattern WRITE setRowRolePattern NOTIFY rowRolePatternChanged REVISION 1) + Q_PROPERTY(QRegExp columnRolePattern READ columnRolePattern WRITE setColumnRolePattern NOTIFY columnRolePatternChanged REVISION 1) + Q_PROPERTY(QRegExp xPosRolePattern READ xPosRolePattern WRITE setXPosRolePattern NOTIFY xPosRolePatternChanged REVISION 1) + Q_PROPERTY(QRegExp yPosRolePattern READ yPosRolePattern WRITE setYPosRolePattern NOTIFY yPosRolePatternChanged REVISION 1) + Q_PROPERTY(QRegExp zPosRolePattern READ zPosRolePattern WRITE setZPosRolePattern NOTIFY zPosRolePatternChanged REVISION 1) + Q_PROPERTY(QString rowRoleReplace READ rowRoleReplace WRITE setRowRoleReplace NOTIFY rowRoleReplaceChanged REVISION 1) + Q_PROPERTY(QString columnRoleReplace READ columnRoleReplace WRITE setColumnRoleReplace NOTIFY columnRoleReplaceChanged REVISION 1) + Q_PROPERTY(QString xPosRoleReplace READ xPosRoleReplace WRITE setXPosRoleReplace NOTIFY xPosRoleReplaceChanged REVISION 1) + Q_PROPERTY(QString yPosRoleReplace READ yPosRoleReplace WRITE setYPosRoleReplace NOTIFY yPosRoleReplaceChanged REVISION 1) + Q_PROPERTY(QString zPosRoleReplace READ zPosRoleReplace WRITE setZPosRoleReplace NOTIFY zPosRoleReplaceChanged REVISION 1) public: explicit QItemModelSurfaceDataProxy(QObject *parent = 0); @@ -99,6 +110,28 @@ public: Q_INVOKABLE int rowCategoryIndex(const QString& category); Q_INVOKABLE int columnCategoryIndex(const QString& category); + void setRowRolePattern(const QRegExp &pattern); + QRegExp rowRolePattern() const; + void setColumnRolePattern(const QRegExp &pattern); + QRegExp columnRolePattern() const; + void setXPosRolePattern(const QRegExp &pattern); + QRegExp xPosRolePattern() const; + void setYPosRolePattern(const QRegExp &pattern); + QRegExp yPosRolePattern() const; + void setZPosRolePattern(const QRegExp &pattern); + QRegExp zPosRolePattern() const; + + void setRowRoleReplace(const QString &replace); + QString rowRoleReplace() const; + void setColumnRoleReplace(const QString &replace); + QString columnRoleReplace() const; + void setXPosRoleReplace(const QString &replace); + QString xPosRoleReplace() const; + void setYPosRoleReplace(const QString &replace); + QString yPosRoleReplace() const; + void setZPosRoleReplace(const QString &replace); + QString zPosRoleReplace() const; + signals: void itemModelChanged(const QAbstractItemModel* itemModel); void rowRoleChanged(const QString &role); @@ -111,6 +144,16 @@ signals: void useModelCategoriesChanged(bool enable); void autoRowCategoriesChanged(bool enable); void autoColumnCategoriesChanged(bool enable); + Q_REVISION(1) void rowRolePatternChanged(const QRegExp &pattern); + Q_REVISION(1) void columnRolePatternChanged(const QRegExp &pattern); + Q_REVISION(1) void xPosRolePatternChanged(const QRegExp &pattern); + Q_REVISION(1) void yPosRolePatternChanged(const QRegExp &pattern); + Q_REVISION(1) void zPosRolePatternChanged(const QRegExp &pattern); + Q_REVISION(1) void rowRoleReplaceChanged(const QString &replace); + Q_REVISION(1) void columnRoleReplaceChanged(const QString &replace); + Q_REVISION(1) void xPosRoleReplaceChanged(const QString &replace); + Q_REVISION(1) void yPosRoleReplaceChanged(const QString &replace); + Q_REVISION(1) void zPosRoleReplaceChanged(const QString &replace); protected: QItemModelSurfaceDataProxyPrivate *dptr(); |