diff options
author | Mika Salmela <mika.salmela@digia.com> | 2013-12-18 11:50:03 +0200 |
---|---|---|
committer | Mika Salmela <mika.salmela@digia.com> | 2013-12-18 11:51:20 +0200 |
commit | 07aba602fc82ac31684988f8e8e22521d2b3c982 (patch) | |
tree | 7ae1da139e8661bf157f996fe71844031d2995f4 /src/datavisualization/axis/q3dcategoryaxis.cpp | |
parent | cf0cf6ca67aec8ae480bb705443ea17f5ab9f9e2 (diff) | |
parent | ea0442bc81ae034d22c5742b6075dee993fdd54d (diff) |
Merge branch 'develop' into mergebranch
Conflicts:
examples/qmlbars/qml/qmlbars/main.qml
examples/qmlscatter/qml/qmlscatter/main.qml
examples/qmlsurface/qml/qmlsurface/main.qml
src/datavisualization/data/qitemmodelbardatamapping.cpp
src/datavisualization/data/qitemmodelscatterdatamapping.cpp
src/datavisualization/data/qitemmodelsurfacedatamapping.cpp
src/datavisualization/engine/drawer.cpp
Change-Id: I731ebdb2cc5cee8f2cb32becee96d1fc1b3e5de1
Diffstat (limited to 'src/datavisualization/axis/q3dcategoryaxis.cpp')
-rw-r--r-- | src/datavisualization/axis/q3dcategoryaxis.cpp | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/datavisualization/axis/q3dcategoryaxis.cpp b/src/datavisualization/axis/q3dcategoryaxis.cpp index 63026379..26a75f93 100644 --- a/src/datavisualization/axis/q3dcategoryaxis.cpp +++ b/src/datavisualization/axis/q3dcategoryaxis.cpp @@ -49,10 +49,14 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE */ /*! - * \qmlproperty list CategoryAxis3D::categoryLabels + * \qmlproperty list CategoryAxis3D::labels + * * Defines labels for axis applied to categories. If there are fewer labels than categories, the * remaining ones do not have a label. If category labels are not defined explicitly, labels are - * generated from the data row and column labels. + * generated from the data row (or column) labels. + * + * \note If the graph has multiple visible series and category labels are not defined explicitly, + * changing the rows (or columns) on any of the attached series will regenerate the labels. */ /*! @@ -61,6 +65,7 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE Q3DCategoryAxis::Q3DCategoryAxis(QObject *parent) : Q3DAbstractAxis(new Q3DCategoryAxisPrivate(this), parent) { + connect(this, &Q3DCategoryAxis::labelsChanged, this, &Q3DAbstractAxis::labelsChanged); } /*! @@ -71,22 +76,21 @@ Q3DCategoryAxis::~Q3DCategoryAxis() } /*! - * \property Q3DCategoryAxis::categoryLabels + * \property Q3DCategoryAxis::labels * * Defines labels for axis applied to categories. If there are fewer labels than categories, the * remaining ones do not have a label. If category labels are not defined explicitly, labels are - * generated from the data row and column labels. + * generated from the data row (or column) labels. * - * \note CategoryLabels actually reads/writes the Q3DAbstractAxis::labels property, - * which is read only there. Since subclass cannot have property with same name, - * this partially duplicate property is necessary. + * \note If the graph has multiple visible series and category labels are not defined explicitly, + * changing the rows (or columns) on any of the attached series will regenerate the labels. */ -QStringList Q3DCategoryAxis::categoryLabels() const +QStringList Q3DCategoryAxis::labels() const { - return labels(); + return Q3DAbstractAxis::labels(); } -void Q3DCategoryAxis::setCategoryLabels(const QStringList &labels) +void Q3DCategoryAxis::setLabels(const QStringList &labels) { dptr()->m_labelsExplicitlySet = !labels.isEmpty(); bool labelsFromData = false; |