51 #ifndef QT_NO_GESTURES 62 #if defined(Q_OS_WIN) && !defined(QT_NO_NATIVE_GESTURES) 64 if (!qobject_cast<QAbstractScrollArea *>(target->
parent()))
82 QGestureRecognizer::Result result;
83 switch (event->
type()) {
173 QGestureRecognizer::Result result;
175 switch (event->
type()) {
216 d->
scaleFactor = line.length() / lastLine.length();
225 if (startAngle > 180)
227 const qreal rotationAngle = startAngle -
angle;
302 QGestureRecognizer::Result result;
304 switch (event->
type()) {
343 const int distance = xDistance >= yDistance ? xDistance : yDistance;
350 static const int MoveThreshold = 50;
351 if (xDistance > MoveThreshold || yDistance > MoveThreshold) {
442 switch (event->
type()) {
454 enum { TapRadius = 40 };
502 QGestureRecognizer::Result
517 #ifndef QT_NO_GRAPHICSVIEW 521 enum { TapRadius = 40 };
523 switch (event->
type()) {
524 #ifndef QT_NO_GRAPHICSVIEW 547 #ifndef QT_NO_GRAPHICSVIEW 567 #ifndef QT_NO_GRAPHICSVIEW 595 #endif // QT_NO_GESTURES int startTimer(int interval)
Starts a timer and returns a timer identifier, or returns zero if it could not start a timer...
QTapAndHoldGestureRecognizer()
The QPanGesture class describes a panning gesture made by the user.
QPoint screenPos() const
Returns the mouse cursor position in screen coordinates.
void reset(QGesture *state)
This function is called by the framework to reset a given gesture.
#define QT_END_NAMESPACE
This macro expands to.
QPinchGesture::ChangeFlags changeFlags
QGestureRecognizer::Result recognize(QGesture *state, QObject *watched, QEvent *event)
Handles the given event for the watched object, updating the state of the gesture object as required...
The QPointF class defines a point in the plane using floating point precision.
The QGraphicsSceneMouseEvent class provides mouse events in the graphics view framework.
The QTapAndHoldGesture class describes a tap-and-hold (aka LongTap) gesture made by the user...
QPointF lastScreenPos() const
Returns the screen position of this touch point from the previous touch event.
void reset(QGesture *state)
This function is called by the framework to reset a given gesture.
The QObject class is the base class of all Qt objects.
qreal x() const
Returns the x-coordinate of this point.
The QLineF class provides a two-dimensional vector using floating point precision.
#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.
qint64 restart()
Restarts the timer and returns the time elapsed since the previous start.
QGesture * create(QObject *target)
This function is called by Qt to create a new QGesture object for the given target (QWidget or QGraph...
QGesture * create(QObject *target)
This function is called by Qt to create a new QGesture object for the given target (QWidget or QGraph...
QGesture * create(QObject *target)
This function is called by Qt to create a new QGesture object for the given target (QWidget or QGraph...
QSwipeGestureRecognizer()
const T & at(int i) const
Returns the item at index position i in the list.
Qt::GestureState state() const
int manhattanLength() const
Returns the sum of the absolute values of x() and y(), traditionally known as the "Manhattan length" ...
The QPinchGesture class describes a pinch gesture made by the user.
bool isNull() const
Returns true if both the x and y coordinates are set to 0, otherwise returns false.
QGestureRecognizer::Result recognize(QGesture *state, QObject *watched, QEvent *event)
Handles the given event for the watched object, updating the state of the gesture object as required...
Qt::TouchPointStates touchPointStates() const
Returns a bitwise OR of all the touch point states for this event.
QPinchGestureRecognizer()
void invalidate()
Marks this QElapsedTimer object as invalid.
QPointF screenPos() const
Returns the screen position of this touch point.
QPointF startScreenPos() const
Returns the starting screen position of this touch point.
QGestureRecognizer::Result recognize(QGesture *state, QObject *watched, QEvent *event)
Handles the given event for the watched object, updating the state of the gesture object as required...
The QMouseEvent class contains parameters that describe a mouse event.
QGestureRecognizer::Result recognize(QGesture *state, QObject *watched, QEvent *event)
Handles the given event for the watched object, updating the state of the gesture object as required...
bool isWidgetType() const
Returns true if the object is a widget; otherwise returns false.
qreal angle(const QPointF &p1, const QPointF &p2)
QGestureRecognizer::Result recognize(QGesture *state, QObject *watched, QEvent *event)
Handles the given event for the watched object, updating the state of the gesture object as required...
QGesture * create(QObject *target)
This function is called by Qt to create a new QGesture object for the given target (QWidget or QGraph...
QSwipeGesture::SwipeDirection horizontalDirection
void reset(QGesture *state)
This function is called by the framework to reset a given gesture.
The QGesture class represents a gesture, containing properties that describe the corresponding user i...
QPoint toPoint() const
Rounds the coordinates of this point to the nearest integer, and returns a QPoint object with the rou...
void setHotSpot(const QPointF &value)
QPointF pos() const
Returns the position of this touch point, relative to the widget or QGraphicsItem that received the e...
QObject * parent() const
Returns a pointer to the parent object.
The QPoint class defines a point in the plane using integer precision.
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.
QPinchGesture::ChangeFlags totalChangeFlags
int y() const
Returns the y coordinate of this point.
qreal y() const
Returns the y-coordinate of this point.
The TouchPoint class provides information about a touch point in a QTouchEvent.
void reset(QGesture *state)
This function is called by the framework to reset a given gesture.
The QTouchEvent class contains parameters that describe a touch event.
The QTapGesture class describes a tap gesture made by the user.
int x() const
Returns the x coordinate of this point.
QGesture * create(QObject *target)
This function is called by Qt to create a new QGesture object for the given target (QWidget or QGraph...
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.
const QPoint & globalPos() const
Returns the global position of the mouse cursor at the time of the event.
SwipeDirection
This enum describes the possible directions for the gesture's motion along the horizontal and vertica...
void reset(QGesture *state)
This function is called by the framework to reset a given gesture.
void start()
Starts this timer.
QPointF startPos() const
Returns the starting position of this touch point, relative to the widget or QGraphicsItem that recei...
QSwipeGesture::SwipeDirection verticalDirection
void killTimer(int id)
Kills the timer with timer identifier, id.