Struct qt_core::q_state_machine::WrappedEvent
source · #[repr(C)]pub struct WrappedEvent { /* private fields */ }
Expand description
The WrappedEvent class inherits QEvent and holds a clone of an event associated with a QObject.
C++ class: QStateMachine::WrappedEvent
.
The WrappedEvent class inherits QEvent and holds a clone of an event associated with a QObject.
A wrapped event is generated by a QStateMachine in response to a Qt event. The QEventTransition class provides a transition associated with a such an event. QStateMachine::WrappedEvent is part of The State Machine Framework.
The object() function returns the object that generated the event. The event() function returns a clone of the original event.
Implementations§
source§impl WrappedEvent
impl WrappedEvent
sourcepub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<WrappedEvent>>
) -> Ref<WrappedEvent>
pub unsafe fn copy_from( &self, other: impl CastInto<Ref<WrappedEvent>> ) -> Ref<WrappedEvent>
The WrappedEvent class inherits QEvent and holds a clone of an event associated with a QObject.
Calls C++ function: QStateMachine::WrappedEvent& QStateMachine::WrappedEvent::operator=(const QStateMachine::WrappedEvent& other)
.
The WrappedEvent class inherits QEvent and holds a clone of an event associated with a QObject.
A wrapped event is generated by a QStateMachine in response to a Qt event. The QEventTransition class provides a transition associated with a such an event. QStateMachine::WrappedEvent is part of The State Machine Framework.
The object() function returns the object that generated the event. The event() function returns a clone of the original event.
sourcepub unsafe fn event(&self) -> Ptr<QEvent>
pub unsafe fn event(&self) -> Ptr<QEvent>
Returns a clone of the original event.
Calls C++ function: QEvent* QStateMachine::WrappedEvent::event() const
.
Returns a clone of the original event.
sourcepub unsafe fn new(
object: impl CastInto<Ptr<QObject>>,
event: impl CastInto<Ptr<QEvent>>
) -> CppBox<WrappedEvent>
pub unsafe fn new( object: impl CastInto<Ptr<QObject>>, event: impl CastInto<Ptr<QEvent>> ) -> CppBox<WrappedEvent>
Calls C++ function: [constructor] void QStateMachine::WrappedEvent::WrappedEvent(QObject* object, QEvent* event)
.
sourcepub unsafe fn new_copy(
other: impl CastInto<Ref<WrappedEvent>>
) -> CppBox<WrappedEvent>
pub unsafe fn new_copy( other: impl CastInto<Ref<WrappedEvent>> ) -> CppBox<WrappedEvent>
The WrappedEvent class inherits QEvent and holds a clone of an event associated with a QObject.
Calls C++ function: [constructor] void QStateMachine::WrappedEvent::WrappedEvent(const QStateMachine::WrappedEvent& other)
.
The WrappedEvent class inherits QEvent and holds a clone of an event associated with a QObject.
A wrapped event is generated by a QStateMachine in response to a Qt event. The QEventTransition class provides a transition associated with a such an event. QStateMachine::WrappedEvent is part of The State Machine Framework.
The object() function returns the object that generated the event. The event() function returns a clone of the original event.
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 WrappedEvent
impl CppDeletable for WrappedEvent
source§unsafe fn delete(&self)
unsafe fn delete(&self)
Destroys this WrappedEvent.
Calls C++ function: virtual [destructor] void QStateMachine::WrappedEvent::~WrappedEvent()
.
Destroys this WrappedEvent.
source§impl Deref for WrappedEvent
impl Deref for WrappedEvent
source§impl DynamicCast<WrappedEvent> for QEvent
impl DynamicCast<WrappedEvent> for QEvent
source§unsafe fn dynamic_cast(ptr: Ptr<QEvent>) -> Ptr<WrappedEvent>
unsafe fn dynamic_cast(ptr: Ptr<QEvent>) -> Ptr<WrappedEvent>
Calls C++ function: QStateMachine::WrappedEvent* dynamic_cast<QStateMachine::WrappedEvent*>(QEvent* ptr)
.
source§impl StaticDowncast<WrappedEvent> for QEvent
impl StaticDowncast<WrappedEvent> for QEvent
source§unsafe fn static_downcast(ptr: Ptr<QEvent>) -> Ptr<WrappedEvent>
unsafe fn static_downcast(ptr: Ptr<QEvent>) -> Ptr<WrappedEvent>
Calls C++ function: QStateMachine::WrappedEvent* static_cast<QStateMachine::WrappedEvent*>(QEvent* ptr)
.
source§impl StaticUpcast<QEvent> for WrappedEvent
impl StaticUpcast<QEvent> for WrappedEvent
source§unsafe fn static_upcast(ptr: Ptr<WrappedEvent>) -> Ptr<QEvent>
unsafe fn static_upcast(ptr: Ptr<WrappedEvent>) -> Ptr<QEvent>
Calls C++ function: QEvent* static_cast<QEvent*>(QStateMachine::WrappedEvent* ptr)
.