aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/handlers/qquickpinchhandler_p.h
diff options
context:
space:
mode:
authorJan Arve Sæther <jan-arve.saether@qt.io>2019-01-18 14:39:00 +0100
committerJani Heikkinen <jani.heikkinen@qt.io>2019-01-21 16:46:42 +0000
commita566125b9fcc023237b442e5b9a838d40455c8fe (patch)
tree0e7c646dfe6c6eaf665bdeadb49020de7d04bfc8 /src/quick/handlers/qquickpinchhandler_p.h
parent4ed072432172398d753d1664244d74548704c107 (diff)
Fix axis constraints API and documentation:v5.12.15.12.1
This should have been done properly for 5.12. Since this API was introduced in 5.12.0, we simply hide the documentation for the old properties and make sure the properties we want to expose are documented: * Document the xAxis and yAxis properties. * Deprecate the {min,max}imum{X,Y} properties, and hide them in the documentation. Fixes: QTBUG-73137 Change-Id: Ic749bcfec63dc4772f193ccae2a2750c20cb63aa Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quick/handlers/qquickpinchhandler_p.h')
-rw-r--r--src/quick/handlers/qquickpinchhandler_p.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/quick/handlers/qquickpinchhandler_p.h b/src/quick/handlers/qquickpinchhandler_p.h
index 8f24d18166..11d895468c 100644
--- a/src/quick/handlers/qquickpinchhandler_p.h
+++ b/src/quick/handlers/qquickpinchhandler_p.h
@@ -70,10 +70,12 @@ class Q_AUTOTEST_EXPORT QQuickPinchHandler : public QQuickMultiPointHandler
Q_PROPERTY(qreal activeScale READ activeScale NOTIFY updated)
Q_PROPERTY(qreal rotation READ rotation NOTIFY updated)
Q_PROPERTY(QVector2D translation READ translation NOTIFY updated)
- Q_PROPERTY(qreal minimumX READ minimumX WRITE setMinimumX NOTIFY minimumXChanged)
- Q_PROPERTY(qreal maximumX READ maximumX WRITE setMaximumX NOTIFY maximumXChanged)
- Q_PROPERTY(qreal minimumY READ minimumY WRITE setMinimumY NOTIFY minimumYChanged)
- Q_PROPERTY(qreal maximumY READ maximumY WRITE setMaximumY NOTIFY maximumYChanged)
+#if QT_DEPRECATED_SINCE(5, 12)
+ Q_PROPERTY(qreal minimumX READ minimumX WRITE setMinimumX NOTIFY minimumXChanged) // ### Qt 6: remove
+ Q_PROPERTY(qreal maximumX READ maximumX WRITE setMaximumX NOTIFY maximumXChanged) // ### Qt 6: remove
+ Q_PROPERTY(qreal minimumY READ minimumY WRITE setMinimumY NOTIFY minimumYChanged) // ### Qt 6: remove
+ Q_PROPERTY(qreal maximumY READ maximumY WRITE setMaximumY NOTIFY maximumYChanged) // ### Qt 6: remove
+#endif
Q_PROPERTY(QQuickDragAxis * xAxis READ xAxis CONSTANT)
Q_PROPERTY(QQuickDragAxis * yAxis READ yAxis CONSTANT)
@@ -96,14 +98,18 @@ public:
qreal scale() const { return m_accumulatedScale; }
qreal activeScale() const { return m_activeScale; }
qreal rotation() const { return m_activeRotation; }
- qreal minimumX() const { return m_minimumX; }
+
+#if QT_DEPRECATED_SINCE(5, 12)
+ void warnAboutMinMaxDeprecated() const;
+ qreal minimumX() const { warnAboutMinMaxDeprecated(); return m_minimumX; }
void setMinimumX(qreal minX);
- qreal maximumX() const { return m_maximumX; }
+ qreal maximumX() const { warnAboutMinMaxDeprecated(); return m_maximumX; }
void setMaximumX(qreal maxX);
- qreal minimumY() const { return m_minimumY; }
+ qreal minimumY() const { warnAboutMinMaxDeprecated(); return m_minimumY; }
void setMinimumY(qreal minY);
- qreal maximumY() const { return m_maximumY; }
+ qreal maximumY() const { warnAboutMinMaxDeprecated(); return m_maximumY; }
void setMaximumY(qreal maxY);
+#endif
QQuickDragAxis *xAxis() { return &m_xAxis; }
QQuickDragAxis *yAxis() { return &m_yAxis; }