Struct qt_gui::QInputEvent
source · #[repr(C)]pub struct QInputEvent { /* private fields */ }
Expand description
The QInputEvent class is the base class for events that describe user input.
C++ class: QInputEvent
.
The QInputEvent class is the base class for events that describe user input.
Implementations§
source§impl QInputEvent
impl QInputEvent
sourcepub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<QInputEvent>>
) -> Ref<QInputEvent>
pub unsafe fn copy_from( &self, other: impl CastInto<Ref<QInputEvent>> ) -> Ref<QInputEvent>
The QInputEvent class is the base class for events that describe user input.
Calls C++ function: QInputEvent& QInputEvent::operator=(const QInputEvent& other)
.
The QInputEvent class is the base class for events that describe user input.
sourcepub unsafe fn modifiers(&self) -> QFlags<KeyboardModifier>
pub unsafe fn modifiers(&self) -> QFlags<KeyboardModifier>
Returns the keyboard modifier flags that existed immediately before the event occurred.
Calls C++ function: QFlags<Qt::KeyboardModifier> QInputEvent::modifiers() const
.
Returns the keyboard modifier flags that existed immediately before the event occurred.
See also QGuiApplication::keyboardModifiers().
sourcepub unsafe fn new_2a(
type_: Type,
modifiers: QFlags<KeyboardModifier>
) -> CppBox<QInputEvent>
pub unsafe fn new_2a( type_: Type, modifiers: QFlags<KeyboardModifier> ) -> CppBox<QInputEvent>
Calls C++ function: [constructor] void QInputEvent::QInputEvent(QEvent::Type type, QFlags<Qt::KeyboardModifier> modifiers = …)
.
sourcepub unsafe fn new_1a(type_: Type) -> CppBox<QInputEvent>
pub unsafe fn new_1a(type_: Type) -> CppBox<QInputEvent>
Calls C++ function: [constructor] void QInputEvent::QInputEvent(QEvent::Type type)
.
sourcepub unsafe fn new_copy(
other: impl CastInto<Ref<QInputEvent>>
) -> CppBox<QInputEvent>
pub unsafe fn new_copy( other: impl CastInto<Ref<QInputEvent>> ) -> CppBox<QInputEvent>
The QInputEvent class is the base class for events that describe user input.
Calls C++ function: [constructor] void QInputEvent::QInputEvent(const QInputEvent& other)
.
The QInputEvent class is the base class for events that describe user input.
sourcepub unsafe fn set_modifiers(&self, amodifiers: QFlags<KeyboardModifier>)
pub unsafe fn set_modifiers(&self, amodifiers: QFlags<KeyboardModifier>)
Calls C++ function: void QInputEvent::setModifiers(QFlags<Qt::KeyboardModifier> amodifiers)
.
sourcepub unsafe fn set_timestamp(&self, atimestamp: c_ulong)
pub unsafe fn set_timestamp(&self, atimestamp: c_ulong)
Calls C++ function: void QInputEvent::setTimestamp(unsigned long atimestamp)
.
sourcepub unsafe fn timestamp(&self) -> c_ulong
pub unsafe fn timestamp(&self) -> c_ulong
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
.
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.
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 QInputEvent
impl CppDeletable for QInputEvent
source§impl Deref for QInputEvent
impl Deref for QInputEvent
source§impl DynamicCast<QContextMenuEvent> for QInputEvent
impl DynamicCast<QContextMenuEvent> for QInputEvent
source§unsafe fn dynamic_cast(ptr: Ptr<QInputEvent>) -> Ptr<QContextMenuEvent>
unsafe fn dynamic_cast(ptr: Ptr<QInputEvent>) -> Ptr<QContextMenuEvent>
Calls C++ function: QContextMenuEvent* dynamic_cast<QContextMenuEvent*>(QInputEvent* ptr)
.
source§impl DynamicCast<QHoverEvent> for QInputEvent
impl DynamicCast<QHoverEvent> for QInputEvent
source§unsafe fn dynamic_cast(ptr: Ptr<QInputEvent>) -> Ptr<QHoverEvent>
unsafe fn dynamic_cast(ptr: Ptr<QInputEvent>) -> Ptr<QHoverEvent>
Calls C++ function: QHoverEvent* dynamic_cast<QHoverEvent*>(QInputEvent* ptr)
.
source§impl DynamicCast<QInputEvent> for QEvent
impl DynamicCast<QInputEvent> for QEvent
source§unsafe fn dynamic_cast(ptr: Ptr<QEvent>) -> Ptr<QInputEvent>
unsafe fn dynamic_cast(ptr: Ptr<QEvent>) -> Ptr<QInputEvent>
Calls C++ function: QInputEvent* dynamic_cast<QInputEvent*>(QEvent* ptr)
.
source§impl DynamicCast<QKeyEvent> for QInputEvent
impl DynamicCast<QKeyEvent> for QInputEvent
source§unsafe fn dynamic_cast(ptr: Ptr<QInputEvent>) -> Ptr<QKeyEvent>
unsafe fn dynamic_cast(ptr: Ptr<QInputEvent>) -> Ptr<QKeyEvent>
Calls C++ function: QKeyEvent* dynamic_cast<QKeyEvent*>(QInputEvent* ptr)
.
source§impl DynamicCast<QMouseEvent> for QInputEvent
impl DynamicCast<QMouseEvent> for QInputEvent
source§unsafe fn dynamic_cast(ptr: Ptr<QInputEvent>) -> Ptr<QMouseEvent>
unsafe fn dynamic_cast(ptr: Ptr<QInputEvent>) -> Ptr<QMouseEvent>
Calls C++ function: QMouseEvent* dynamic_cast<QMouseEvent*>(QInputEvent* ptr)
.
source§impl DynamicCast<QNativeGestureEvent> for QInputEvent
impl DynamicCast<QNativeGestureEvent> for QInputEvent
source§unsafe fn dynamic_cast(ptr: Ptr<QInputEvent>) -> Ptr<QNativeGestureEvent>
unsafe fn dynamic_cast(ptr: Ptr<QInputEvent>) -> Ptr<QNativeGestureEvent>
Calls C++ function: QNativeGestureEvent* dynamic_cast<QNativeGestureEvent*>(QInputEvent* ptr)
.
source§impl DynamicCast<QTabletEvent> for QInputEvent
impl DynamicCast<QTabletEvent> for QInputEvent
source§unsafe fn dynamic_cast(ptr: Ptr<QInputEvent>) -> Ptr<QTabletEvent>
unsafe fn dynamic_cast(ptr: Ptr<QInputEvent>) -> Ptr<QTabletEvent>
Calls C++ function: QTabletEvent* dynamic_cast<QTabletEvent*>(QInputEvent* ptr)
.
source§impl DynamicCast<QTouchEvent> for QInputEvent
impl DynamicCast<QTouchEvent> for QInputEvent
source§unsafe fn dynamic_cast(ptr: Ptr<QInputEvent>) -> Ptr<QTouchEvent>
unsafe fn dynamic_cast(ptr: Ptr<QInputEvent>) -> Ptr<QTouchEvent>
Calls C++ function: QTouchEvent* dynamic_cast<QTouchEvent*>(QInputEvent* ptr)
.
source§impl DynamicCast<QWheelEvent> for QInputEvent
impl DynamicCast<QWheelEvent> for QInputEvent
source§unsafe fn dynamic_cast(ptr: Ptr<QInputEvent>) -> Ptr<QWheelEvent>
unsafe fn dynamic_cast(ptr: Ptr<QInputEvent>) -> Ptr<QWheelEvent>
Calls C++ function: QWheelEvent* dynamic_cast<QWheelEvent*>(QInputEvent* ptr)
.
source§impl StaticDowncast<QContextMenuEvent> for QInputEvent
impl StaticDowncast<QContextMenuEvent> for QInputEvent
source§unsafe fn static_downcast(ptr: Ptr<QInputEvent>) -> Ptr<QContextMenuEvent>
unsafe fn static_downcast(ptr: Ptr<QInputEvent>) -> Ptr<QContextMenuEvent>
Calls C++ function: QContextMenuEvent* static_cast<QContextMenuEvent*>(QInputEvent* ptr)
.
source§impl StaticDowncast<QHoverEvent> for QInputEvent
impl StaticDowncast<QHoverEvent> for QInputEvent
source§unsafe fn static_downcast(ptr: Ptr<QInputEvent>) -> Ptr<QHoverEvent>
unsafe fn static_downcast(ptr: Ptr<QInputEvent>) -> Ptr<QHoverEvent>
Calls C++ function: QHoverEvent* static_cast<QHoverEvent*>(QInputEvent* ptr)
.
source§impl StaticDowncast<QInputEvent> for QEvent
impl StaticDowncast<QInputEvent> for QEvent
source§unsafe fn static_downcast(ptr: Ptr<QEvent>) -> Ptr<QInputEvent>
unsafe fn static_downcast(ptr: Ptr<QEvent>) -> Ptr<QInputEvent>
Calls C++ function: QInputEvent* static_cast<QInputEvent*>(QEvent* ptr)
.
source§impl StaticDowncast<QKeyEvent> for QInputEvent
impl StaticDowncast<QKeyEvent> for QInputEvent
source§unsafe fn static_downcast(ptr: Ptr<QInputEvent>) -> Ptr<QKeyEvent>
unsafe fn static_downcast(ptr: Ptr<QInputEvent>) -> Ptr<QKeyEvent>
Calls C++ function: QKeyEvent* static_cast<QKeyEvent*>(QInputEvent* ptr)
.
source§impl StaticDowncast<QMouseEvent> for QInputEvent
impl StaticDowncast<QMouseEvent> for QInputEvent
source§unsafe fn static_downcast(ptr: Ptr<QInputEvent>) -> Ptr<QMouseEvent>
unsafe fn static_downcast(ptr: Ptr<QInputEvent>) -> Ptr<QMouseEvent>
Calls C++ function: QMouseEvent* static_cast<QMouseEvent*>(QInputEvent* ptr)
.
source§impl StaticDowncast<QNativeGestureEvent> for QInputEvent
impl StaticDowncast<QNativeGestureEvent> for QInputEvent
source§unsafe fn static_downcast(ptr: Ptr<QInputEvent>) -> Ptr<QNativeGestureEvent>
unsafe fn static_downcast(ptr: Ptr<QInputEvent>) -> Ptr<QNativeGestureEvent>
Calls C++ function: QNativeGestureEvent* static_cast<QNativeGestureEvent*>(QInputEvent* ptr)
.
source§impl StaticDowncast<QTabletEvent> for QInputEvent
impl StaticDowncast<QTabletEvent> for QInputEvent
source§unsafe fn static_downcast(ptr: Ptr<QInputEvent>) -> Ptr<QTabletEvent>
unsafe fn static_downcast(ptr: Ptr<QInputEvent>) -> Ptr<QTabletEvent>
Calls C++ function: QTabletEvent* static_cast<QTabletEvent*>(QInputEvent* ptr)
.
source§impl StaticDowncast<QTouchEvent> for QInputEvent
impl StaticDowncast<QTouchEvent> for QInputEvent
source§unsafe fn static_downcast(ptr: Ptr<QInputEvent>) -> Ptr<QTouchEvent>
unsafe fn static_downcast(ptr: Ptr<QInputEvent>) -> Ptr<QTouchEvent>
Calls C++ function: QTouchEvent* static_cast<QTouchEvent*>(QInputEvent* ptr)
.
source§impl StaticDowncast<QWheelEvent> for QInputEvent
impl StaticDowncast<QWheelEvent> for QInputEvent
source§unsafe fn static_downcast(ptr: Ptr<QInputEvent>) -> Ptr<QWheelEvent>
unsafe fn static_downcast(ptr: Ptr<QInputEvent>) -> Ptr<QWheelEvent>
Calls C++ function: QWheelEvent* static_cast<QWheelEvent*>(QInputEvent* ptr)
.
source§impl StaticUpcast<QEvent> for QInputEvent
impl StaticUpcast<QEvent> for QInputEvent
source§unsafe fn static_upcast(ptr: Ptr<QInputEvent>) -> Ptr<QEvent>
unsafe fn static_upcast(ptr: Ptr<QInputEvent>) -> Ptr<QEvent>
Calls C++ function: QEvent* static_cast<QEvent*>(QInputEvent* ptr)
.
source§impl StaticUpcast<QInputEvent> for QContextMenuEvent
impl StaticUpcast<QInputEvent> for QContextMenuEvent
source§unsafe fn static_upcast(ptr: Ptr<QContextMenuEvent>) -> Ptr<QInputEvent>
unsafe fn static_upcast(ptr: Ptr<QContextMenuEvent>) -> Ptr<QInputEvent>
Calls C++ function: QInputEvent* static_cast<QInputEvent*>(QContextMenuEvent* ptr)
.
source§impl StaticUpcast<QInputEvent> for QHoverEvent
impl StaticUpcast<QInputEvent> for QHoverEvent
source§unsafe fn static_upcast(ptr: Ptr<QHoverEvent>) -> Ptr<QInputEvent>
unsafe fn static_upcast(ptr: Ptr<QHoverEvent>) -> Ptr<QInputEvent>
Calls C++ function: QInputEvent* static_cast<QInputEvent*>(QHoverEvent* ptr)
.
source§impl StaticUpcast<QInputEvent> for QKeyEvent
impl StaticUpcast<QInputEvent> for QKeyEvent
source§unsafe fn static_upcast(ptr: Ptr<QKeyEvent>) -> Ptr<QInputEvent>
unsafe fn static_upcast(ptr: Ptr<QKeyEvent>) -> Ptr<QInputEvent>
Calls C++ function: QInputEvent* static_cast<QInputEvent*>(QKeyEvent* ptr)
.
source§impl StaticUpcast<QInputEvent> for QMouseEvent
impl StaticUpcast<QInputEvent> for QMouseEvent
source§unsafe fn static_upcast(ptr: Ptr<QMouseEvent>) -> Ptr<QInputEvent>
unsafe fn static_upcast(ptr: Ptr<QMouseEvent>) -> Ptr<QInputEvent>
Calls C++ function: QInputEvent* static_cast<QInputEvent*>(QMouseEvent* ptr)
.
source§impl StaticUpcast<QInputEvent> for QNativeGestureEvent
impl StaticUpcast<QInputEvent> for QNativeGestureEvent
source§unsafe fn static_upcast(ptr: Ptr<QNativeGestureEvent>) -> Ptr<QInputEvent>
unsafe fn static_upcast(ptr: Ptr<QNativeGestureEvent>) -> Ptr<QInputEvent>
Calls C++ function: QInputEvent* static_cast<QInputEvent*>(QNativeGestureEvent* ptr)
.
source§impl StaticUpcast<QInputEvent> for QTabletEvent
impl StaticUpcast<QInputEvent> for QTabletEvent
source§unsafe fn static_upcast(ptr: Ptr<QTabletEvent>) -> Ptr<QInputEvent>
unsafe fn static_upcast(ptr: Ptr<QTabletEvent>) -> Ptr<QInputEvent>
Calls C++ function: QInputEvent* static_cast<QInputEvent*>(QTabletEvent* ptr)
.
source§impl StaticUpcast<QInputEvent> for QTouchEvent
impl StaticUpcast<QInputEvent> for QTouchEvent
source§unsafe fn static_upcast(ptr: Ptr<QTouchEvent>) -> Ptr<QInputEvent>
unsafe fn static_upcast(ptr: Ptr<QTouchEvent>) -> Ptr<QInputEvent>
Calls C++ function: QInputEvent* static_cast<QInputEvent*>(QTouchEvent* ptr)
.
source§impl StaticUpcast<QInputEvent> for QWheelEvent
impl StaticUpcast<QInputEvent> for QWheelEvent
source§unsafe fn static_upcast(ptr: Ptr<QWheelEvent>) -> Ptr<QInputEvent>
unsafe fn static_upcast(ptr: Ptr<QWheelEvent>) -> Ptr<QInputEvent>
Calls C++ function: QInputEvent* static_cast<QInputEvent*>(QWheelEvent* ptr)
.