23 Q_PROPERTY(
bool accepted READ isAccepted WRITE setAccepted)
24 Q_PROPERTY(
const QPointingDevice *device READ device CONSTANT)
25 Q_PROPERTY(
int id READ id CONSTANT)
26 Q_PROPERTY(QPointingDeviceUniqueId uniqueId READ uniqueId CONSTANT)
27 Q_PROPERTY(State state READ state CONSTANT)
28 Q_PROPERTY(ulong timestamp READ timestamp CONSTANT)
29 Q_PROPERTY(ulong pressTimestamp READ pressTimestamp CONSTANT)
30 Q_PROPERTY(ulong lastTimestamp READ lastTimestamp CONSTANT)
31 Q_PROPERTY(qreal timeHeld READ timeHeld CONSTANT)
32 Q_PROPERTY(qreal pressure READ pressure CONSTANT)
33 Q_PROPERTY(qreal rotation READ rotation CONSTANT)
34 Q_PROPERTY(QSizeF ellipseDiameters READ ellipseDiameters CONSTANT)
35 Q_PROPERTY(QVector2D velocity READ velocity CONSTANT)
36 Q_PROPERTY(QPointF position READ position CONSTANT)
37 Q_PROPERTY(QPointF pressPosition READ pressPosition CONSTANT)
38 Q_PROPERTY(QPointF grabPosition READ grabPosition CONSTANT)
39 Q_PROPERTY(QPointF lastPosition READ lastPosition CONSTANT)
40 Q_PROPERTY(QPointF scenePosition READ scenePosition CONSTANT)
41 Q_PROPERTY(QPointF scenePressPosition READ scenePressPosition CONSTANT)
42 Q_PROPERTY(QPointF sceneGrabPosition READ sceneGrabPosition CONSTANT)
43 Q_PROPERTY(QPointF sceneLastPosition READ sceneLastPosition CONSTANT)
44 Q_PROPERTY(QPointF globalPosition READ globalPosition CONSTANT)
45 Q_PROPERTY(QPointF globalPressPosition READ globalPressPosition CONSTANT)
46 Q_PROPERTY(QPointF globalGrabPosition READ globalGrabPosition CONSTANT)
47 Q_PROPERTY(QPointF globalLastPosition READ globalLastPosition CONSTANT)
50 Unknown = Qt::TouchPointUnknownState,
51 Stationary = Qt::TouchPointStationary,
52 Pressed = Qt::TouchPointPressed,
53 Updated = Qt::TouchPointMoved,
54 Released = Qt::TouchPointReleased
56 Q_DECLARE_FLAGS(States, State)
59 explicit QEventPoint(
int id = -1,
const QPointingDevice *device =
nullptr);
60 QEventPoint(
int pointId, State state,
const QPointF &scenePosition,
const QPointF &globalPosition);
61 QEventPoint(
const QEventPoint &other)
noexcept;
62 QEventPoint &operator=(
const QEventPoint &other)
noexcept;
63 QEventPoint(QEventPoint && other)
noexcept =
default;
64 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QEventPoint)
65 bool operator==(
const QEventPoint &other)
const noexcept;
66 bool operator!=(
const QEventPoint &other)
const noexcept {
return !operator==(other); }
68 inline void swap(QEventPoint &other)
noexcept
71 QPointF position()
const;
72 QPointF pressPosition()
const;
73 QPointF grabPosition()
const;
74 QPointF lastPosition()
const;
75 QPointF scenePosition()
const;
76 QPointF scenePressPosition()
const;
77 QPointF sceneGrabPosition()
const;
78 QPointF sceneLastPosition()
const;
79 QPointF globalPosition()
const;
80 QPointF globalPressPosition()
const;
81 QPointF globalGrabPosition()
const;
82 QPointF globalLastPosition()
const;
83 QPointF normalizedPosition()
const;
85#if QT_DEPRECATED_SINCE(6
, 0
)
87 QT_DEPRECATED_VERSION_X_6_0(
"Use position()")
88 QPointF pos()
const {
return position(); }
89 QT_DEPRECATED_VERSION_X_6_0(
"Use pressPosition()")
90 QPointF startPos()
const {
return pressPosition(); }
91 QT_DEPRECATED_VERSION_X_6_0(
"Use scenePosition()")
92 QPointF scenePos()
const {
return scenePosition(); }
93 QT_DEPRECATED_VERSION_X_6_0(
"Use scenePressPosition()")
94 QPointF startScenePos()
const {
return scenePressPosition(); }
95 QT_DEPRECATED_VERSION_X_6_0(
"Use globalPosition()")
96 QPointF screenPos()
const {
return globalPosition(); }
97 QT_DEPRECATED_VERSION_X_6_0(
"Use globalPressPosition()")
98 QPointF startScreenPos()
const {
return globalPressPosition(); }
99 QT_DEPRECATED_VERSION_X_6_0(
"Use globalPressPosition()")
100 QPointF startNormalizedPos()
const;
101 QT_DEPRECATED_VERSION_X_6_0(
"Use normalizedPosition()")
102 QPointF normalizedPos()
const {
return normalizedPosition(); }
103 QT_DEPRECATED_VERSION_X_6_0(
"Use lastPosition()")
104 QPointF lastPos()
const {
return lastPosition(); }
105 QT_DEPRECATED_VERSION_X_6_0(
"Use sceneLastPosition()")
106 QPointF lastScenePos()
const {
return sceneLastPosition(); }
107 QT_DEPRECATED_VERSION_X_6_0(
"Use globalLastPosition()")
108 QPointF lastScreenPos()
const {
return globalLastPosition(); }
109 QT_DEPRECATED_VERSION_X_6_0(
"Use globalLastPosition()")
110 QPointF lastNormalizedPos()
const;
112 QVector2D velocity()
const;
114 const QPointingDevice *device()
const;
116 QPointingDeviceUniqueId uniqueId()
const;
117 ulong timestamp()
const;
118 ulong lastTimestamp()
const;
119 ulong pressTimestamp()
const;
120 qreal timeHeld()
const;
121 qreal pressure()
const;
122 qreal rotation()
const;
123 QSizeF ellipseDiameters()
const;
125 bool isAccepted()
const;
126 void setAccepted(
bool accepted =
true);
129 QExplicitlySharedDataPointer<QEventPointPrivate> d;
130 friend class QMutableEventPoint;
131 friend class QPointerEvent;