diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-11-04 10:49:42 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2017-11-06 10:17:22 +0000 |
commit | 430fe83ecb7106118cbebd735637aee9e9253914 (patch) | |
tree | c27f1c2a5ae6a2b740467375439d8eac021e06e0 /src/quicktemplates2/qquickdial.cpp | |
parent | 6470a54ed34523822c50ac846a17a9f76564cf58 (diff) |
Re-order all revisioned members and add explanatory comments
We've come to realize that even though it's tempting to group similar
properties together, organizing the API so that revisions are grouped
together makes future maintenance more pleasant. It's a lot easier to
to see what was added and when.
Change-Id: I47ba7725260f2c259048848cc2a9b17bce2f01c7
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickdial.cpp')
-rw-r--r-- | src/quicktemplates2/qquickdial.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/src/quicktemplates2/qquickdial.cpp b/src/quicktemplates2/qquickdial.cpp index 93ad0b5a..c0e2c8ed 100644 --- a/src/quicktemplates2/qquickdial.cpp +++ b/src/quicktemplates2/qquickdial.cpp @@ -514,6 +514,34 @@ void QQuickDial::setPressed(bool pressed) } /*! + \qmlproperty Item QtQuick.Controls::Dial::handle + + This property holds the handle of the dial. + + The handle acts as a visual indicator of the position of the dial. + + \sa {Customizing Dial} +*/ +QQuickItem *QQuickDial::handle() const +{ + Q_D(const QQuickDial); + return d->handle; +} + +void QQuickDial::setHandle(QQuickItem *handle) +{ + Q_D(QQuickDial); + if (handle == d->handle) + return; + + QQuickControlPrivate::destroyDelegate(d->handle, this); + d->handle = handle; + if (d->handle && !d->handle->parentItem()) + d->handle->setParentItem(this); + emit handleChanged(); +} + +/*! \since QtQuick.Controls 2.2 (Qt 5.9) \qmlproperty bool QtQuick.Controls::Dial::live @@ -568,34 +596,6 @@ void QQuickDial::decrease() setValue(d->value - step); } -/*! - \qmlproperty Item QtQuick.Controls::Dial::handle - - This property holds the handle of the dial. - - The handle acts as a visual indicator of the position of the dial. - - \sa {Customizing Dial} -*/ -QQuickItem *QQuickDial::handle() const -{ - Q_D(const QQuickDial); - return d->handle; -} - -void QQuickDial::setHandle(QQuickItem *handle) -{ - Q_D(QQuickDial); - if (handle == d->handle) - return; - - QQuickControlPrivate::destroyDelegate(d->handle, this); - d->handle = handle; - if (d->handle && !d->handle->parentItem()) - d->handle->setParentItem(this); - emit handleChanged(); -} - void QQuickDial::keyPressEvent(QKeyEvent *event) { Q_D(QQuickDial); |