4#ifndef QPOINTINGDEVICE_H
5#define QPOINTINGDEVICE_H
7#include <QtGui/qtguiglobal.h>
8#include <QtCore/qobject.h>
9#include <QtGui/qinputdevice.h>
16class QPointingDevicePrivate;
23 Q_PROPERTY(qint64 numericId READ numericId CONSTANT)
26 constexpr QPointingDeviceUniqueId()
noexcept : m_numericId(-1) {}
30 static QPointingDeviceUniqueId fromNumericId(qint64 id);
32 Q_ALWAYS_INLINE
constexpr bool isValid()
const noexcept {
return m_numericId != -1; }
33 qint64 numericId()
const noexcept;
36 friend bool operator==(QPointingDeviceUniqueId lhs, QPointingDeviceUniqueId rhs)
noexcept
37 {
return lhs.numericId() == rhs.numericId(); }
38 friend bool operator!=(QPointingDeviceUniqueId lhs, QPointingDeviceUniqueId rhs)
noexcept
39 {
return lhs.numericId() != rhs.numericId(); }
48Q_GUI_EXPORT size_t qHash(QPointingDeviceUniqueId key, size_t seed = 0)
noexcept;
53 Q_DECLARE_PRIVATE(QPointingDevice)
54 Q_PROPERTY(PointerType pointerType READ pointerType CONSTANT)
55 Q_PROPERTY(
int maximumPoints READ maximumPoints CONSTANT)
56 Q_PROPERTY(
int buttonCount READ buttonCount CONSTANT)
57 Q_PROPERTY(QPointingDeviceUniqueId uniqueId READ uniqueId CONSTANT)
60 enum class PointerType {
67 AllPointerTypes = 0x7FFF
69 Q_DECLARE_FLAGS(PointerTypes, PointerType)
75 CancelGrabPassive = 0x03,
76 OverrideGrabPassive = 0x04,
78 UngrabExclusive = 0x20,
79 CancelGrabExclusive = 0x30,
81 Q_ENUM(GrabTransition)
83 QPointingDevice(QObject *parent =
nullptr);
85 QPointingDevice(
const QString &name, qint64 systemId, QInputDevice::DeviceType devType,
86 PointerType pType, Capabilities caps,
int maxPoints,
int buttonCount,
87 const QString &seatName = QString(),
88 QPointingDeviceUniqueId uniqueId = QPointingDeviceUniqueId(),
89 QObject *parent =
nullptr);
91#if QT_DEPRECATED_SINCE(6
, 0
)
92 QT_DEPRECATED_VERSION_X_6_0(
"Use the constructor")
93 void setType(DeviceType devType);
94 QT_DEPRECATED_VERSION_X_6_0(
"Use the constructor")
95 void setCapabilities(QInputDevice::Capabilities caps);
96 QT_DEPRECATED_VERSION_X_6_0(
"Use the constructor")
97 void setMaximumTouchPoints(
int c);
100 PointerType pointerType()
const;
101 int maximumPoints()
const;
102 int buttonCount()
const;
103 QPointingDeviceUniqueId uniqueId()
const;
105 static const QPointingDevice *primaryPointingDevice(
const QString& seatName = QString());
107 bool operator==(
const QPointingDevice &other)
const;
110#if QT_VERSION < QT_VERSION_CHECK(7
, 0
, 0
)
111 void grabChanged(QObject *grabber, GrabTransition transition,
112 const QPointerEvent *event,
const QEventPoint &point)
const;
114 void grabChanged(QObject *grabber, QPointingDevice::GrabTransition transition,
115 const QPointerEvent *event,
const QEventPoint &point);
119 QPointingDevice(QPointingDevicePrivate &d, QObject *parent);
121 Q_DISABLE_COPY_MOVE(QPointingDevice)
124Q_DECLARE_OPERATORS_FOR_FLAGS(QPointingDevice::PointerTypes)
126#ifndef QT_NO_DEBUG_STREAM
127Q_GUI_EXPORT QDebug operator<<(QDebug,
const QPointingDevice *);
The QClipboard class provides access to the window system clipboard.
\inmodule QtCore\reentrant
The QIcon class provides scalable icons in different modes and states.
The QPalette class contains color groups for each widget state.
QPointingDeviceUniqueId identifies a unique object, such as a tagged token or stylus,...
The QPointingDevice class describes a device from which mouse, touch or tablet events originate.
The QStyleHints class contains platform specific hints and settings. \inmodule QtGui.
Combined button and popup list for selecting options.
Q_STATIC_LOGGING_CATEGORY(lcAccessibilityCore, "qt.accessibility.core")
Q_DECLARE_TYPEINFO(QByteArrayView, Q_PRIMITIVE_TYPE)
Q_CORE_EXPORT QDebug operator<<(QDebug debug, QDir::Filters filters)
Q_LOGGING_CATEGORY(lcEventDispatcher, "qt.eventdispatcher")
static bool needsWindowBlockedEvent(const QWindow *w)
Q_CORE_EXPORT void qt_call_post_routines()
static void init_plugins(const QList< QByteArray > &pluginList)
static void initFontUnlocked()
static void clearFontUnlocked()
void qRegisterGuiVariant()
static Q_CONSTINIT unsigned applicationResourceFlags
static Q_CONSTINIT int touchDoubleTapDistance
static QWindowGeometrySpecification windowGeometrySpecification
static bool qt_detectRTLLanguage()
static bool checkNeedPortalSupport()
Q_CONSTINIT Q_GUI_EXPORT bool qt_is_tty_app
static Q_CONSTINIT bool force_reverse
static Q_CONSTINIT int mouseDoubleClickDistance
#define Q_WINDOW_GEOMETRY_SPECIFICATION_INITIALIZER
static void init_platform(const QString &pluginNamesWithArguments, const QString &platformPluginPath, const QString &platformThemeName, int &argc, char **argv)
static void initThemeHints()
static int nextGeometryToken(const QByteArray &a, int &pos, char *op)
#define CHECK_QAPP_INSTANCE(...)
@ ApplicationFontExplicitlySet
static void updateBlockedStatusRecursion(QWindow *window, bool shouldBeBlocked)
QDebug Q_GUI_EXPORT & operator<<(QDebug &s, const QVectorPath &path)
void applyTo(QWindow *window) const
static QWindowGeometrySpecification fromArgument(const QByteArray &a)