QtBase
v6.3.1
|
The QGestureEvent class provides the description of triggered gestures. More...
#include <qgesture.h>
Friends | |
class | QApplication |
class | QGestureManager |
The QGestureEvent class provides the description of triggered gestures.
\inmodule QtWidgets
The QGestureEvent class contains a list of gestures, which can be obtained using the gestures() function.
The gestures are either active or canceled. A list of those that are currently being executed can be obtained using the activeGestures() function. A list of those which were previously active and have been canceled can be accessed using the canceledGestures() function. A gesture might be canceled if the current window loses focus, for example, or because of a timeout, or for other reasons.
If the event handler does not accept the event by calling the generic QEvent::accept() function, all individual QGesture object that were not accepted and in the Qt::GestureStarted state will be propagated up the parent widget chain until a widget accepts them individually, by calling QGestureEvent::accept() for each of them, or an event filter consumes the event.
Definition at line 275 of file qgesture.h.
Creates new QGestureEvent containing a list of gestures.
Definition at line 881 of file qgesture.cpp.
QGestureEvent::~QGestureEvent | ( | ) |
Destroys QGestureEvent.
Definition at line 890 of file qgesture.cpp.
|
inline |
Sets the accept flag of the event object, the equivalent of calling setAccepted(true).
Setting the accept parameter indicates that the event receiver wants the event. Unwanted events might be propagated to the parent widget.
Definition at line 313 of file qcoreevent.h.
Sets the accept flag of the given gesture object, the equivalent of calling \l{QGestureEvent::setAccepted()}{setAccepted(gesture, true)}.
Setting the accept flag indicates that the event receiver wants the gesture. Unwanted gestures may be propagated to the parent widget.
Definition at line 967 of file qgesture.cpp.
void QGestureEvent::accept | ( | Qt::GestureType | gestureType | ) |
Sets the accept flag of the given gestureType, the equivalent of calling \l{QGestureEvent::setAccepted()}{setAccepted(gestureType, true)}.
Setting the accept flag indicates that the event receiver wants the gesture. Unwanted gestures may be propagated to the parent widget.
Definition at line 1026 of file qgesture.cpp.
Returns a list of active (not canceled) gestures.
Definition at line 916 of file qgesture.cpp.
Returns a list of canceled gestures.
Definition at line 929 of file qgesture.cpp.
QGesture * QGestureEvent::gesture | ( | Qt::GestureType | type | ) | const |
Returns a gesture object by type.
Definition at line 905 of file qgesture.cpp.
Returns all gestures that are delivered in the event.
Definition at line 897 of file qgesture.cpp.
|
inline |
Clears the accept flag parameter of the event object, the equivalent of calling setAccepted(false).
Clearing the accept parameter indicates that the event receiver does not want the event. Unwanted events might be propagated to the parent widget.
Definition at line 314 of file qcoreevent.h.
Clears the accept flag parameter of the given gesture object, the equivalent of calling \l{QGestureEvent::setAccepted()}{setAccepted(gesture, false)}.
Clearing the accept flag indicates that the event receiver does not want the gesture. Unwanted gestures may be propagated to the parent widget.
Definition at line 982 of file qgesture.cpp.
void QGestureEvent::ignore | ( | Qt::GestureType | gestureType | ) |
Clears the accept flag parameter of the given gestureType, the equivalent of calling \l{QGestureEvent::setAccepted()}{setAccepted(gesture, false)}.
Clearing the accept flag indicates that the event receiver does not want the gesture. Unwanted gestures may be propagated to the parent widget.
Definition at line 1040 of file qgesture.cpp.
|
inline |
bool QGestureEvent::isAccepted | ( | QGesture * | gesture | ) | const |
Returns true
if the gesture is accepted; otherwise returns false
.
Definition at line 991 of file qgesture.cpp.
bool QGestureEvent::isAccepted | ( | Qt::GestureType | gestureType | ) | const |
Returns true
if the gesture of type gestureType is accepted; otherwise returns false
.
Definition at line 1049 of file qgesture.cpp.
|
inline |
Sets the accept flag of the given gesture object to the specified value.
Setting the accept flag indicates that the event receiver wants the gesture. Unwanted gestures may be propagated to the parent widget.
By default, gestures in events of type QEvent::Gesture are accepted, and gestures in QEvent::GestureOverride events are ignored.
For convenience, the accept flag can also be set with \l{QGestureEvent::accept()}{accept(gesture)}, and cleared with \l{QGestureEvent::ignore()}{ignore(gesture)}.
Definition at line 952 of file qgesture.cpp.
void QGestureEvent::setAccepted | ( | Qt::GestureType | gestureType, |
bool | value | ||
) |
Sets the accept flag of the given gestureType object to the specified value.
Setting the accept flag indicates that the event receiver wants to receive gestures of the specified type, gestureType. Unwanted gestures may be propagated to the parent widget.
By default, gestures in events of type QEvent::Gesture are accepted, and gestures in QEvent::GestureOverride events are ignored.
For convenience, the accept flag can also be set with \l{QGestureEvent::accept()}{accept(gestureType)}, and cleared with \l{QGestureEvent::ignore()}{ignore(gestureType)}.
Definition at line 1011 of file qgesture.cpp.
Definition at line 1059 of file qgesture.cpp.
QWidget * QGestureEvent::widget | ( | ) | const |
Returns the widget on which the event occurred.
Definition at line 1067 of file qgesture.cpp.
|
friend |
Definition at line 315 of file qgesture.h.
|
friend |
Definition at line 316 of file qgesture.h.