50 #ifndef QT_NO_GESTURES 63 QGestureRecognizer::Result
101 QGestureRecognizer::Result
162 #if defined(QT_MAC_USE_COCOA) 164 QMacPanGestureRecognizer::QMacPanGestureRecognizer() : _panCanceled(
true)
173 if (
QWidget *w = qobject_cast<QWidget *>(target)) {
181 QGestureRecognizer::Result
184 const int panBeginDelay = 300;
185 const int panBeginRadius = 3;
189 switch (event->
type()) {
195 _panTimer.start(panBeginDelay, target);
196 _panCanceled =
false;
214 if (_panTimer.isActive()) {
218 if ((p - _startPos).manhattanLength() > panBeginRadius) {
225 const QPointF posOffset = p - _startPos;
231 }
else if (_panTimer.isActive()) {
241 if (ev->
timerId() == _panTimer.timerId()) {
268 #endif // QT_MAC_USE_COCOA 272 #endif // QT_NO_GESTURES
qreal rotationAngle
the angle covered by the gesture motion
The QPanGesture class describes a panning gesture made by the user.
#define QT_END_NAMESPACE
This macro expands to.
void setCenterPoint(const QPointF &value)
void setLastScaleFactor(qreal value)
static Expression::Ptr create(Expression *const expr, const YYLTYPE &sourceLocator, const ParserContext *const parseInfo)
Q_CORE_EXPORT QTextStream & reset(QTextStream &s)
The QPointF class defines a point in the plane using floating point precision.
QGesture * create(QObject *target)
This function is called by Qt to create a new QGesture object for the given target (QWidget or QGraph...
void setChangeFlags(ChangeFlags value)
QMacPinchGestureRecognizer()
The QObject class is the base class of all Qt objects.
qreal x() const
Returns the x-coordinate of this point.
QPointF offset
the total offset from the first input position to the current input position
qreal scaleFactor
the current scale factor
void setTotalScaleFactor(qreal value)
#define QT_BEGIN_NAMESPACE
This macro expands to.
virtual void reset(QGesture *state)
This function is called by the framework to reset a given gesture.
QGestureRecognizer::Result recognize(QGesture *gesture, QObject *watched, QEvent *event)
Handles the given event for the watched object, updating the state of the gesture object as required...
void setLastRotationAngle(qreal value)
The QPinchGesture class describes a pinch gesture made by the user.
void setScaleFactor(qreal value)
int timerId() const
Returns the unique timer identifier, which is the same identifier as returned from QObject::startTime...
QGestureRecognizer::Result recognize(QGesture *gesture, QObject *watched, QEvent *event)
Handles the given event for the watched object, updating the state of the gesture object as required...
void setOffset(const QPointF &value)
QPointF startCenterPoint
the starting position of the center point
ChangeFlags totalChangeFlags
the property of the gesture that has change
bool isWidgetType() const
Returns true if the object is a widget; otherwise returns false.
The QTimerEvent class contains parameters that describe a timer event.
void setLastOffset(const QPointF &value)
The QGesture class represents a gesture, containing properties that describe the corresponding user i...
void setHotSpot(const QPointF &value)
void reset(QGesture *gesture)
This function is called by the framework to reset a given gesture.
const QList< QTouchEvent::TouchPoint > & touchPoints() const
Returns the list of touch points contained in the touch event.
int size() const
Returns the number of items in the list.
ChangeFlags changeFlags
the property of the gesture that has changed in the current step
QGesture * create(QObject *target)
This function is called by Qt to create a new QGesture object for the given target (QWidget or QGraph...
qreal y() const
Returns the y-coordinate of this point.
QMacSwipeGestureRecognizer()
The QTouchEvent class contains parameters that describe a touch event.
void reset(QGesture *gesture)
This function is called by the framework to reset a given gesture.
void setTotalRotationAngle(qreal value)
void setSwipeAngle(qreal value)
void setLastCenterPoint(const QPointF &value)
The QSwipeGesture class describes a swipe gesture made by the user.
The QEvent class is the base class of all event classes.
Type type() const
Returns the event type.
void setAcceleration(qreal value)
void setStartCenterPoint(const QPointF &value)
void setTotalChangeFlags(ChangeFlags value)
static QPoint pos()
Returns the position of the cursor (hot spot) in global screen coordinates.
void setRotationAngle(qreal value)