aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/handlers/qquickmultipointhandler_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-11-08 10:28:30 +0100
committerLars Knoll <lars.knoll@qt.io>2017-11-08 12:32:01 +0100
commit0a27a14ec1879096e5fffca75b3bd107b813db87 (patch)
tree2e4332c9545af969903cb9c8bd619f2adc53f5a8 /src/quick/handlers/qquickmultipointhandler_p.h
parentb853a1e1b003d4dc01884201c09c2fcbf75f2cf6 (diff)
parent7bedd55551fbe95355b0db11f9d576924e829f9d (diff)
Merge remote-tracking branch 'origin/dev' into new-backend
Diffstat (limited to 'src/quick/handlers/qquickmultipointhandler_p.h')
-rw-r--r--src/quick/handlers/qquickmultipointhandler_p.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/quick/handlers/qquickmultipointhandler_p.h b/src/quick/handlers/qquickmultipointhandler_p.h
index 97e3383331..05c3876246 100644
--- a/src/quick/handlers/qquickmultipointhandler_p.h
+++ b/src/quick/handlers/qquickmultipointhandler_p.h
@@ -60,21 +60,26 @@ QT_BEGIN_NAMESPACE
class Q_AUTOTEST_EXPORT QQuickMultiPointHandler : public QQuickPointerDeviceHandler
{
Q_OBJECT
- Q_PROPERTY(int requiredPointCount READ requiredPointCount WRITE setRequiredPointCount NOTIFY requiredPointCountChanged)
+ Q_PROPERTY(int minimumPointCount READ minimumPointCount WRITE setMinimumPointCount NOTIFY minimumPointCountChanged)
+ Q_PROPERTY(int maximumPointCount READ maximumPointCount WRITE setMaximumPointCount NOTIFY maximumPointCountChanged)
Q_PROPERTY(qreal pointDistanceThreshold READ pointDistanceThreshold WRITE setPointDistanceThreshold NOTIFY pointDistanceThresholdChanged)
public:
- explicit QQuickMultiPointHandler(QObject *parent = 0, int requiredPointCount = 2);
+ explicit QQuickMultiPointHandler(QObject *parent = 0, int minimumPointCount = 2);
~QQuickMultiPointHandler();
- int requiredPointCount() const { return m_requiredPointCount; }
- void setRequiredPointCount(int c);
+ int minimumPointCount() const { return m_minimumPointCount; }
+ void setMinimumPointCount(int c);
+
+ int maximumPointCount() const { return m_maximumPointCount >= 0 ? m_maximumPointCount : m_minimumPointCount; }
+ void setMaximumPointCount(int maximumPointCount);
qreal pointDistanceThreshold() const { return m_pointDistanceThreshold; }
void setPointDistanceThreshold(qreal pointDistanceThreshold);
signals:
- void requiredPointCountChanged();
+ void minimumPointCountChanged();
+ void maximumPointCountChanged();
void pointDistanceThresholdChanged();
protected:
@@ -101,7 +106,8 @@ protected:
protected:
QVector<QQuickEventPoint *> m_currentPoints;
- int m_requiredPointCount;
+ int m_minimumPointCount;
+ int m_maximumPointCount;
qreal m_pointDistanceThreshold;
};