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