summaryrefslogtreecommitdiff
path: root/src/controls/Private/qquickrangemodel_p.h
diff options
context:
space:
mode:
authorJoni Poikelin <joni.poikelin@theqtcompany.com>2016-03-10 08:28:35 +0200
committerJoni Poikelin <joni.poikelin@qt.io>2016-08-30 07:09:34 +0000
commit846d04cec8d946c28ddbeecc79c63553e0891736 (patch)
tree8440f18668a95bf8385f8e196a6249424a6b829f /src/controls/Private/qquickrangemodel_p.h
parent69b3136bae16897492d27558c5909cd61a5e598e (diff)
downloadqtquickcontrols-846d04cec8d946c28ddbeecc79c63553e0891736.tar.gz
RangeModel: Emit min/max and value changes after component is complete
Prevent extra value changed signal to be fired in case when Slider with minimum > 0 and value > minimum are set. Change-Id: I86824c403a7c0296f782d2eec7ed30acfc13b304 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/controls/Private/qquickrangemodel_p.h')
-rw-r--r--src/controls/Private/qquickrangemodel_p.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/controls/Private/qquickrangemodel_p.h b/src/controls/Private/qquickrangemodel_p.h
index 06d00202..47376ded 100644
--- a/src/controls/Private/qquickrangemodel_p.h
+++ b/src/controls/Private/qquickrangemodel_p.h
@@ -44,7 +44,7 @@ QT_BEGIN_NAMESPACE
class QQuickRangeModelPrivate;
-class QQuickRangeModel : public QObject
+class QQuickRangeModel : public QObject, public QQmlParserStatus
{
Q_OBJECT
Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY valueChanged USER true)
@@ -56,6 +56,8 @@ class QQuickRangeModel : public QObject
Q_PROPERTY(qreal positionAtMaximum READ positionAtMaximum WRITE setPositionAtMaximum NOTIFY positionAtMaximumChanged)
Q_PROPERTY(bool inverted READ inverted WRITE setInverted NOTIFY invertedChanged)
+ Q_INTERFACES(QQmlParserStatus)
+
public:
QQuickRangeModel(QObject *parent = 0);
virtual ~QQuickRangeModel();
@@ -87,6 +89,9 @@ public:
Q_INVOKABLE qreal valueForPosition(qreal position) const;
Q_INVOKABLE qreal positionForValue(qreal value) const;
+ void classBegin();
+ void componentComplete();
+
public Q_SLOTS:
void toMinimum();
void toMaximum();