5#include "private/qquickevents_p_p.h"
6#include "private/qquickdeliveryagent_p_p.h"
56 m_scenePressPosition =
QPointF();
57 m_sceneGrabPosition =
QPointF();
61 m_ellipseDiameters =
QSizeF();
70 m_device =
event->pointingDevice();
78 m_pressedModifiers =
event->modifiers();
84#if QT_CONFIG(tabletevent)
86 m_uniqueId =
event->pointingDevice()->uniqueId();
89 m_ellipseDiameters =
QSizeF();
92 m_uniqueId =
event->pointingDevice()->uniqueId();
94 m_pressure = m_pressedButtons ? 1 : 0;
95 m_ellipseDiameters =
QSizeF();
119 qreal pressureSum = 0;
120 QSizeF ellipseDiameterSum;
122 posSum += point.position();
123 scenePosSum += point.scenePosition();
124 pressPosSum += point.pressPosition();
125 scenePressPosSum += point.scenePressPosition();
126 velocitySum += point.velocity();
127 pressureSum += point.pressure();
128 ellipseDiameterSum += point.ellipseDiameters();
134 m_pressedButtons =
points.first().pressedButtons();
135 m_pressedModifiers =
points.first().modifiers();
136 m_position = posSum /
points.size();
137 m_scenePosition = scenePosSum /
points.size();
138 m_pressPosition = pressPosSum /
points.size();
139 m_scenePressPosition = scenePressPosSum /
points.size();
140 m_velocity = velocitySum /
points.size();
142 m_pressure = pressureSum /
points.size();
143 m_ellipseDiameters = ellipseDiameterSum /
points.size();
322#include "moc_qquickhandlerpoint_p.cpp"
The QEventPoint class provides information about a point in a QPointerEvent.
qreal pressure
the pressure of this point.
int id
the ID number of this event point.
QPointF scenePosition
the scene position of this point.
State state
the current state of the event point.
qreal rotation
the angular orientation of this point.
QSizeF ellipseDiameters
the width and height of the bounding ellipse of the touch point.
QPointingDeviceUniqueId uniqueId
the unique ID of this point or token, if any.
QPointF position
the position of this point.
QVector2D velocity
a velocity vector, in units of pixels per second, in the coordinate.
QPointF mapFromScene(const QPointF &point) const
Maps the point point, which is in this item's scene's coordinate system, to this item's coordinate sy...
\inmodule QtCore\reentrant
A base class for pointer events.
QPointingDeviceUniqueId identifies a unique object, such as a tagged token or stylus,...
static const QPointingDevice * primaryPointingDevice(const QString &seatName=QString())
Returns the primary pointing device (the core pointer, traditionally assumed to be a mouse) on the gi...
static bool isTabletEvent(const QPointerEvent *ev)
static bool isTouchEvent(const QPointerEvent *ev)
void localize(QQuickItem *item)
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
A base class for pointer events containing a single point, such as mouse events.
The QTouchEvent class contains parameters that describe a touch event.
The QVector2D class represents a vector or vertex in 2D space.
Combined button and popup list for selecting options.
#define Q_DECLARE_LOGGING_CATEGORY(name)
GLfixed GLfixed GLint GLint GLfixed points