41 #include "private/qgesture_p.h"
42 #include "private/qstandardgestures_p.h"
43 #if QT_CONFIG(graphicsview)
47 #include <private/qdebug_p.h>
48 #ifndef QT_NO_GESTURES
155 return d_func()->gestureType;
160 return d_func()->state;
165 return d_func()->hotSpot;
172 d->isHotSpotSet =
true;
177 return d_func()->isHotSpotSet;
182 d_func()->isHotSpotSet =
false;
211 d->gestureCancelPolicy =
static_cast<uint>(
policy);
308 return d_func()->lastOffset;
313 return d_func()->offset;
319 return d->offset -
d->lastOffset;
324 return d_func()->acceleration;
329 d_func()->lastOffset =
value;
334 d_func()->offset =
value;
339 d_func()->acceleration =
value;
505 return d_func()->totalChangeFlags;
510 d_func()->totalChangeFlags =
value;
515 return d_func()->changeFlags;
520 d_func()->changeFlags =
value;
525 return d_func()->startCenterPoint;
530 return d_func()->lastCenterPoint;
535 return d_func()->centerPoint;
540 d_func()->startCenterPoint =
value;
545 d_func()->lastCenterPoint =
value;
550 d_func()->centerPoint =
value;
556 return d_func()->totalScaleFactor;
561 return d_func()->lastScaleFactor;
566 return d_func()->scaleFactor;
571 d_func()->totalScaleFactor =
value;
576 d_func()->lastScaleFactor =
value;
581 d_func()->scaleFactor =
value;
587 return d_func()->totalRotationAngle;
592 return d_func()->lastRotationAngle;
597 return d_func()->rotationAngle;
602 d_func()->totalRotationAngle =
value;
607 d_func()->lastRotationAngle =
value;
612 d_func()->rotationAngle =
value;
700 if (
d->swipeAngle < 0 ||
d->swipeAngle == 90 ||
d->swipeAngle == 270)
702 else if (
d->swipeAngle < 90 ||
d->swipeAngle > 270)
711 if (
d->swipeAngle <= 0 ||
d->swipeAngle == 180)
713 else if (
d->swipeAngle < 180)
721 return d_func()->swipeAngle;
726 d_func()->swipeAngle =
value;
765 return d_func()->position;
770 d_func()->position =
value;
809 return d_func()->position;
814 d_func()->position =
value;
907 for (
int i = 0;
i < m_gestures.
size(); ++
i)
909 return m_gestures.
at(
i);
1014 m_accepted[gestureType] =
value;
1051 return m_accepted.
value(gestureType,
true);
1072 #if QT_CONFIG(graphicsview)
1083 QPointF QGestureEvent::mapToGraphicsScene(
const QPointF &gesturePoint)
const
1087 w =
w->parentWidget();
1096 #ifndef QT_NO_DEBUG_STREAM
1101 QtDebugUtils::formatQEnum(
d, gesture->
state());
1104 QtDebugUtils::formatQPoint(
d, gesture->
hotSpot());
1114 formatGestureHeader(
d,
"QTapGesture", gesture);
1121 formatGestureHeader(
d,
"QTapAndHoldGesture", tap);
1123 QtDebugUtils::formatQPoint(
d, tap->
position());
1124 d <<
",timeout=" << tap->
timeout() <<
')';
1129 formatGestureHeader(
d,
"QPanGesture", pan);
1130 d <<
",lastOffset=";
1134 QtDebugUtils::formatQPoint(
d, pan->
offset());
1136 QtDebugUtils::formatQPoint(
d, pan->
delta());
1142 formatGestureHeader(
d,
"QPinchGesture", pinch);
1144 <<
",changeFlags=" << pinch->
changeFlags() <<
",startCenterPoint=";
1146 d <<
",lastCenterPoint=";
1148 d <<
",centerPoint=";
1160 formatGestureHeader(
d,
"QSwipeGesture", swipe);
1161 d <<
",horizontalDirection=";
1163 d <<
",verticalDirection=";
1165 d <<
",swipeAngle=" << swipe->
swipeAngle() <<
')';
1169 formatGestureHeader(
d,
"Custom gesture", gesture);
1180 d <<
"QGestureEvent(" << gestureEvent->
gestures() <<
')';
1187 #include <moc_qgesture.cpp>
small capitals from c petite p scientific i
[1]
operator<<(QDataStream &ds, qfloat16 f)
The QDebug class provides an output stream for debugging information.
Convenience class for custom QDebug operators.
The QEvent class is the base class of all event classes. Event objects contain event parameters.
The QGestureEvent class provides the description of triggered gestures.
void setWidget(QWidget *widget)
QGesture * gesture(Qt::GestureType type) const
virtual void setAccepted(bool accepted)
QList< QGesture * > activeGestures() const
QList< QGesture * > canceledGestures() const
QList< QGesture * > gestures() const
QGestureEvent(const QList< QGesture * > &gestures)
The QGesture class represents a gesture, containing properties that describe the corresponding user i...
Qt::GestureState state
the current state of the gesture
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(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 QObject class is the base class of all Qt objects.
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)
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)
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
The QPointF class defines a point in the plane using floating point precision.
constexpr QPoint toPoint() const
The QSwipeGesture class describes a swipe gesture made by the user.\inmodule QtWidgets.
SwipeDirection verticalDirection
the vertical direction of the gesture
QSwipeGesture(QObject *parent=nullptr)
qreal swipeAngle
the angle of the motion associated with the gesture
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)
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)
QPointF position
the position of the tap
QHighDpiScaling::Point position(T, QHighDpiScaling::Point::Kind)
EGLOutputLayerEXT EGLint EGLAttrib value
QT_END_INCLUDE_NAMESPACE typedef double qreal
GLfloat GLfloat GLfloat w
[0]
const char className[16]
[1]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent