![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
The QGestureEvent class provides the description of triggered gestures. More...
#include <qgesture.h>
Public Member Functions | |
QGestureEvent (const QList< QGesture * > &gestures) | |
Creates new QGestureEvent containing a list of gestures. | |
~QGestureEvent () | |
Destroys QGestureEvent. | |
QList< QGesture * > | gestures () const |
Returns all gestures that are delivered in the event. | |
QGesture * | gesture (Qt::GestureType type) const |
Returns a gesture object by type. | |
QList< QGesture * > | activeGestures () const |
Returns a list of active (not canceled) gestures. | |
QList< QGesture * > | canceledGestures () const |
Returns a list of canceled gestures. | |
void | setAccepted (QGesture *, bool) |
Sets the accept flag of the given gesture object to the specified value. | |
void | accept (QGesture *) |
Sets the accept flag of the given gesture object, the equivalent of calling \l{QGestureEvent::setAccepted()}{setAccepted(gesture, true)}. | |
void | ignore (QGesture *) |
Clears the accept flag parameter of the given gesture object, the equivalent of calling \l{QGestureEvent::setAccepted()}{setAccepted(gesture, false)}. | |
bool | isAccepted (QGesture *) const |
Returns true if the gesture is accepted; otherwise returns false . | |
void | setAccepted (Qt::GestureType, bool) |
Sets the accept flag of the given gestureType object to the specified value. | |
void | accept (Qt::GestureType) |
Sets the accept flag of the given gestureType, the equivalent of calling \l{QGestureEvent::setAccepted()}{setAccepted(gestureType, true)}. | |
void | ignore (Qt::GestureType) |
Clears the accept flag parameter of the given gestureType, the equivalent of calling \l{QGestureEvent::setAccepted()}{setAccepted(gesture, false)}. | |
bool | isAccepted (Qt::GestureType) const |
Returns true if the gesture of type gestureType is accepted; otherwise returns false . | |
void | setWidget (QWidget *widget) |
QWidget * | widget () const |
Returns the widget on which the event occurred. | |
virtual void | setAccepted (bool accepted) |
bool | isAccepted () const |
void | accept () |
Sets the accept flag of the event object, the equivalent of calling setAccepted(true). | |
void | ignore () |
Clears the accept flag parameter of the event object, the equivalent of calling setAccepted(false). | |
Public Member Functions inherited from QEvent | |
QEvent (Type type) | |
Constructs an event object of type type. | |
virtual | ~QEvent () |
Destroys the event. | |
Type | type () const |
Returns the event type. | |
bool | spontaneous () const |
Returns true if the event originated outside the application (a system event); otherwise returns false . | |
bool | isAccepted () const |
void | accept () |
Sets the accept flag of the event object, the equivalent of calling setAccepted(true). | |
void | ignore () |
Clears the accept flag parameter of the event object, the equivalent of calling setAccepted(false). | |
bool | isInputEvent () const noexcept |
bool | isPointerEvent () const noexcept |
bool | isSinglePointEvent () const noexcept |
virtual QEvent * | clone () const |
Creates and returns an identical copy of this event. |
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 244 of file qgesture.h.
Creates new QGestureEvent containing a list of gestures.
Definition at line 853 of file qgesture.cpp.
QGestureEvent::~QGestureEvent | ( | ) |
Destroys QGestureEvent.
Definition at line 862 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 316 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 939 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 998 of file qgesture.cpp.
Returns a list of active (not canceled) gestures.
Definition at line 888 of file qgesture.cpp.
Returns a list of canceled gestures.
Definition at line 901 of file qgesture.cpp.
QGesture * QGestureEvent::gesture | ( | Qt::GestureType | type | ) | const |
Returns a gesture object by type.
Definition at line 877 of file qgesture.cpp.
Returns all gestures that are delivered in the event.
Definition at line 869 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 317 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 954 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 1012 of file qgesture.cpp.
|
inline |
Definition at line 314 of file qcoreevent.h.
bool QGestureEvent::isAccepted | ( | QGesture * | gesture | ) | const |
Returns true
if the gesture is accepted; otherwise returns false
.
Definition at line 963 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 1021 of file qgesture.cpp.
|
inlinevirtual |
Reimplemented from QEvent.
Definition at line 313 of file qcoreevent.h.
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 924 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 983 of file qgesture.cpp.
Sets the widget for this event to the widget specified.
Definition at line 1031 of file qgesture.cpp.
QWidget * QGestureEvent::widget | ( | ) | const |
Returns the widget on which the event occurred.
Definition at line 1039 of file qgesture.cpp.
|
friend |
Definition at line 284 of file qgesture.h.
|
friend |
Definition at line 285 of file qgesture.h.