#[repr(C)]pub struct QGestureEvent { /* private fields */ }
Expand description
The QGestureEvent class provides the description of triggered gestures.
C++ class: QGestureEvent
.
The QGestureEvent class provides the description of triggered gestures.
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.
Implementations§
Source§impl QGestureEvent
impl QGestureEvent
Sourcepub unsafe fn accept_q_gesture(&self, arg1: impl CastInto<Ptr<QGesture>>)
pub unsafe fn accept_q_gesture(&self, arg1: impl CastInto<Ptr<QGesture>>)
Sets the accept flag of the given gesture object, the equivalent of calling setAccepted(gesture, true).
Calls C++ function: void QGestureEvent::accept(QGesture* arg1)
.
Sets the accept flag of the given gesture object, the equivalent of calling setAccepted(gesture, true).
Setting the accept flag indicates that the event receiver wants the gesture. Unwanted gestures may be propagated to the parent widget.
See also QGestureEvent::ignore().
Sourcepub unsafe fn accept_gesture_type(&self, arg1: GestureType)
pub unsafe fn accept_gesture_type(&self, arg1: GestureType)
Sets the accept flag of the given gestureType, the equivalent of calling setAccepted(gestureType, true).
Calls C++ function: void QGestureEvent::accept(Qt::GestureType arg1)
.
Sets the accept flag of the given gestureType, the equivalent of calling setAccepted(gestureType, true).
Setting the accept flag indicates that the event receiver wants the gesture. Unwanted gestures may be propagated to the parent widget.
See also QGestureEvent::ignore().
Sourcepub unsafe fn active_gestures(&self) -> CppBox<QListOfQGesture>
pub unsafe fn active_gestures(&self) -> CppBox<QListOfQGesture>
Returns a list of active (not canceled) gestures.
Calls C++ function: QList<QGesture*> QGestureEvent::activeGestures() const
.
Returns a list of active (not canceled) gestures.
Sourcepub unsafe fn canceled_gestures(&self) -> CppBox<QListOfQGesture>
pub unsafe fn canceled_gestures(&self) -> CppBox<QListOfQGesture>
Returns a list of canceled gestures.
Calls C++ function: QList<QGesture*> QGestureEvent::canceledGestures() const
.
Returns a list of canceled gestures.
Sourcepub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<QGestureEvent>>,
) -> Ref<QGestureEvent>
pub unsafe fn copy_from( &self, other: impl CastInto<Ref<QGestureEvent>>, ) -> Ref<QGestureEvent>
The QGestureEvent class provides the description of triggered gestures.
Calls C++ function: QGestureEvent& QGestureEvent::operator=(const QGestureEvent& other)
.
The QGestureEvent class provides the description of triggered gestures.
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.
Sourcepub unsafe fn gesture(&self, type_: GestureType) -> QPtr<QGesture>
pub unsafe fn gesture(&self, type_: GestureType) -> QPtr<QGesture>
Returns a gesture object by type.
Calls C++ function: QGesture* QGestureEvent::gesture(Qt::GestureType type) const
.
Returns a gesture object by type.
Sourcepub unsafe fn gestures(&self) -> CppBox<QListOfQGesture>
pub unsafe fn gestures(&self) -> CppBox<QListOfQGesture>
Returns all gestures that are delivered in the event.
Calls C++ function: QList<QGesture*> QGestureEvent::gestures() const
.
Returns all gestures that are delivered in the event.
Sourcepub unsafe fn ignore_q_gesture(&self, arg1: impl CastInto<Ptr<QGesture>>)
pub unsafe fn ignore_q_gesture(&self, arg1: impl CastInto<Ptr<QGesture>>)
Clears the accept flag parameter of the given gesture object, the equivalent of calling setAccepted(gesture, false).
Calls C++ function: void QGestureEvent::ignore(QGesture* arg1)
.
Clears the accept flag parameter of the given gesture object, the equivalent of calling 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.
See also QGestureEvent::accept().
Sourcepub unsafe fn ignore_gesture_type(&self, arg1: GestureType)
pub unsafe fn ignore_gesture_type(&self, arg1: GestureType)
Clears the accept flag parameter of the given gestureType, the equivalent of calling setAccepted(gesture, false).
Calls C++ function: void QGestureEvent::ignore(Qt::GestureType arg1)
.
Clears the accept flag parameter of the given gestureType, the equivalent of calling setAccepted(gesture, false).
Clearing the accept flag indicates that the event receiver does not want the gesture. Unwanted gestures may be propgated to the parent widget.
See also QGestureEvent::accept().
Sourcepub unsafe fn is_accepted_q_gesture(
&self,
arg1: impl CastInto<Ptr<QGesture>>,
) -> bool
pub unsafe fn is_accepted_q_gesture( &self, arg1: impl CastInto<Ptr<QGesture>>, ) -> bool
Returns true
if the gesture is accepted; otherwise returns false
.
Calls C++ function: bool QGestureEvent::isAccepted(QGesture* arg1) const
.
Returns true
if the gesture is accepted; otherwise returns false
.
Sourcepub unsafe fn is_accepted_gesture_type(&self, arg1: GestureType) -> bool
pub unsafe fn is_accepted_gesture_type(&self, arg1: GestureType) -> bool
Returns true
if the gesture of type gestureType is accepted; otherwise returns false
.
Calls C++ function: bool QGestureEvent::isAccepted(Qt::GestureType arg1) const
.
Returns true
if the gesture of type gestureType is accepted; otherwise returns false
.
Sourcepub unsafe fn map_to_graphics_scene(
&self,
gesture_point: impl CastInto<Ref<QPointF>>,
) -> CppBox<QPointF>
pub unsafe fn map_to_graphics_scene( &self, gesture_point: impl CastInto<Ref<QPointF>>, ) -> CppBox<QPointF>
Returns the scene-local coordinates if the gesturePoint is inside a graphics view.
Calls C++ function: QPointF QGestureEvent::mapToGraphicsScene(const QPointF& gesturePoint) const
.
Returns the scene-local coordinates if the gesturePoint is inside a graphics view.
This functional might be useful when the gesture event is delivered to a QGraphicsObject to translate a point in screen coordinates to scene-local coordinates.
See also QPointF::isNull().
Sourcepub unsafe fn new(
gestures: impl CastInto<Ref<QListOfQGesture>>,
) -> CppBox<QGestureEvent>
pub unsafe fn new( gestures: impl CastInto<Ref<QListOfQGesture>>, ) -> CppBox<QGestureEvent>
Creates new QGestureEvent containing a list of gestures.
Calls C++ function: [constructor] void QGestureEvent::QGestureEvent(const QList<QGesture*>& gestures)
.
Creates new QGestureEvent containing a list of gestures.
Sourcepub unsafe fn new_copy(
other: impl CastInto<Ref<QGestureEvent>>,
) -> CppBox<QGestureEvent>
pub unsafe fn new_copy( other: impl CastInto<Ref<QGestureEvent>>, ) -> CppBox<QGestureEvent>
The QGestureEvent class provides the description of triggered gestures.
Calls C++ function: [constructor] void QGestureEvent::QGestureEvent(const QGestureEvent& other)
.
The QGestureEvent class provides the description of triggered gestures.
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.
Sourcepub unsafe fn set_accepted_q_gesture_bool(
&self,
arg1: impl CastInto<Ptr<QGesture>>,
arg2: bool,
)
pub unsafe fn set_accepted_q_gesture_bool( &self, arg1: impl CastInto<Ptr<QGesture>>, arg2: bool, )
Sets the accept flag of the given gesture object to the specified value.
Calls C++ function: void QGestureEvent::setAccepted(QGesture* arg1, bool arg2)
.
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 accept(gesture), and cleared with ignore(gesture).
See also isAccepted().
Sourcepub unsafe fn set_accepted_gesture_type_bool(
&self,
arg1: GestureType,
arg2: bool,
)
pub unsafe fn set_accepted_gesture_type_bool( &self, arg1: GestureType, arg2: bool, )
Sets the accept flag of the given gestureType object to the specified value.
Calls C++ function: void QGestureEvent::setAccepted(Qt::GestureType arg1, bool arg2)
.
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 accept(gestureType), and cleared with ignore(gestureType).
Sourcepub unsafe fn set_widget(&self, widget: impl CastInto<Ptr<QWidget>>)
pub unsafe fn set_widget(&self, widget: impl CastInto<Ptr<QWidget>>)
Calls C++ function: void QGestureEvent::setWidget(QWidget* widget)
.
Methods from Deref<Target = QEvent>§
Sourcepub unsafe fn accept(&self)
pub unsafe fn accept(&self)
Sets the accept flag of the event object, the equivalent of calling setAccepted(true).
Calls C++ function: void QEvent::accept()
.
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.
See also ignore().
Sourcepub unsafe fn copy_from(&self, other: impl CastInto<Ref<QEvent>>) -> Ref<QEvent>
pub unsafe fn copy_from(&self, other: impl CastInto<Ref<QEvent>>) -> Ref<QEvent>
Calls C++ function: QEvent& QEvent::operator=(const QEvent& other)
.
Sourcepub unsafe fn ignore(&self)
pub unsafe fn ignore(&self)
Clears the accept flag parameter of the event object, the equivalent of calling setAccepted(false).
Calls C++ function: void QEvent::ignore()
.
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.
See also accept().
Sourcepub unsafe fn is_accepted(&self) -> bool
pub unsafe fn is_accepted(&self) -> bool
the accept flag of the event object
Calls C++ function: bool QEvent::isAccepted() const
.
the accept flag of the event object
Setting the accept parameter indicates that the event receiver wants the event. Unwanted events might be propagated to the parent widget. By default, isAccepted() is set to true, but don't rely on this as subclasses may choose to clear it in their constructor.
For convenience, the accept flag can also be set with accept(), and cleared with ignore().
Access functions:
bool | isAccepted() const |
void | setAccepted(bool accepted) |
Sourcepub unsafe fn set_accepted(&self, accepted: bool)
pub unsafe fn set_accepted(&self, accepted: bool)
the accept flag of the event object
Calls C++ function: void QEvent::setAccepted(bool accepted)
.
the accept flag of the event object
Setting the accept parameter indicates that the event receiver wants the event. Unwanted events might be propagated to the parent widget. By default, isAccepted() is set to true, but don't rely on this as subclasses may choose to clear it in their constructor.
For convenience, the accept flag can also be set with accept(), and cleared with ignore().
Access functions:
bool | isAccepted() const |
void | setAccepted(bool accepted) |
Sourcepub unsafe fn spontaneous(&self) -> bool
pub unsafe fn spontaneous(&self) -> bool
Returns true
if the event originated outside the application (a system event); otherwise returns false
.
Calls C++ function: bool QEvent::spontaneous() const
.
Returns true
if the event originated outside the application (a system event); otherwise returns false
.
The return value of this function is not defined for paint events.
Trait Implementations§
Source§impl CppDeletable for QGestureEvent
impl CppDeletable for QGestureEvent
Source§unsafe fn delete(&self)
unsafe fn delete(&self)
Destroys QGestureEvent.
Calls C++ function: virtual [destructor] void QGestureEvent::~QGestureEvent()
.
Destroys QGestureEvent.
Source§impl Deref for QGestureEvent
impl Deref for QGestureEvent
Source§impl DynamicCast<QGestureEvent> for QEvent
impl DynamicCast<QGestureEvent> for QEvent
Source§unsafe fn dynamic_cast(ptr: Ptr<QEvent>) -> Ptr<QGestureEvent>
unsafe fn dynamic_cast(ptr: Ptr<QEvent>) -> Ptr<QGestureEvent>
Calls C++ function: QGestureEvent* dynamic_cast<QGestureEvent*>(QEvent* ptr)
.
Source§impl StaticDowncast<QGestureEvent> for QEvent
impl StaticDowncast<QGestureEvent> for QEvent
Source§unsafe fn static_downcast(ptr: Ptr<QEvent>) -> Ptr<QGestureEvent>
unsafe fn static_downcast(ptr: Ptr<QEvent>) -> Ptr<QGestureEvent>
Calls C++ function: QGestureEvent* static_cast<QGestureEvent*>(QEvent* ptr)
.
Source§impl StaticUpcast<QEvent> for QGestureEvent
impl StaticUpcast<QEvent> for QGestureEvent
Source§unsafe fn static_upcast(ptr: Ptr<QGestureEvent>) -> Ptr<QEvent>
unsafe fn static_upcast(ptr: Ptr<QGestureEvent>) -> Ptr<QEvent>
Calls C++ function: QEvent* static_cast<QEvent*>(QGestureEvent* ptr)
.