5#ifndef QPOINTINGDEVICE_H
6#define QPOINTINGDEVICE_H
8#include <QtGui/qtguiglobal.h>
9#include <QtCore/qobject.h>
10#include <QtGui/qinputdevice.h>
17class QPointingDevicePrivate;
24 Q_PROPERTY(qint64 numericId READ numericId CONSTANT)
27 constexpr QPointingDeviceUniqueId()
noexcept : m_numericId(-1) {}
31 static QPointingDeviceUniqueId fromNumericId(qint64 id);
33 Q_ALWAYS_INLINE
constexpr bool isValid()
const noexcept {
return m_numericId != -1; }
34 qint64 numericId()
const noexcept;
37 friend bool operator==(QPointingDeviceUniqueId lhs, QPointingDeviceUniqueId rhs)
noexcept
38 {
return lhs.numericId() == rhs.numericId(); }
39 friend bool operator!=(QPointingDeviceUniqueId lhs, QPointingDeviceUniqueId rhs)
noexcept
40 {
return lhs.numericId() != rhs.numericId(); }
49Q_GUI_EXPORT size_t qHash(QPointingDeviceUniqueId key, size_t seed = 0)
noexcept;
54 Q_DECLARE_PRIVATE(QPointingDevice)
55 Q_PROPERTY(PointerType pointerType READ pointerType CONSTANT)
56 Q_PROPERTY(
int maximumPoints READ maximumPoints CONSTANT)
57 Q_PROPERTY(
int buttonCount READ buttonCount CONSTANT)
58 Q_PROPERTY(QPointingDeviceUniqueId uniqueId READ uniqueId CONSTANT)
61 enum class PointerType {
68 AllPointerTypes = 0x7FFF
70 Q_DECLARE_FLAGS(PointerTypes, PointerType)
76 CancelGrabPassive = 0x03,
77 OverrideGrabPassive = 0x04,
79 UngrabExclusive = 0x20,
80 CancelGrabExclusive = 0x30,
82 Q_ENUM(GrabTransition)
84 QPointingDevice(QObject *parent =
nullptr);
86 QPointingDevice(
const QString &name, qint64 systemId, QInputDevice::DeviceType devType,
87 PointerType pType, Capabilities caps,
int maxPoints,
int buttonCount,
88 const QString &seatName = QString(),
89 QPointingDeviceUniqueId uniqueId = QPointingDeviceUniqueId(),
90 QObject *parent =
nullptr);
92#if QT_DEPRECATED_SINCE(6
, 0
)
93 QT_DEPRECATED_VERSION_X_6_0(
"Use the constructor")
94 void setType(DeviceType devType);
95 QT_DEPRECATED_VERSION_X_6_0(
"Use the constructor")
96 void setCapabilities(QInputDevice::Capabilities caps);
97 QT_DEPRECATED_VERSION_X_6_0(
"Use the constructor")
98 void setMaximumTouchPoints(
int c);
101 PointerType pointerType()
const;
102 int maximumPoints()
const;
103 int buttonCount()
const;
104 QPointingDeviceUniqueId uniqueId()
const;
106 static const QPointingDevice *primaryPointingDevice(
const QString& seatName = QString());
108 bool operator==(
const QPointingDevice &other)
const;
111#if QT_VERSION < QT_VERSION_CHECK(7
, 0
, 0
)
112 void grabChanged(QObject *grabber, GrabTransition transition,
113 const QPointerEvent *event,
const QEventPoint &point)
const;
115 void grabChanged(QObject *grabber, QPointingDevice::GrabTransition transition,
116 const QPointerEvent *event,
const QEventPoint &point);
120 QPointingDevice(QPointingDevicePrivate &d, QObject *parent);
122 Q_DISABLE_COPY_MOVE(QPointingDevice)
125Q_DECLARE_OPERATORS_FOR_FLAGS(QPointingDevice::PointerTypes)
127#ifndef QT_NO_DEBUG_STREAM
128Q_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.
\macro QT_RESTRICTED_CAST_FROM_ASCII
The QStyleHints class contains platform specific hints and settings. \inmodule QtGui.
Combined button and popup list for selecting options.
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()
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)
QT_BEGIN_NAMESPACE Q_STATIC_LOGGING_CATEGORY(lcSynthesizedIterableAccess, "qt.iterable.synthesized", QtWarningMsg)
QDebug Q_GUI_EXPORT & operator<<(QDebug &s, const QVectorPath &path)
void applyTo(QWindow *window) const
static QWindowGeometrySpecification fromArgument(const QByteArray &a)