[][src]Struct qt_gui::QTouchEvent

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

The QTouchEvent class contains parameters that describe a touch event.

C++ class: QTouchEvent.

C++ documentation:

The QTouchEvent class contains parameters that describe a touch event.

Methods

impl QTouchEvent[src]

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

The QTouchEvent class contains parameters that describe a touch event.

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

C++ documentation:

The QTouchEvent class contains parameters that describe a touch event.

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

Returns the touch device from which this touch event originates.

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

C++ documentation:

Returns the touch device from which this touch event originates.

pub unsafe fn new_5a(
    event_type: Type,
    device: impl CastInto<MutPtr<QTouchDevice>>,
    modifiers: QFlags<KeyboardModifier>,
    touch_point_states: QFlags<TouchPointState>,
    touch_points: impl CastInto<Ref<QListOfTouchPoint>>
) -> CppBox<QTouchEvent>
[src]

Constructs a QTouchEvent with the given eventType, device, and touchPoints. The touchPointStates and modifiers are the current touch point states and keyboard modifiers at the time of the event.

Calls C++ function: [constructor] void QTouchEvent::QTouchEvent(QEvent::Type eventType, QTouchDevice* device = …, QFlags<Qt::KeyboardModifier> modifiers = …, QFlags<Qt::TouchPointState> touchPointStates = …, const QList<QTouchEvent::TouchPoint>& touchPoints = …).

C++ documentation:

Constructs a QTouchEvent with the given eventType, device, and touchPoints. The touchPointStates and modifiers are the current touch point states and keyboard modifiers at the time of the event.

pub unsafe fn new_4a(
    event_type: Type,
    device: impl CastInto<MutPtr<QTouchDevice>>,
    modifiers: QFlags<KeyboardModifier>,
    touch_point_states: QFlags<TouchPointState>
) -> CppBox<QTouchEvent>
[src]

Constructs a QTouchEvent with the given eventType, device, and touchPoints. The touchPointStates and modifiers are the current touch point states and keyboard modifiers at the time of the event.

Calls C++ function: [constructor] void QTouchEvent::QTouchEvent(QEvent::Type eventType, QTouchDevice* device = …, QFlags<Qt::KeyboardModifier> modifiers = …, QFlags<Qt::TouchPointState> touchPointStates = …).

C++ documentation:

Constructs a QTouchEvent with the given eventType, device, and touchPoints. The touchPointStates and modifiers are the current touch point states and keyboard modifiers at the time of the event.

pub unsafe fn new_3a(
    event_type: Type,
    device: impl CastInto<MutPtr<QTouchDevice>>,
    modifiers: QFlags<KeyboardModifier>
) -> CppBox<QTouchEvent>
[src]

Constructs a QTouchEvent with the given eventType, device, and touchPoints. The touchPointStates and modifiers are the current touch point states and keyboard modifiers at the time of the event.

Calls C++ function: [constructor] void QTouchEvent::QTouchEvent(QEvent::Type eventType, QTouchDevice* device = …, QFlags<Qt::KeyboardModifier> modifiers = …).

C++ documentation:

Constructs a QTouchEvent with the given eventType, device, and touchPoints. The touchPointStates and modifiers are the current touch point states and keyboard modifiers at the time of the event.

pub unsafe fn new_2a(
    event_type: Type,
    device: impl CastInto<MutPtr<QTouchDevice>>
) -> CppBox<QTouchEvent>
[src]

Constructs a QTouchEvent with the given eventType, device, and touchPoints. The touchPointStates and modifiers are the current touch point states and keyboard modifiers at the time of the event.

Calls C++ function: [constructor] void QTouchEvent::QTouchEvent(QEvent::Type eventType, QTouchDevice* device = …).

C++ documentation:

Constructs a QTouchEvent with the given eventType, device, and touchPoints. The touchPointStates and modifiers are the current touch point states and keyboard modifiers at the time of the event.

pub unsafe fn new_1a(event_type: Type) -> CppBox<QTouchEvent>[src]

Constructs a QTouchEvent with the given eventType, device, and touchPoints. The touchPointStates and modifiers are the current touch point states and keyboard modifiers at the time of the event.

Calls C++ function: [constructor] void QTouchEvent::QTouchEvent(QEvent::Type eventType).

C++ documentation:

Constructs a QTouchEvent with the given eventType, device, and touchPoints. The touchPointStates and modifiers are the current touch point states and keyboard modifiers at the time of the event.

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

The QTouchEvent class contains parameters that describe a touch event.

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

C++ documentation:

The QTouchEvent class contains parameters that describe a touch event.

pub unsafe fn set_device(
    &mut self,
    adevice: impl CastInto<MutPtr<QTouchDevice>>
)
[src]

Calls C++ function: void QTouchEvent::setDevice(QTouchDevice* adevice).

pub unsafe fn set_target(&mut self, atarget: impl CastInto<MutPtr<QObject>>)[src]

Calls C++ function: void QTouchEvent::setTarget(QObject* atarget).

pub unsafe fn set_touch_point_states(
    &mut self,
    a_touch_point_states: QFlags<TouchPointState>
)
[src]

Calls C++ function: void QTouchEvent::setTouchPointStates(QFlags<Qt::TouchPointState> aTouchPointStates).

pub unsafe fn set_touch_points(
    &mut self,
    atouch_points: impl CastInto<Ref<QListOfTouchPoint>>
)
[src]

Calls C++ function: void QTouchEvent::setTouchPoints(const QList<QTouchEvent::TouchPoint>& atouchPoints).

pub unsafe fn set_window(&mut self, awindow: impl CastInto<MutPtr<QWindow>>)[src]

Calls C++ function: void QTouchEvent::setWindow(QWindow* awindow).

pub unsafe fn target(&self) -> MutPtr<QObject>[src]

Returns the target object within the window on which the event occurred. This is typically a QWidget or a QQuickItem. May be 0 when no specific target is available.

Calls C++ function: QObject* QTouchEvent::target() const.

C++ documentation:

Returns the target object within the window on which the event occurred. This is typically a QWidget or a QQuickItem. May be 0 when no specific target is available.

pub unsafe fn touch_point_states(&self) -> QFlags<TouchPointState>[src]

Returns a bitwise OR of all the touch point states for this event.

Calls C++ function: QFlags<Qt::TouchPointState> QTouchEvent::touchPointStates() const.

C++ documentation:

Returns a bitwise OR of all the touch point states for this event.

pub unsafe fn touch_points(&self) -> Ref<QListOfTouchPoint>[src]

Returns the list of touch points contained in the touch event.

Calls C++ function: const QList<QTouchEvent::TouchPoint>& QTouchEvent::touchPoints() const.

C++ documentation:

Returns the list of touch points contained in the touch event.

pub unsafe fn window(&self) -> MutPtr<QWindow>[src]

Returns the window on which the event occurred. Useful for doing global-local mapping on data like rawScreenPositions() which, for performance reasons, only stores the global positions in the touch event.

Calls C++ function: QWindow* QTouchEvent::window() const.

C++ documentation:

Returns the window on which the event occurred. Useful for doing global-local mapping on data like rawScreenPositions() which, for performance reasons, only stores the global positions in the touch event.

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 QTouchEvent[src]

unsafe fn delete(&mut self)[src]

Destroys the QTouchEvent.

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

C++ documentation:

Destroys the QTouchEvent.

impl Deref for QTouchEvent[src]

type Target = QInputEvent

The resulting type after dereferencing.

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

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

impl DerefMut for QTouchEvent[src]

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

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

impl DynamicCast<QTouchEvent> for QInputEvent[src]

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

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

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

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

impl DynamicCast<QTouchEvent> for QEvent[src]

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

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

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

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

impl StaticDowncast<QTouchEvent> for QInputEvent[src]

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

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

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

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

impl StaticDowncast<QTouchEvent> for QEvent[src]

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

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

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

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

impl StaticUpcast<QEvent> for QTouchEvent[src]

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

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

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

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

impl StaticUpcast<QInputEvent> for QTouchEvent[src]

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

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

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

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