summaryrefslogtreecommitdiffstats
path: root/src/chartsqml2/declarativecategoryaxis.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-10-15 03:03:57 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-10-15 03:03:57 +0200
commitb92958a299221678ae3cac4d57d1a67cbaf0270d (patch)
tree6c3b6c7916f3c46cf9d81514968856d74dd137fc /src/chartsqml2/declarativecategoryaxis.cpp
parent26277a94e10b9bb542017be369c95f399eba6213 (diff)
parent88e67e7686fa564e81a770a18879cc281e620222 (diff)
Merge remote-tracking branch 'origin/5.14' into 5.15
Diffstat (limited to 'src/chartsqml2/declarativecategoryaxis.cpp')
-rw-r--r--src/chartsqml2/declarativecategoryaxis.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/chartsqml2/declarativecategoryaxis.cpp b/src/chartsqml2/declarativecategoryaxis.cpp
index 1b1826fd..8f6a2b20 100644
--- a/src/chartsqml2/declarativecategoryaxis.cpp
+++ b/src/chartsqml2/declarativecategoryaxis.cpp
@@ -64,6 +64,14 @@ DeclarativeCategoryRange::DeclarativeCategoryRange(QObject *parent) :
{
}
+void DeclarativeCategoryRange::setLabel(const QString &label)
+{
+ auto catAxis = qobject_cast<QCategoryAxis *>(parent());
+ if (catAxis)
+ catAxis->replaceLabel(m_label, label);
+ m_label = label;
+}
+
DeclarativeCategoryAxis::DeclarativeCategoryAxis(QObject *parent) :
QCategoryAxis(parent),
m_labelsPosition(AxisLabelsPositionCenter)