diff options
author | Liang Qi <liang.qi@qt.io> | 2017-04-18 22:04:11 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-04-18 22:04:11 +0200 |
commit | e56eb1fc60d614b652400030074ca334deea98b6 (patch) | |
tree | b0961159a61d7cc75e2b1c11d17d9c24ff30c367 /src/controls/Private | |
parent | 293dee361a8483aaa5bc3de49b896f012f1b337d (diff) | |
parent | 378bd7b4454a5a049072ae1043981984f30e8329 (diff) | |
download | qtquickcontrols-e56eb1fc60d614b652400030074ca334deea98b6.tar.gz |
Merge remote-tracking branch 'origin/5.8' into 5.9
Change-Id: Ife389a8fd4df1eef4f521ff734d02748b25ec184
Diffstat (limited to 'src/controls/Private')
-rw-r--r-- | src/controls/Private/qquickwheelarea.cpp | 16 | ||||
-rw-r--r-- | src/controls/Private/qquickwheelarea_p.h | 16 |
2 files changed, 26 insertions, 6 deletions
diff --git a/src/controls/Private/qquickwheelarea.cpp b/src/controls/Private/qquickwheelarea.cpp index 9c0a70a2..bd77ae24 100644 --- a/src/controls/Private/qquickwheelarea.cpp +++ b/src/controls/Private/qquickwheelarea.cpp @@ -141,7 +141,11 @@ void QQuickWheelArea1::wheelEvent(QWheelEvent *we) void QQuickWheelArea1::setHorizontalMinimumValue(qreal value) { + if (value == m_horizontalMinimumValue) + return; + m_horizontalMinimumValue = value; + emit horizontalMinimumValueChanged(); } qreal QQuickWheelArea1::horizontalMinimumValue() const @@ -151,7 +155,11 @@ qreal QQuickWheelArea1::horizontalMinimumValue() const void QQuickWheelArea1::setHorizontalMaximumValue(qreal value) { + if (value == m_horizontalMaximumValue) + return; + m_horizontalMaximumValue = value; + emit horizontalMaximumValueChanged(); } qreal QQuickWheelArea1::horizontalMaximumValue() const @@ -161,7 +169,11 @@ qreal QQuickWheelArea1::horizontalMaximumValue() const void QQuickWheelArea1::setVerticalMinimumValue(qreal value) { + if (value == m_verticalMinimumValue) + return; + m_verticalMinimumValue = value; + emit verticalMinimumValueChanged(); } qreal QQuickWheelArea1::verticalMinimumValue() const @@ -171,7 +183,11 @@ qreal QQuickWheelArea1::verticalMinimumValue() const void QQuickWheelArea1::setVerticalMaximumValue(qreal value) { + if (value == m_verticalMaximumValue) + return; + m_verticalMaximumValue = value; + emit verticalMaximumValueChanged(); } qreal QQuickWheelArea1::verticalMaximumValue() const diff --git a/src/controls/Private/qquickwheelarea_p.h b/src/controls/Private/qquickwheelarea_p.h index 676383bc..a11b78cf 100644 --- a/src/controls/Private/qquickwheelarea_p.h +++ b/src/controls/Private/qquickwheelarea_p.h @@ -50,12 +50,12 @@ class QQuickWheelArea1 : public QQuickItem Q_OBJECT Q_PROPERTY(qreal verticalDelta READ verticalDelta WRITE setVerticalDelta NOTIFY verticalWheelMoved) Q_PROPERTY(qreal horizontalDelta READ horizontalDelta WRITE setHorizontalDelta NOTIFY horizontalWheelMoved) - Q_PROPERTY(qreal horizontalMinimumValue READ horizontalMinimumValue WRITE setHorizontalMinimumValue) - Q_PROPERTY(qreal horizontalMaximumValue READ horizontalMaximumValue WRITE setHorizontalMaximumValue) - Q_PROPERTY(qreal verticalMinimumValue READ verticalMinimumValue WRITE setVerticalMinimumValue) - Q_PROPERTY(qreal verticalMaximumValue READ verticalMaximumValue WRITE setVerticalMaximumValue) - Q_PROPERTY(qreal horizontalValue READ horizontalValue WRITE setHorizontalValue) - Q_PROPERTY(qreal verticalValue READ verticalValue WRITE setVerticalValue) + Q_PROPERTY(qreal horizontalMinimumValue READ horizontalMinimumValue WRITE setHorizontalMinimumValue NOTIFY horizontalMinimumValueChanged) + Q_PROPERTY(qreal horizontalMaximumValue READ horizontalMaximumValue WRITE setHorizontalMaximumValue NOTIFY horizontalMaximumValueChanged) + Q_PROPERTY(qreal verticalMinimumValue READ verticalMinimumValue WRITE setVerticalMinimumValue NOTIFY verticalMinimumValueChanged) + Q_PROPERTY(qreal verticalMaximumValue READ verticalMaximumValue WRITE setVerticalMaximumValue NOTIFY verticalMaximumValueChanged) + Q_PROPERTY(qreal horizontalValue READ horizontalValue WRITE setHorizontalValue NOTIFY horizontalValueChanged) + Q_PROPERTY(qreal verticalValue READ verticalValue WRITE setVerticalValue NOTIFY verticalValueChanged) Q_PROPERTY(qreal scrollSpeed READ scrollSpeed WRITE setScrollSpeed NOTIFY scrollSpeedChanged) Q_PROPERTY(bool active READ isActive WRITE setActive NOTIFY activeChanged) Q_PROPERTY(bool inverted READ isInverted) @@ -106,7 +106,11 @@ public: Q_SIGNALS: void verticalValueChanged(); + void verticalMinimumValueChanged(); + void verticalMaximumValueChanged(); void horizontalValueChanged(); + void horizontalMinimumValueChanged(); + void horizontalMaximumValueChanged(); void verticalWheelMoved(); void horizontalWheelMoved(); void scrollSpeedChanged(); |