Struct qt_gui::QApplicationStateChangeEvent
source · #[repr(C)]pub struct QApplicationStateChangeEvent { /* private fields */ }
Expand description
C++ class: QApplicationStateChangeEvent
.
Implementations§
source§impl QApplicationStateChangeEvent
impl QApplicationStateChangeEvent
sourcepub unsafe fn application_state(&self) -> ApplicationState
pub unsafe fn application_state(&self) -> ApplicationState
Returns the state of the application.
Calls C++ function: Qt::ApplicationState QApplicationStateChangeEvent::applicationState() const
.
Returns the state of the application.
sourcepub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<QApplicationStateChangeEvent>>
) -> Ref<QApplicationStateChangeEvent>
pub unsafe fn copy_from( &self, other: impl CastInto<Ref<QApplicationStateChangeEvent>> ) -> Ref<QApplicationStateChangeEvent>
Calls C++ function: QApplicationStateChangeEvent& QApplicationStateChangeEvent::operator=(const QApplicationStateChangeEvent& other)
.
sourcepub unsafe fn new(
state: ApplicationState
) -> CppBox<QApplicationStateChangeEvent>
pub unsafe fn new( state: ApplicationState ) -> CppBox<QApplicationStateChangeEvent>
Creates a new QApplicationStateChangeEvent. applicationState is the new state.
Calls C++ function: [constructor] void QApplicationStateChangeEvent::QApplicationStateChangeEvent(Qt::ApplicationState state)
.
Creates a new QApplicationStateChangeEvent. applicationState is the new state.
sourcepub unsafe fn new_copy(
other: impl CastInto<Ref<QApplicationStateChangeEvent>>
) -> CppBox<QApplicationStateChangeEvent>
pub unsafe fn new_copy( other: impl CastInto<Ref<QApplicationStateChangeEvent>> ) -> CppBox<QApplicationStateChangeEvent>
Calls C++ function: [constructor] void QApplicationStateChangeEvent::QApplicationStateChangeEvent(const QApplicationStateChangeEvent& other)
.
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 Deref for QApplicationStateChangeEvent
impl Deref for QApplicationStateChangeEvent
source§impl DynamicCast<QApplicationStateChangeEvent> for QEvent
impl DynamicCast<QApplicationStateChangeEvent> for QEvent
source§unsafe fn dynamic_cast(ptr: Ptr<QEvent>) -> Ptr<QApplicationStateChangeEvent>
unsafe fn dynamic_cast(ptr: Ptr<QEvent>) -> Ptr<QApplicationStateChangeEvent>
Calls C++ function: QApplicationStateChangeEvent* dynamic_cast<QApplicationStateChangeEvent*>(QEvent* ptr)
.
source§impl StaticDowncast<QApplicationStateChangeEvent> for QEvent
impl StaticDowncast<QApplicationStateChangeEvent> for QEvent
source§unsafe fn static_downcast(ptr: Ptr<QEvent>) -> Ptr<QApplicationStateChangeEvent>
unsafe fn static_downcast(ptr: Ptr<QEvent>) -> Ptr<QApplicationStateChangeEvent>
Calls C++ function: QApplicationStateChangeEvent* static_cast<QApplicationStateChangeEvent*>(QEvent* ptr)
.
source§impl StaticUpcast<QEvent> for QApplicationStateChangeEvent
impl StaticUpcast<QEvent> for QApplicationStateChangeEvent
source§unsafe fn static_upcast(ptr: Ptr<QApplicationStateChangeEvent>) -> Ptr<QEvent>
unsafe fn static_upcast(ptr: Ptr<QApplicationStateChangeEvent>) -> Ptr<QEvent>
Calls C++ function: QEvent* static_cast<QEvent*>(QApplicationStateChangeEvent* ptr)
.