Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qquicksinglepointhandler_p.h
Go to the documentation of this file.
1// Copyright (C) 2018 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// Qt-Security score:significant reason:default
4
5#ifndef QQUICKPOINTERSINGLEHANDLER_H
6#define QQUICKPOINTERSINGLEHANDLER_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
21
23
24class QQuickSinglePointHandlerPrivate;
25
26class Q_QUICK_EXPORT QQuickSinglePointHandler : public QQuickPointerDeviceHandler
27{
28 Q_OBJECT
29 Q_PROPERTY(QQuickHandlerPoint point READ point NOTIFY pointChanged)
30
31public:
32 explicit QQuickSinglePointHandler(QQuickItem *parent = nullptr);
33
34 QQuickHandlerPoint point() const;
35
36Q_SIGNALS:
37 void pointChanged();
38
39protected:
40 QQuickSinglePointHandler(QQuickSinglePointHandlerPrivate &dd, QQuickItem *parent);
41
42 bool wantsPointerEvent(QPointerEvent *event) override;
43 void handlePointerEventImpl(QPointerEvent *event) override;
44 virtual void handleEventPoint(QPointerEvent *event, QEventPoint &point);
45
46 QEventPoint &currentPoint(QPointerEvent *ev);
47 void onGrabChanged(QQuickPointerHandler *grabber, QPointingDevice::GrabTransition transition, QPointerEvent *event, QEventPoint &point) override;
48
49 void setIgnoreAdditionalPoints(bool v = true);
50
51 void moveTarget(QPointF pos, QEventPoint &point);
52
53 void setPointId(int id);
54
55 Q_DECLARE_PRIVATE(QQuickSinglePointHandler)
56};
57
58QT_END_NAMESPACE
59
60#endif // QQUICKPOINTERSINGLEHANDLER_H