5#include "private/qeventpoint_p.h"
6#include "private/qpointingdevice_p.h"
284{
return d ? d->
device :
nullptr; }
405{
return d ? d->
accept :
false; }
433#if QT_DEPRECATED_SINCE(6, 0)
439QPointF QEventPoint::startNormalizedPos()
const
461QPointF QEventPoint::lastNormalizedPos()
const
510 switch (
other.state()) {
512 setGlobalPressPosition(
target,
other.globalPosition());
513 setGlobalLastPosition(
target,
other.globalPosition());
514 if (
target.pressure() < 0)
519 if (
target.globalPosition() !=
other.globalPosition())
525 if (
target.globalPosition() !=
other.globalPosition())
527 if (
target.pressure() < 0)
536 setEllipseDiameters(
target,
other.ellipseDiameters());
568 p.d->pressTimestamp =
t;
569 p.d->globalPressPos =
p.d->globalPos;
571 if (
p.d->timestamp ==
t)
590 static const float KalmanGain = 0.7f;
591 pd->
velocity = newVelocity * KalmanGain + pd->
velocity * (1.0f - KalmanGain);
592 qCDebug(lcPointerVel) <<
"velocity" << newVelocity <<
"filtered" << pd->
velocity <<
618#include "moc_qeventpoint.cpp"
IOBluetoothDevice * device
QPointingDeviceUniqueId uniqueId
const QPointingDevice * device
The QEventPoint class provides information about a point in a QPointerEvent.
QPointF pressPosition
the position at which this point was pressed.
QPointF globalPosition
the global position of this point.
QEventPoint(int id=-1, const QPointingDevice *device=nullptr)
qreal pressure
the pressure of this point.
~QEventPoint()
Destroys the event point.
QPointF normalizedPosition() const
Returns the normalized position of this point.
int id
the ID number of this event point.
bool operator==(const QEventPoint &other) const noexcept
Returns true if this event point is equal to other, otherwise return false.
QPointF sceneGrabPosition
the scene position at which this point was grabbed.
QPointF scenePosition
the scene position of this point.
QPointF globalGrabPosition
the global position at which this point was grabbed.
State state
the current state of the event point.
QEventPoint & operator=(const QEventPoint &other) noexcept
Assigns other to this event point and returns a reference to this event point.
void setAccepted(bool accepted=true)
ulong timestamp
the most recent time at which this point was included in a QPointerEvent.
qreal rotation
the angular orientation of this point.
QPointF scenePressPosition
the scene position at which this point was pressed.
ulong pressTimestamp
the most recent time at which this point was pressed.
QPointF globalLastPosition
the global position of this point from the previous press or move event.
QPointF sceneLastPosition
the scene position of this point from the previous press or move event.
QPointF grabPosition
the position at which this point was grabbed.
State
Specifies the state of this event point.
const QPointingDevice * device
the pointing device from which this event point originates.
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 globalPressPosition
the global position at which this point was pressed.
QPointF position
the position of this point.
QPointF lastPosition
the position of this point from the previous press or move event.
qreal timeHeld
the duration, in seconds, since this point was pressed and not released.
bool accepted
the accepted state of the event point.
QVector2D velocity
a velocity vector, in units of pixels per second, in the coordinate.
ulong lastTimestamp
the time from the previous QPointerEvent that contained this point.
static Q_GUI_EXPORT void detach(QEventPoint &p)
static Q_GUI_EXPORT void update(const QEventPoint &from, QEventPoint &to)
static Q_GUI_EXPORT void setTimestamp(QEventPoint &p, ulong t)
\inmodule QtCore\reentrant
EventPointData * pointById(int id) const
static QPointingDevicePrivate * get(QPointingDevice *q)
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.
The QVector2D class represents a vector or vertex in 2D space.
Combined button and popup list for selecting options.
#define Q_LOGGING_CATEGORY(name,...)
#define qCDebug(category,...)
n void setPosition(void) \n\
GLsizei const void * pointer
#define QT_DEFINE_QESDP_SPECIALIZATION_DTOR(Class)