[−][src]Struct qt_core::QFinalState
The QFinalState class provides a final state.
C++ class: QFinalState
.
The QFinalState class provides a final state.
A final state is used to communicate that (part of) a QStateMachine has finished its work. When a final top-level state is entered, the state machine's finished() signal is emitted. In general, when a final substate (a child of a QState) is entered, the parent state's finished() signal is emitted. QFinalState is part of The State Machine Framework.
To use a final state, you create a QFinalState object and add a transition to it from another state. Example:
QPushButton button;
QStateMachine machine; QState s1 = new QState(); QFinalState s2 = new QFinalState(); s1->addTransition(&button, SIGNAL(clicked()), s2); machine.addState(s1); machine.addState(s2);
QObject::connect(&machine, SIGNAL(finished()), QApplication::instance(), SLOT(quit())); machine.setInitialState(s1); machine.start();
Methods
impl QFinalState
[src]
pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>
[src]
Calls C++ function: virtual const QMetaObject* QFinalState::metaObject() const
.
pub unsafe fn new_1a(parent: impl CastInto<MutPtr<QState>>) -> QBox<QFinalState>
[src]
Constructs a new QFinalState object with the given parent state.
Calls C++ function: [constructor] void QFinalState::QFinalState(QState* parent = …)
.
Constructs a new QFinalState object with the given parent state.
pub unsafe fn new_0a() -> QBox<QFinalState>
[src]
The QFinalState class provides a final state.
Calls C++ function: [constructor] void QFinalState::QFinalState()
.
The QFinalState class provides a final state.
A final state is used to communicate that (part of) a QStateMachine has finished its work. When a final top-level state is entered, the state machine's finished() signal is emitted. In general, when a final substate (a child of a QState) is entered, the parent state's finished() signal is emitted. QFinalState is part of The State Machine Framework.
To use a final state, you create a QFinalState object and add a transition to it from another state. Example:
QPushButton button;
QStateMachine machine; QState s1 = new QState(); QFinalState s2 = new QFinalState(); s1->addTransition(&button, SIGNAL(clicked()), s2); machine.addState(s1); machine.addState(s2);
QObject::connect(&machine, SIGNAL(finished()), QApplication::instance(), SLOT(quit())); machine.setInitialState(s1); machine.start();
pub unsafe fn qt_metacall(
&mut self,
arg1: Call,
arg2: c_int,
arg3: impl CastInto<MutPtr<*mut c_void>>
) -> c_int
[src]
&mut self,
arg1: Call,
arg2: c_int,
arg3: impl CastInto<MutPtr<*mut c_void>>
) -> c_int
Calls C++ function: virtual int QFinalState::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3)
.
pub unsafe fn qt_metacast(
&mut self,
arg1: impl CastInto<Ptr<c_char>>
) -> MutPtr<c_void>
[src]
&mut self,
arg1: impl CastInto<Ptr<c_char>>
) -> MutPtr<c_void>
Calls C++ function: virtual void* QFinalState::qt_metacast(const char* arg1)
.
pub unsafe fn static_meta_object() -> Ref<QMetaObject>
[src]
Returns a reference to the staticMetaObject
field.
pub unsafe fn tr(
s: impl CastInto<Ptr<c_char>>,
c: impl CastInto<Ptr<c_char>>,
n: c_int
) -> CppBox<QString>
[src]
s: impl CastInto<Ptr<c_char>>,
c: impl CastInto<Ptr<c_char>>,
n: c_int
) -> CppBox<QString>
Calls C++ function: static QString QFinalState::tr(const char* s, const char* c, int n)
.
pub unsafe fn tr_utf8(
s: impl CastInto<Ptr<c_char>>,
c: impl CastInto<Ptr<c_char>>,
n: c_int
) -> CppBox<QString>
[src]
s: impl CastInto<Ptr<c_char>>,
c: impl CastInto<Ptr<c_char>>,
n: c_int
) -> CppBox<QString>
Calls C++ function: static QString QFinalState::trUtf8(const char* s, const char* c, int n)
.
Methods from Deref<Target = QAbstractState>
pub fn entered(&self) -> Signal<()>
[src]
This signal is emitted when the state has been entered (after onEntry() has been called).
Returns a built-in Qt signal QAbstractState::entered
that can be passed to qt_core::Signal::connect
.
This signal is emitted when the state has been entered (after onEntry() has been called).
Note: This is a private signal. It can be used in signal connections but cannot be emitted by the user.
pub fn exited(&self) -> Signal<()>
[src]
This signal is emitted when the state has been exited (after onExit() has been called).
Returns a built-in Qt signal QAbstractState::exited
that can be passed to qt_core::Signal::connect
.
This signal is emitted when the state has been exited (after onExit() has been called).
Note: This is a private signal. It can be used in signal connections but cannot be emitted by the user.
pub fn active_changed(&self) -> Signal<(bool,)>
[src]
This signal is emitted when the active property is changed with active as argument.
Returns a built-in Qt signal QAbstractState::activeChanged
that can be passed to qt_core::Signal::connect
.
This signal is emitted when the active property is changed with active as argument.
This function was introduced in Qt 5.4.
Note: Notifier signal for property active.
See also QAbstractState::active, entered(), and exited().
pub unsafe fn active(&self) -> bool
[src]
This property holds the active property of this state. A state is active between entered() and exited() signals.
Calls C++ function: bool QAbstractState::active() const
.
This property holds the active property of this state. A state is active between entered() and exited() signals.
This property was introduced in Qt 5.4.
Access functions:
bool | active() const |
Notifier signal:
void | activeChanged(bool active) |
pub unsafe fn machine(&self) -> QMutPtr<QStateMachine>
[src]
Returns the state machine that this state is part of, or 0 if the state is not part of a state machine.
Calls C++ function: QStateMachine* QAbstractState::machine() const
.
Returns the state machine that this state is part of, or 0 if the state is not part of a state machine.
pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>
[src]
Calls C++ function: virtual const QMetaObject* QAbstractState::metaObject() const
.
pub unsafe fn parent_state(&self) -> QMutPtr<QState>
[src]
Returns this state's parent state, or 0 if the state has no parent state.
Calls C++ function: QState* QAbstractState::parentState() const
.
Returns this state's parent state, or 0 if the state has no parent state.
pub unsafe fn qt_metacall(
&mut self,
arg1: Call,
arg2: c_int,
arg3: impl CastInto<MutPtr<*mut c_void>>
) -> c_int
[src]
&mut self,
arg1: Call,
arg2: c_int,
arg3: impl CastInto<MutPtr<*mut c_void>>
) -> c_int
Calls C++ function: virtual int QAbstractState::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3)
.
pub unsafe fn qt_metacast(
&mut self,
arg1: impl CastInto<Ptr<c_char>>
) -> MutPtr<c_void>
[src]
&mut self,
arg1: impl CastInto<Ptr<c_char>>
) -> MutPtr<c_void>
Calls C++ function: virtual void* QAbstractState::qt_metacast(const char* arg1)
.
Trait Implementations
impl CppDeletable for QFinalState
[src]
unsafe fn delete(&mut self)
[src]
Destroys this final state.
Calls C++ function: virtual [destructor] void QFinalState::~QFinalState()
.
Destroys this final state.
impl Deref for QFinalState
[src]
type Target = QAbstractState
The resulting type after dereferencing.
fn deref(&self) -> &QAbstractState
[src]
Calls C++ function: QAbstractState* static_cast<QAbstractState*>(QFinalState* ptr)
.
impl DerefMut for QFinalState
[src]
fn deref_mut(&mut self) -> &mut QAbstractState
[src]
Calls C++ function: QAbstractState* static_cast<QAbstractState*>(QFinalState* ptr)
.
impl DynamicCast<QFinalState> for QAbstractState
[src]
unsafe fn dynamic_cast(ptr: Ptr<QAbstractState>) -> Ptr<QFinalState>
[src]
Calls C++ function: QFinalState* dynamic_cast<QFinalState*>(QAbstractState* ptr)
.
unsafe fn dynamic_cast_mut(ptr: MutPtr<QAbstractState>) -> MutPtr<QFinalState>
[src]
Calls C++ function: QFinalState* dynamic_cast<QFinalState*>(QAbstractState* ptr)
.
impl DynamicCast<QFinalState> for QObject
[src]
unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QFinalState>
[src]
Calls C++ function: QFinalState* dynamic_cast<QFinalState*>(QObject* ptr)
.
unsafe fn dynamic_cast_mut(ptr: MutPtr<QObject>) -> MutPtr<QFinalState>
[src]
Calls C++ function: QFinalState* dynamic_cast<QFinalState*>(QObject* ptr)
.
impl StaticDowncast<QFinalState> for QAbstractState
[src]
unsafe fn static_downcast(ptr: Ptr<QAbstractState>) -> Ptr<QFinalState>
[src]
Calls C++ function: QFinalState* static_cast<QFinalState*>(QAbstractState* ptr)
.
unsafe fn static_downcast_mut(
ptr: MutPtr<QAbstractState>
) -> MutPtr<QFinalState>
[src]
ptr: MutPtr<QAbstractState>
) -> MutPtr<QFinalState>
Calls C++ function: QFinalState* static_cast<QFinalState*>(QAbstractState* ptr)
.
impl StaticDowncast<QFinalState> for QObject
[src]
unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<QFinalState>
[src]
Calls C++ function: QFinalState* static_cast<QFinalState*>(QObject* ptr)
.
unsafe fn static_downcast_mut(ptr: MutPtr<QObject>) -> MutPtr<QFinalState>
[src]
Calls C++ function: QFinalState* static_cast<QFinalState*>(QObject* ptr)
.
impl StaticUpcast<QAbstractState> for QFinalState
[src]
unsafe fn static_upcast(ptr: Ptr<QFinalState>) -> Ptr<QAbstractState>
[src]
Calls C++ function: QAbstractState* static_cast<QAbstractState*>(QFinalState* ptr)
.
unsafe fn static_upcast_mut(ptr: MutPtr<QFinalState>) -> MutPtr<QAbstractState>
[src]
Calls C++ function: QAbstractState* static_cast<QAbstractState*>(QFinalState* ptr)
.
impl StaticUpcast<QObject> for QFinalState
[src]
unsafe fn static_upcast(ptr: Ptr<QFinalState>) -> Ptr<QObject>
[src]
Calls C++ function: QObject* static_cast<QObject*>(QFinalState* ptr)
.
unsafe fn static_upcast_mut(ptr: MutPtr<QFinalState>) -> MutPtr<QObject>
[src]
Calls C++ function: QObject* static_cast<QObject*>(QFinalState* ptr)
.
Auto Trait Implementations
impl RefUnwindSafe for QFinalState
impl Send for QFinalState
impl Sync for QFinalState
impl Unpin for QFinalState
impl UnwindSafe for QFinalState
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> CastInto<U> for T where
U: CastFrom<T>,
[src]
U: CastFrom<T>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> StaticUpcast<T> for T
[src]
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
[src]
unsafe fn static_upcast_mut(ptr: MutPtr<T>) -> MutPtr<T>
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,