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
qquickpointerdevicehandler_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
5
6#ifndef QQUICKPOINTERDEVICEHANDLER_H
7#define QQUICKPOINTERDEVICEHANDLER_H
8
9//
10// W A R N I N G
11// -------------
12//
13// This file is not part of the Qt API. It exists purely as an
14// implementation detail. This header file may change from version to
15// version without notice, or even be removed.
16//
17// We mean it.
18//
19
20QT_BEGIN_NAMESPACE
21
22class QQuickPointerDeviceHandlerPrivate;
23
24class Q_QUICK_EXPORT QQuickPointerDeviceHandler : public QQuickPointerHandler
25{
26 Q_OBJECT
27 Q_PROPERTY(QInputDevice::DeviceTypes acceptedDevices READ acceptedDevices WRITE
28 setAcceptedDevices NOTIFY acceptedDevicesChanged)
29 Q_PROPERTY(QPointingDevice::PointerTypes acceptedPointerTypes READ acceptedPointerTypes WRITE setAcceptedPointerTypes NOTIFY acceptedPointerTypesChanged)
30 Q_PROPERTY(Qt::MouseButtons acceptedButtons READ acceptedButtons WRITE setAcceptedButtons NOTIFY acceptedButtonsChanged)
31 Q_PROPERTY(Qt::KeyboardModifiers acceptedModifiers READ acceptedModifiers WRITE setAcceptedModifiers NOTIFY acceptedModifiersChanged)
32
33public:
34 explicit QQuickPointerDeviceHandler(QQuickItem *parent = nullptr);
35
36 QInputDevice::DeviceTypes acceptedDevices() const;
37 QPointingDevice::PointerTypes acceptedPointerTypes() const;
38 Qt::MouseButtons acceptedButtons() const;
39 Qt::KeyboardModifiers acceptedModifiers() const;
40
41public Q_SLOTS:
42 void setAcceptedDevices(QInputDevice::DeviceTypes acceptedDevices);
43 void setAcceptedPointerTypes(QPointingDevice::PointerTypes acceptedPointerTypes);
44 void setAcceptedButtons(Qt::MouseButtons buttons);
45 void setAcceptedModifiers(Qt::KeyboardModifiers acceptedModifiers);
46
47Q_SIGNALS:
48 void acceptedDevicesChanged();
49 void acceptedPointerTypesChanged();
50 void acceptedButtonsChanged();
51 void acceptedModifiersChanged();
52
53protected:
54 QQuickPointerDeviceHandler(QQuickPointerDeviceHandlerPrivate &dd, QQuickItem *parent = nullptr);
55
56 bool wantsPointerEvent(QPointerEvent *event) override;
57
58 Q_DECLARE_PRIVATE(QQuickPointerDeviceHandler)
59};
60
61QT_END_NAMESPACE
62
63#endif // QQUICKPOINTERDEVICEHANDLER_H
Q_STATIC_LOGGING_CATEGORY(lcAccessibilityCore, "qt.accessibility.core")
static QT_BEGIN_NAMESPACE const qreal DragAngleToleranceDegrees