[][src]Struct qt_gui::QNativeGestureEvent

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

The QNativeGestureEvent class contains parameters that describe a gesture event.

C++ class: QNativeGestureEvent.

C++ documentation:

The QNativeGestureEvent class contains parameters that describe a gesture event.

Native gesture events are generated by the operating system, typically by interpreting touch events. Gesture events are high-level events such as zoom or rotate.

Event TypeDescriptionTouch equence
Qt::ZoomNativeGestureMagnification delta in percent.macOS: Two-finger pinch.
Qt::SmartZoomNativeGestureBoolean magnification state.macOS: Two-finger douple tap (trackpad) / One-finger douple tap (magic mouse).
Qt::RotateNativeGestureRotation delta in degrees.macOS: Two-finger rotate.

In addition, BeginNativeGesture and EndNativeGesture are sent before and after gesture event streams:

BeginNativeGesture ZoomNativeGesture ZoomNativeGesture ZoomNativeGesture EndNativeGesture

Methods

impl QNativeGestureEvent[src]

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

The QNativeGestureEvent class contains parameters that describe a gesture event.

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

C++ documentation:

The QNativeGestureEvent class contains parameters that describe a gesture event.

Native gesture events are generated by the operating system, typically by interpreting touch events. Gesture events are high-level events such as zoom or rotate.

Event TypeDescriptionTouch equence
Qt::ZoomNativeGestureMagnification delta in percent.macOS: Two-finger pinch.
Qt::SmartZoomNativeGestureBoolean magnification state.macOS: Two-finger douple tap (trackpad) / One-finger douple tap (magic mouse).
Qt::RotateNativeGestureRotation delta in degrees.macOS: Two-finger rotate.

In addition, BeginNativeGesture and EndNativeGesture are sent before and after gesture event streams:

BeginNativeGesture ZoomNativeGesture ZoomNativeGesture ZoomNativeGesture EndNativeGesture

pub unsafe fn device(&self) -> Ptr<QTouchDevice>[src]

Returns the device.

Calls C++ function: const QTouchDevice* QNativeGestureEvent::device() const.

C++ documentation:

Returns the device.

This function was introduced in Qt 5.10.

This item is available if any(cpp_lib_version="5.11.3", cpp_lib_version="5.12.2", cpp_lib_version="5.13.0").

pub unsafe fn gesture_type(&self) -> NativeGestureType[src]

Returns the gesture type.

Calls C++ function: Qt::NativeGestureType QNativeGestureEvent::gestureType() const.

C++ documentation:

Returns the gesture type.

This function was introduced in Qt 5.2.

pub unsafe fn global_pos(&self) -> CppBox<QPoint>[src]

Returns the position of the gesture as a QPointF in screen coordinates

Calls C++ function: QPoint QNativeGestureEvent::globalPos() const.

C++ documentation:

Returns the position of the gesture as a QPointF in screen coordinates

This function was introduced in Qt 5.2.

pub unsafe fn local_pos(&self) -> Ref<QPointF>[src]

Returns the position of the gesture as a QPointF, relative to the widget or item that received the event.

Calls C++ function: const QPointF& QNativeGestureEvent::localPos() const.

C++ documentation:

Returns the position of the gesture as a QPointF, relative to the widget or item that received the event.

This function was introduced in Qt 5.2.

pub unsafe fn new_7a(
    type_: NativeGestureType,
    local_pos: impl CastInto<Ref<QPointF>>,
    window_pos: impl CastInto<Ref<QPointF>>,
    screen_pos: impl CastInto<Ref<QPointF>>,
    value: c_double,
    sequence_id: c_ulong,
    int_argument: u64
) -> CppBox<QNativeGestureEvent>
[src]

Constructs a native gesture event of type type.

Calls C++ function: [constructor] void QNativeGestureEvent::QNativeGestureEvent(Qt::NativeGestureType type, const QPointF& localPos, const QPointF& windowPos, const QPointF& screenPos, double value, unsigned long sequenceId, quint64 intArgument).

C++ documentation:

Constructs a native gesture event of type type.

The points localPos, windowPos and screenPos specify the gesture position relative to the receiving widget or item, window, and screen, respectively.

realValue is the macOS event parameter, sequenceId and intValue are the Windows event parameters.

pub unsafe fn new_8a(
    type_: NativeGestureType,
    dev: impl CastInto<Ptr<QTouchDevice>>,
    local_pos: impl CastInto<Ref<QPointF>>,
    window_pos: impl CastInto<Ref<QPointF>>,
    screen_pos: impl CastInto<Ref<QPointF>>,
    value: c_double,
    sequence_id: c_ulong,
    int_argument: u64
) -> CppBox<QNativeGestureEvent>
[src]

Constructs a native gesture event of type type originating from device.

Calls C++ function: [constructor] void QNativeGestureEvent::QNativeGestureEvent(Qt::NativeGestureType type, const QTouchDevice* dev, const QPointF& localPos, const QPointF& windowPos, const QPointF& screenPos, double value, unsigned long sequenceId, quint64 intArgument).

C++ documentation:

Constructs a native gesture event of type type originating from device.

The points localPos, windowPos and screenPos specify the gesture position relative to the receiving widget or item, window, and screen, respectively.

realValue is the macOS event parameter, sequenceId and intValue are the Windows event parameters.

This function was introduced in Qt 5.10.

This item is available if any(cpp_lib_version="5.11.3", cpp_lib_version="5.12.2", cpp_lib_version="5.13.0").

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

The QNativeGestureEvent class contains parameters that describe a gesture event.

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

C++ documentation:

The QNativeGestureEvent class contains parameters that describe a gesture event.

Native gesture events are generated by the operating system, typically by interpreting touch events. Gesture events are high-level events such as zoom or rotate.

Event TypeDescriptionTouch equence
Qt::ZoomNativeGestureMagnification delta in percent.macOS: Two-finger pinch.
Qt::SmartZoomNativeGestureBoolean magnification state.macOS: Two-finger douple tap (trackpad) / One-finger douple tap (magic mouse).
Qt::RotateNativeGestureRotation delta in degrees.macOS: Two-finger rotate.

In addition, BeginNativeGesture and EndNativeGesture are sent before and after gesture event streams:

BeginNativeGesture ZoomNativeGesture ZoomNativeGesture ZoomNativeGesture EndNativeGesture

pub unsafe fn pos(&self) -> CppBox<QPoint>[src]

Returns the position of the mouse cursor, relative to the widget or item that received the event.

Calls C++ function: QPoint QNativeGestureEvent::pos() const.

C++ documentation:

Returns the position of the mouse cursor, relative to the widget or item that received the event.

This function was introduced in Qt 5.2.

pub unsafe fn screen_pos(&self) -> Ref<QPointF>[src]

Returns the position of the gesture as a QPointF in screen coordinates.

Calls C++ function: const QPointF& QNativeGestureEvent::screenPos() const.

C++ documentation:

Returns the position of the gesture as a QPointF in screen coordinates.

This function was introduced in Qt 5.2.

pub unsafe fn value(&self) -> c_double[src]

Returns the gesture value. The value should be interpreted based on the gesture type. For example, a Zoom gesture provides a scale factor while a Rotate gesture provides a rotation delta.

Calls C++ function: double QNativeGestureEvent::value() const.

C++ documentation:

Returns the gesture value. The value should be interpreted based on the gesture type. For example, a Zoom gesture provides a scale factor while a Rotate gesture provides a rotation delta.

This function was introduced in Qt 5.2.

See also QNativeGestureEvent and gestureType().

pub unsafe fn window_pos(&self) -> Ref<QPointF>[src]

Returns the position of the gesture as a QPointF, relative to the window that received the event.

Calls C++ function: const QPointF& QNativeGestureEvent::windowPos() const.

C++ documentation:

Returns the position of the gesture as a QPointF, relative to the window that received the event.

This function was introduced in Qt 5.2.

Methods from Deref<Target = QInputEvent>

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

The QInputEvent class is the base class for events that describe user input.

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

C++ documentation:

The QInputEvent class is the base class for events that describe user input.

pub unsafe fn modifiers(&self) -> QFlags<KeyboardModifier>[src]

Returns the keyboard modifier flags that existed immediately before the event occurred.

Calls C++ function: QFlags<Qt::KeyboardModifier> QInputEvent::modifiers() const.

C++ documentation:

Returns the keyboard modifier flags that existed immediately before the event occurred.

See also QGuiApplication::keyboardModifiers().

pub unsafe fn set_modifiers(&mut self, amodifiers: QFlags<KeyboardModifier>)[src]

Calls C++ function: void QInputEvent::setModifiers(QFlags<Qt::KeyboardModifier> amodifiers).

pub unsafe fn set_timestamp(&mut self, atimestamp: c_ulong)[src]

Calls C++ function: void QInputEvent::setTimestamp(unsigned long atimestamp).

pub unsafe fn timestamp(&self) -> c_ulong[src]

Returns the window system's timestamp for this event. It will normally be in milliseconds since some arbitrary point in time, such as the time when the system was started.

Calls C++ function: unsigned long QInputEvent::timestamp() const.

C++ documentation:

Returns the window system's timestamp for this event. It will normally be in milliseconds since some arbitrary point in time, such as the time when the system was started.

Trait Implementations

impl CppDeletable for QNativeGestureEvent[src]

unsafe fn delete(&mut self)[src]

The QNativeGestureEvent class contains parameters that describe a gesture event.

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

C++ documentation:

The QNativeGestureEvent class contains parameters that describe a gesture event.

Native gesture events are generated by the operating system, typically by interpreting touch events. Gesture events are high-level events such as zoom or rotate.

Event TypeDescriptionTouch equence
Qt::ZoomNativeGestureMagnification delta in percent.macOS: Two-finger pinch.
Qt::SmartZoomNativeGestureBoolean magnification state.macOS: Two-finger douple tap (trackpad) / One-finger douple tap (magic mouse).
Qt::RotateNativeGestureRotation delta in degrees.macOS: Two-finger rotate.

In addition, BeginNativeGesture and EndNativeGesture are sent before and after gesture event streams:

BeginNativeGesture ZoomNativeGesture ZoomNativeGesture ZoomNativeGesture EndNativeGesture

impl Deref for QNativeGestureEvent[src]

type Target = QInputEvent

The resulting type after dereferencing.

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

Calls C++ function: QInputEvent* static_cast<QInputEvent*>(QNativeGestureEvent* ptr).

impl DerefMut for QNativeGestureEvent[src]

fn deref_mut(&mut self) -> &mut QInputEvent[src]

Calls C++ function: QInputEvent* static_cast<QInputEvent*>(QNativeGestureEvent* ptr).

impl DynamicCast<QNativeGestureEvent> for QInputEvent[src]

unsafe fn dynamic_cast(ptr: Ptr<QInputEvent>) -> Ptr<QNativeGestureEvent>[src]

Calls C++ function: QNativeGestureEvent* dynamic_cast<QNativeGestureEvent*>(QInputEvent* ptr).

unsafe fn dynamic_cast_mut(
    ptr: MutPtr<QInputEvent>
) -> MutPtr<QNativeGestureEvent>
[src]

Calls C++ function: QNativeGestureEvent* dynamic_cast<QNativeGestureEvent*>(QInputEvent* ptr).

impl DynamicCast<QNativeGestureEvent> for QEvent[src]

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

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

unsafe fn dynamic_cast_mut(ptr: MutPtr<QEvent>) -> MutPtr<QNativeGestureEvent>[src]

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

impl StaticDowncast<QNativeGestureEvent> for QInputEvent[src]

unsafe fn static_downcast(ptr: Ptr<QInputEvent>) -> Ptr<QNativeGestureEvent>[src]

Calls C++ function: QNativeGestureEvent* static_cast<QNativeGestureEvent*>(QInputEvent* ptr).

unsafe fn static_downcast_mut(
    ptr: MutPtr<QInputEvent>
) -> MutPtr<QNativeGestureEvent>
[src]

Calls C++ function: QNativeGestureEvent* static_cast<QNativeGestureEvent*>(QInputEvent* ptr).

impl StaticDowncast<QNativeGestureEvent> for QEvent[src]

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

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

unsafe fn static_downcast_mut(
    ptr: MutPtr<QEvent>
) -> MutPtr<QNativeGestureEvent>
[src]

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

impl StaticUpcast<QEvent> for QNativeGestureEvent[src]

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

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

unsafe fn static_upcast_mut(ptr: MutPtr<QNativeGestureEvent>) -> MutPtr<QEvent>[src]

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

impl StaticUpcast<QInputEvent> for QNativeGestureEvent[src]

unsafe fn static_upcast(ptr: Ptr<QNativeGestureEvent>) -> Ptr<QInputEvent>[src]

Calls C++ function: QInputEvent* static_cast<QInputEvent*>(QNativeGestureEvent* ptr).

unsafe fn static_upcast_mut(
    ptr: MutPtr<QNativeGestureEvent>
) -> MutPtr<QInputEvent>
[src]

Calls C++ function: QInputEvent* static_cast<QInputEvent*>(QNativeGestureEvent* 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.