1 | // Copyright (C) 2017 The Qt Company Ltd. |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #ifndef QQUICKPONTHANDLER_H |
5 | #define QQUICKPONTHANDLER_H |
6 | |
7 | // |
8 | // W A R N I N G |
9 | // ------------- |
10 | // |
11 | // This file is not part of the Qt API. It exists purely as an |
12 | // implementation detail. This header file may change from version to |
13 | // version without notice, or even be removed. |
14 | // |
15 | // We mean it. |
16 | // |
17 | |
18 | #include "qquicksinglepointhandler_p.h" |
19 | |
20 | QT_BEGIN_NAMESPACE |
21 | |
22 | class Q_QUICK_PRIVATE_EXPORT QQuickPointHandler : public QQuickSinglePointHandler |
23 | { |
24 | Q_OBJECT |
25 | Q_PROPERTY(QVector2D translation READ translation NOTIFY translationChanged FINAL) |
26 | QML_NAMED_ELEMENT(PointHandler) |
27 | QML_ADDED_IN_VERSION(2, 12) |
28 | |
29 | public: |
30 | explicit QQuickPointHandler(QQuickItem *parent = nullptr); |
31 | |
32 | QVector2D translation() const; |
33 | |
34 | Q_SIGNALS: |
35 | void translationChanged(); |
36 | |
37 | protected: |
38 | bool wantsEventPoint(const QPointerEvent *event, const QEventPoint &point) override; |
39 | void handleEventPoint(QPointerEvent *event, QEventPoint &point) override; |
40 | }; |
41 | |
42 | QT_END_NAMESPACE |
43 | |
44 | #endif // QQUICKPONTHANDLER_H |
45 |