5#include "private/qquickevents_p_p.h"
6#include "private/qquickdeliveryagent_p_p.h"
55 m_scenePressPosition =
QPointF();
56 m_sceneGrabPosition =
QPointF();
60 m_ellipseDiameters =
QSizeF();
69 m_device =
event->pointingDevice();
77 m_pressedModifiers =
event->modifiers();
83#if QT_CONFIG(tabletevent)
85 m_uniqueId =
event->pointingDevice()->uniqueId();
88 m_ellipseDiameters =
QSizeF();
91 m_uniqueId =
event->pointingDevice()->uniqueId();
93 m_pressure = m_pressedButtons ? 1 : 0;
94 m_ellipseDiameters =
QSizeF();
118 qreal pressureSum = 0;
119 QSizeF ellipseDiameterSum;
121 posSum += point.position();
122 scenePosSum += point.scenePosition();
123 pressPosSum += point.pressPosition();
124 scenePressPosSum += point.scenePressPosition();
125 velocitySum += point.velocity();
126 pressureSum += point.pressure();
127 ellipseDiameterSum += point.ellipseDiameters();
133 m_pressedButtons =
points.first().pressedButtons();
134 m_pressedModifiers =
points.first().modifiers();
135 m_position = posSum /
points.size();
136 m_scenePosition = scenePosSum /
points.size();
137 m_pressPosition = pressPosSum /
points.size();
138 m_scenePressPosition = scenePressPosSum /
points.size();
139 m_velocity = velocitySum /
points.size();
141 m_pressure = pressureSum /
points.size();
142 m_ellipseDiameters = ellipseDiameterSum /
points.size();
321#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)
QQuickHandlerPoint()
\qmltype handlerPoint \instantiates QQuickHandlerPoint \inqmlmodule QtQuick
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.
GLfixed GLfixed GLint GLint GLfixed points