Struct qt_core::q_state::RestorePolicy
source · pub struct RestorePolicy(/* private fields */);
Expand description
This enum specifies the restore policy type. The restore policy takes effect when the machine enters a state which sets one or more properties. If the restore policy is set to RestoreProperties, the state machine will save the original value of the property before the new value is set.
C++ enum: QState::RestorePolicy
.
This enum specifies the restore policy type. The restore policy takes effect when the machine enters a state which sets one or more properties. If the restore policy is set to RestoreProperties, the state machine will save the original value of the property before the new value is set.
Later, when the machine either enters a state which does not set a value for the given property, the property will automatically be restored to its initial value.
Only one initial value will be saved for any given property. If a value for a property has already been saved by the state machine, it will not be overwritten until the property has been successfully restored.
See also QStateMachine::globalRestorePolicy and QState::assignProperty().
Implementations§
source§impl RestorePolicy
impl RestorePolicy
sourcepub const DontRestoreProperties: RestorePolicy = _
pub const DontRestoreProperties: RestorePolicy = _
The state machine should not save the initial values of properties and restore them later. (C++ enum variant: DontRestoreProperties = 0
)
sourcepub const RestoreProperties: RestorePolicy = _
pub const RestoreProperties: RestorePolicy = _
The state machine should save the initial values of properties and restore them later. (C++ enum variant: RestoreProperties = 1
)
Trait Implementations§
source§impl Clone for RestorePolicy
impl Clone for RestorePolicy
source§fn clone(&self) -> RestorePolicy
fn clone(&self) -> RestorePolicy
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for RestorePolicy
impl Debug for RestorePolicy
source§impl From<RestorePolicy> for c_int
impl From<RestorePolicy> for c_int
source§fn from(value: RestorePolicy) -> Self
fn from(value: RestorePolicy) -> Self
source§impl From<i32> for RestorePolicy
impl From<i32> for RestorePolicy
source§impl PartialEq for RestorePolicy
impl PartialEq for RestorePolicy
source§fn eq(&self, other: &RestorePolicy) -> bool
fn eq(&self, other: &RestorePolicy) -> bool
self
and other
values to be equal, and is used
by ==
.