[][src]Struct qt_widgets::QGestureEvent

#[repr(C)]pub struct QGestureEvent { /* fields omitted */ }

The QGestureEvent class provides the description of triggered gestures.

C++ class: QGestureEvent.

C++ documentation:

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.

Methods

impl QGestureEvent[src]

pub unsafe fn accept_q_gesture(&self, arg1: impl CastInto<Ptr<QGesture>>)[src]

Sets the accept flag of the given gesture object, the equivalent of calling setAccepted(gesture, true).

Calls C++ function: void QGestureEvent::accept(QGesture* arg1).

C++ documentation:

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().

pub unsafe fn accept_gesture_type(&self, arg1: GestureType)[src]

Sets the accept flag of the given gestureType, the equivalent of calling setAccepted(gestureType, true).

Calls C++ function: void QGestureEvent::accept(Qt::GestureType arg1).

C++ documentation:

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().

pub unsafe fn active_gestures(&self) -> CppBox<QListOfQGesture>[src]

Returns a list of active (not canceled) gestures.

Calls C++ function: QList<QGesture*> QGestureEvent::activeGestures() const.

C++ documentation:

Returns a list of active (not canceled) gestures.

pub unsafe fn canceled_gestures(&self) -> CppBox<QListOfQGesture>[src]

Returns a list of canceled gestures.

Calls C++ function: QList<QGesture*> QGestureEvent::canceledGestures() const.

C++ documentation:

Returns a list of canceled gestures.

pub unsafe fn copy_from(
    &self,
    other: impl CastInto<Ref<QGestureEvent>>
) -> Ref<QGestureEvent>
[src]

The QGestureEvent class provides the description of triggered gestures.

Calls C++ function: QGestureEvent& QGestureEvent::operator=(const QGestureEvent& other).

C++ documentation:

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.

pub unsafe fn gesture(&self, type_: GestureType) -> QPtr<QGesture>[src]

Returns a gesture object by type.

Calls C++ function: QGesture* QGestureEvent::gesture(Qt::GestureType type) const.

C++ documentation:

Returns a gesture object by type.

pub unsafe fn gestures(&self) -> CppBox<QListOfQGesture>[src]

Returns all gestures that are delivered in the event.

Calls C++ function: QList<QGesture*> QGestureEvent::gestures() const.

C++ documentation:

Returns all gestures that are delivered in the event.

pub unsafe fn ignore_q_gesture(&self, arg1: impl CastInto<Ptr<QGesture>>)[src]

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).

C++ documentation:

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().

pub unsafe fn ignore_gesture_type(&self, arg1: GestureType)[src]

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).

C++ documentation:

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().

pub unsafe fn is_accepted_q_gesture(
    &self,
    arg1: impl CastInto<Ptr<QGesture>>
) -> bool
[src]

Returns true if the gesture is accepted; otherwise returns false.

Calls C++ function: bool QGestureEvent::isAccepted(QGesture* arg1) const.

C++ documentation:

Returns true if the gesture is accepted; otherwise returns false.

pub unsafe fn is_accepted_gesture_type(&self, arg1: GestureType) -> bool[src]

Returns true if the gesture of type gestureType is accepted; otherwise returns false.

Calls C++ function: bool QGestureEvent::isAccepted(Qt::GestureType arg1) const.

C++ documentation:

Returns true if the gesture of type gestureType is accepted; otherwise returns false.

pub unsafe fn map_to_graphics_scene(
    &self,
    gesture_point: impl CastInto<Ref<QPointF>>
) -> CppBox<QPointF>
[src]

Returns the scene-local coordinates if the gesturePoint is inside a graphics view.

Calls C++ function: QPointF QGestureEvent::mapToGraphicsScene(const QPointF& gesturePoint) const.

C++ documentation:

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().

pub unsafe fn new(
    gestures: impl CastInto<Ref<QListOfQGesture>>
) -> CppBox<QGestureEvent>
[src]

Creates new QGestureEvent containing a list of gestures.

Calls C++ function: [constructor] void QGestureEvent::QGestureEvent(const QList<QGesture*>& gestures).

C++ documentation:

Creates new QGestureEvent containing a list of gestures.

pub unsafe fn new_copy(
    other: impl CastInto<Ref<QGestureEvent>>
) -> CppBox<QGestureEvent>
[src]

The QGestureEvent class provides the description of triggered gestures.

Calls C++ function: [constructor] void QGestureEvent::QGestureEvent(const QGestureEvent& other).

C++ documentation:

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.

pub unsafe fn set_accepted_q_gesture_bool(
    &self,
    arg1: impl CastInto<Ptr<QGesture>>,
    arg2: bool
)
[src]

Sets the accept flag of the given gesture object to the specified value.

Calls C++ function: void QGestureEvent::setAccepted(QGesture* arg1, bool arg2).

C++ documentation:

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().

pub unsafe fn set_accepted_gesture_type_bool(
    &self,
    arg1: GestureType,
    arg2: bool
)
[src]

Sets the accept flag of the given gestureType object to the specified value.

Calls C++ function: void QGestureEvent::setAccepted(Qt::GestureType arg1, bool arg2).

C++ documentation:

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).

pub unsafe fn set_widget(&self, widget: impl CastInto<Ptr<QWidget>>)[src]

Calls C++ function: void QGestureEvent::setWidget(QWidget* widget).

pub unsafe fn widget(&self) -> QPtr<QWidget>[src]

Returns the widget on which the event occurred.

Calls C++ function: QWidget* QGestureEvent::widget() const.

C++ documentation:

Returns the widget on which the event occurred.

Trait Implementations

impl CppDeletable for QGestureEvent[src]

unsafe fn delete(&self)[src]

Destroys QGestureEvent.

Calls C++ function: virtual [destructor] void QGestureEvent::~QGestureEvent().

C++ documentation:

Destroys QGestureEvent.

impl Deref for QGestureEvent[src]

type Target = QEvent

The resulting type after dereferencing.

fn deref(&self) -> &QEvent[src]

Calls C++ function: QEvent* static_cast<QEvent*>(QGestureEvent* ptr).

impl DynamicCast<QGestureEvent> for QEvent[src]

unsafe fn dynamic_cast(ptr: Ptr<QEvent>) -> Ptr<QGestureEvent>[src]

Calls C++ function: QGestureEvent* dynamic_cast<QGestureEvent*>(QEvent* ptr).

impl StaticDowncast<QGestureEvent> for QEvent[src]

unsafe fn static_downcast(ptr: Ptr<QEvent>) -> Ptr<QGestureEvent>[src]

Calls C++ function: QGestureEvent* static_cast<QGestureEvent*>(QEvent* ptr).

impl StaticUpcast<QEvent> for QGestureEvent[src]

unsafe fn static_upcast(ptr: Ptr<QGestureEvent>) -> Ptr<QEvent>[src]

Calls C++ function: QEvent* static_cast<QEvent*>(QGestureEvent* ptr).

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.