5#include "private/qgesture_p.h"
6#include "private/qstandardgestures_p.h"
7#if QT_CONFIG(graphicsview)
11#include <private/qdebug_p.h>
19 QPinchGesture__ChangeFlags)
21 QGesture__GestureCancelPolicy)
126 return d_func()->gestureType;
131 return d_func()->state;
136 return d_func()->hotSpot;
143 d->isHotSpotSet =
true;
148 return d_func()->isHotSpotSet;
153 d_func()->isHotSpotSet =
false;
182 d->gestureCancelPolicy =
static_cast<uint>(
policy);
279 return d_func()->lastOffset;
284 return d_func()->offset;
290 return d->offset -
d->lastOffset;
295 return d_func()->acceleration;
300 d_func()->lastOffset =
value;
305 d_func()->offset =
value;
310 d_func()->acceleration =
value;
476 return d_func()->totalChangeFlags;
481 d_func()->totalChangeFlags =
value;
486 return d_func()->changeFlags;
491 d_func()->changeFlags =
value;
496 return d_func()->startCenterPoint;
501 return d_func()->lastCenterPoint;
506 return d_func()->centerPoint;
511 d_func()->startCenterPoint =
value;
516 d_func()->lastCenterPoint =
value;
521 d_func()->centerPoint =
value;
527 return d_func()->totalScaleFactor;
532 return d_func()->lastScaleFactor;
537 return d_func()->scaleFactor;
542 d_func()->totalScaleFactor =
value;
547 d_func()->lastScaleFactor =
value;
552 d_func()->scaleFactor =
value;
558 return d_func()->totalRotationAngle;
563 return d_func()->lastRotationAngle;
568 return d_func()->rotationAngle;
573 d_func()->totalRotationAngle =
value;
578 d_func()->lastRotationAngle =
value;
583 d_func()->rotationAngle =
value;
671 if (
d->swipeAngle < 0 ||
d->swipeAngle == 90 ||
d->swipeAngle == 270)
673 else if (
d->swipeAngle < 90 ||
d->swipeAngle > 270)
682 if (
d->swipeAngle <= 0 ||
d->swipeAngle == 180)
684 else if (
d->swipeAngle < 180)
692 return d_func()->swipeAngle;
697 d_func()->swipeAngle =
value;
736 return d_func()->position;
741 d_func()->position =
value;
780 return d_func()->position;
785 d_func()->position =
value;
878 for (
int i = 0;
i < m_gestures.
size(); ++
i)
880 return m_gestures.
at(
i);
985 m_accepted[gestureType] =
value;
1022 return m_accepted.
value(gestureType,
true);
1043#if QT_CONFIG(graphicsview)
1054QPointF QGestureEvent::mapToGraphicsScene(
const QPointF &gesturePoint)
const
1058 w =
w->parentWidget();
1067#ifndef QT_NO_DEBUG_STREAM
1095 d <<
",timeout=" << tap->
timeout() <<
')';
1101 d <<
",lastOffset=";
1115 <<
",changeFlags=" << pinch->
changeFlags() <<
",startCenterPoint=";
1117 d <<
",lastCenterPoint=";
1119 d <<
",centerPoint=";
1132 d <<
",horizontalDirection=";
1134 d <<
",verticalDirection=";
1136 d <<
",swipeAngle=" << swipe->
swipeAngle() <<
')';
1151 d <<
"QGestureEvent(" << gestureEvent->
gestures() <<
')';
1158#include <moc_qgesture.cpp>
The QGestureEvent class provides the description of triggered gestures.
void setWidget(QWidget *widget)
QGesture * gesture(Qt::GestureType type) const
Returns a gesture object by type.
void ignore()
Clears the accept flag parameter of the event object, the equivalent of calling setAccepted(false).
QList< QGesture * > activeGestures() const
Returns a list of active (not canceled) gestures.
~QGestureEvent()
Destroys QGestureEvent.
QWidget * widget() const
Returns the widget on which the event occurred.
QList< QGesture * > canceledGestures() const
Returns a list of canceled gestures.
QList< QGesture * > gestures() const
Returns all gestures that are delivered in the event.
QGestureEvent(const QList< QGesture * > &gestures)
Creates new QGestureEvent containing a list of gestures.
void setAccepted(QGesture *, bool)
Sets the accept flag of the given gesture object to the specified value.
void accept()
Sets the accept flag of the event object, the equivalent of calling setAccepted(true).
The QGesture class represents a gesture, containing properties that describe the corresponding user i...
Qt::GestureState state
the current state of the gesture
GestureCancelPolicy
This enum describes how accepting a gesture can cancel other gestures automatically.
void setGestureCancelPolicy(GestureCancelPolicy policy)
QGesture::GestureCancelPolicy gestureCancelPolicy
the policy for deciding what happens on accepting a gesture
Qt::GestureType gestureType
the type of the gesture
~QGesture()
Destroys the gesture object.
QGesture(QObject *parent=nullptr)
void setHotSpot(const QPointF &value)
QPointF hotSpot
The point that is used to find the receiver for the gesture event.
bool hasHotSpot
whether the gesture has a hot-spot
The QGraphicsView class provides a widget for displaying the contents of a QGraphicsScene.
qsizetype size() const noexcept
const_reference at(qsizetype i) const noexcept
void append(parameter_type t)
T value(const Key &key, const T &defaultValue=T()) const
The QPanGesture class describes a panning gesture made by the user.\inmodule QtWidgets.
QPointF delta
the offset from the previous input position to the current input
QPanGesture(QObject *parent=nullptr)
void setAcceleration(qreal value)
qreal acceleration
the acceleration in the motion of the touch point for this gesture
void setLastOffset(const QPointF &value)
~QPanGesture()
Destructor.
QPointF lastOffset
the last offset recorded for this gesture
QPointF offset
the total offset from the first input position to the current input position
void setOffset(const QPointF &value)
The QPinchGesture class describes a pinch gesture made by the user.\inmodule QtWidgets.
void setTotalRotationAngle(qreal value)
qreal totalRotationAngle
the total angle covered by the gesture
qreal totalScaleFactor
the total scale factor
ChangeFlags changeFlags
the property of the gesture that has changed in the current step
void setScaleFactor(qreal value)
QPointF centerPoint
the current center point
void setCenterPoint(const QPointF &value)
qreal lastRotationAngle
the last reported angle covered by the gesture motion
void setRotationAngle(qreal value)
void setLastScaleFactor(qreal value)
QPinchGesture(QObject *parent=nullptr)
qreal scaleFactor
the current scale factor
void setLastRotationAngle(qreal value)
~QPinchGesture()
Destructor.
QPointF lastCenterPoint
the last position of the center point recorded for this gesture
void setChangeFlags(ChangeFlags value)
void setStartCenterPoint(const QPointF &value)
void setTotalScaleFactor(qreal value)
void setTotalChangeFlags(ChangeFlags value)
qreal lastScaleFactor
the last scale factor recorded for this gesture
qreal rotationAngle
the angle covered by the gesture motion
void setLastCenterPoint(const QPointF &value)
ChangeFlags totalChangeFlags
the property of the gesture that has change
QPointF startCenterPoint
the starting position of the center point
\inmodule QtCore\reentrant
constexpr QPoint toPoint() const
Rounds the coordinates of this point to the nearest integer, and returns a QPoint object with the rou...
The QSwipeGesture class describes a swipe gesture made by the user.\inmodule QtWidgets.
~QSwipeGesture()
Destructor.
SwipeDirection verticalDirection
the vertical direction of the gesture
QSwipeGesture(QObject *parent=nullptr)
qreal swipeAngle
the angle of the motion associated with the gesture
SwipeDirection
This enum describes the possible directions for the gesture's motion along the horizontal and vertica...
void setSwipeAngle(qreal value)
SwipeDirection horizontalDirection
the horizontal direction of the gesture
The QTapAndHoldGesture class describes a tap-and-hold (aka LongTap) gesture made by the user....
QTapAndHoldGesture(QObject *parent=nullptr)
static void setTimeout(int msecs)
Set the timeout, in milliseconds, before the gesture triggers.
~QTapAndHoldGesture()
Destructor.
static int timeout()
Gets the timeout, in milliseconds, before the gesture triggers.
void setPosition(const QPointF &pos)
QPointF position
the position of the tap
The QTapGesture class describes a tap gesture made by the user.\inmodule QtWidgets.
void setPosition(const QPointF &pos)
QTapGesture(QObject *parent=nullptr)
~QTapGesture()
Destructor.
QPointF position
the position of the tap
Combined button and popup list for selecting options.
static void formatQEnum(QDebug &debug, QEnum value)
static void formatQPoint(QDebug &debug, const Point &point)
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
Q_WIDGETS_EXPORT QDebug operator<<(QDebug d, const QGesture *gesture)
static void formatGestureHeader(QDebug d, const char *className, const QGesture *gesture)
GLfloat GLfloat GLfloat w
[0]
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
const char className[16]
[1]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent