[][src]Struct qt_core::QEventTransition

#[repr(C)]
pub struct QEventTransition { /* fields omitted */ }

The QEventTransition class provides a QObject-specific transition for Qt events.

C++ class: QEventTransition.

C++ documentation:

The QEventTransition class provides a QObject-specific transition for Qt events.

A QEventTransition object binds an event to a particular QObject. QEventTransition is part of The State Machine Framework.

Example:

QPushButton button = ...; QState s1 = ...; QState s2 = ...; // If in s1 and the button receives an Enter event, transition to s2 QEventTransition enterTransition = new QEventTransition(button, QEvent::Enter); enterTransition->setTargetState(s2); s1->addTransition(enterTransition); // If in s2 and the button receives an Exit event, transition back to s1 QEventTransition *leaveTransition = new QEventTransition(button, QEvent::Leave); leaveTransition->setTargetState(s1); s2->addTransition(leaveTransition);

Methods

impl QEventTransition[src]

pub unsafe fn event_source(&self) -> MutPtr<QObject>[src]

This property holds the event source that this event transition is associated with

Calls C++ function: QObject* QEventTransition::eventSource() const.

C++ documentation:

This property holds the event source that this event transition is associated with

Access functions:

QObject *eventSource() const
void setEventSource(QObject *object)

pub unsafe fn event_type(&self) -> Type[src]

This property holds the type of event that this event transition is associated with

Calls C++ function: QEvent::Type QEventTransition::eventType() const.

C++ documentation:

This property holds the type of event that this event transition is associated with

Access functions:

QEvent::Type eventType() const
void setEventType(QEvent::Type type)

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* QEventTransition::metaObject() const.

pub unsafe fn new_1a(
    source_state: impl CastInto<MutPtr<QState>>
) -> CppBox<QEventTransition>
[src]

Constructs a new QEventTransition object with the given sourceState.

Calls C++ function: [constructor] void QEventTransition::QEventTransition(QState* sourceState = …).

C++ documentation:

Constructs a new QEventTransition object with the given sourceState.

pub unsafe fn new_3a(
    object: impl CastInto<MutPtr<QObject>>,
    type_: Type,
    source_state: impl CastInto<MutPtr<QState>>
) -> CppBox<QEventTransition>
[src]

Constructs a new QEventTransition object associated with events of the given type for the given object, and with the given sourceState.

Calls C++ function: [constructor] void QEventTransition::QEventTransition(QObject* object, QEvent::Type type, QState* sourceState = …).

C++ documentation:

Constructs a new QEventTransition object associated with events of the given type for the given object, and with the given sourceState.

pub unsafe fn new_0a() -> CppBox<QEventTransition>[src]

The QEventTransition class provides a QObject-specific transition for Qt events.

Calls C++ function: [constructor] void QEventTransition::QEventTransition().

C++ documentation:

The QEventTransition class provides a QObject-specific transition for Qt events.

A QEventTransition object binds an event to a particular QObject. QEventTransition is part of The State Machine Framework.

Example:

QPushButton button = ...; QState s1 = ...; QState s2 = ...; // If in s1 and the button receives an Enter event, transition to s2 QEventTransition enterTransition = new QEventTransition(button, QEvent::Enter); enterTransition->setTargetState(s2); s1->addTransition(enterTransition); // If in s2 and the button receives an Exit event, transition back to s1 QEventTransition *leaveTransition = new QEventTransition(button, QEvent::Leave); leaveTransition->setTargetState(s1); s2->addTransition(leaveTransition);

pub unsafe fn new_2a(
    object: impl CastInto<MutPtr<QObject>>,
    type_: Type
) -> CppBox<QEventTransition>
[src]

Constructs a new QEventTransition object associated with events of the given type for the given object, and with the given sourceState.

Calls C++ function: [constructor] void QEventTransition::QEventTransition(QObject* object, QEvent::Type type).

C++ documentation:

Constructs a new QEventTransition object associated with events of the given type for the given object, and with the given sourceState.

pub unsafe fn qt_metacall(
    &mut self,
    arg1: Call,
    arg2: c_int,
    arg3: impl CastInto<MutPtr<*mut c_void>>
) -> c_int
[src]

Calls C++ function: virtual int QEventTransition::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]

Calls C++ function: virtual void* QEventTransition::qt_metacast(const char* arg1).

pub unsafe fn set_event_source(
    &mut self,
    object: impl CastInto<MutPtr<QObject>>
)
[src]

Sets the event source associated with this event transition to be the given object.

Calls C++ function: void QEventTransition::setEventSource(QObject* object).

C++ documentation:

Sets the event source associated with this event transition to be the given object.

Note: Setter function for property eventSource.

See also eventSource().

pub unsafe fn set_event_type(&mut self, type_: Type)[src]

Sets the event type that this event transition is associated with.

Calls C++ function: void QEventTransition::setEventType(QEvent::Type type).

C++ documentation:

Sets the event type that this event transition is associated with.

Note: Setter function for property eventType.

See also eventType().

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]

Calls C++ function: static QString QEventTransition::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]

Calls C++ function: static QString QEventTransition::trUtf8(const char* s, const char* c, int n).

Methods from Deref<Target = QAbstractTransition>

pub fn triggered(&self) -> Signal<()>[src]

This signal is emitted when the transition has been triggered (after onTransition() has been called).

Returns a built-in Qt signal QAbstractTransition::triggered that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the transition has been triggered (after onTransition() 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 target_state_changed(&self) -> Signal<()>[src]

This signal is emitted when the targetState property is changed.

Returns a built-in Qt signal QAbstractTransition::targetStateChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the targetState property is changed.

This function was introduced in Qt 5.4.

Note: This is a private signal. It can be used in signal connections but cannot be emitted by the user.

Note: Notifier signal for property targetState.

See also QAbstractTransition::targetState.

pub fn target_states_changed(&self) -> Signal<()>[src]

This signal is emitted when the targetStates property is changed.

Returns a built-in Qt signal QAbstractTransition::targetStatesChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the targetStates property is changed.

This function was introduced in Qt 5.4.

Note: This is a private signal. It can be used in signal connections but cannot be emitted by the user.

Note: Notifier signal for property targetStates.

See also QAbstractTransition::targetStates.

pub unsafe fn add_animation(
    &mut self,
    animation: impl CastInto<MutPtr<QAbstractAnimation>>
)
[src]

Adds the given animation to this transition. The transition does not take ownership of the animation.

Calls C++ function: void QAbstractTransition::addAnimation(QAbstractAnimation* animation).

C++ documentation:

Adds the given animation to this transition. The transition does not take ownership of the animation.

See also removeAnimation() and animations().

pub unsafe fn animations(&self) -> CppBox<QListOfQAbstractAnimation>[src]

Returns the list of animations associated with this transition, or an empty list if it has no animations.

Calls C++ function: QList<QAbstractAnimation*> QAbstractTransition::animations() const.

C++ documentation:

Returns the list of animations associated with this transition, or an empty list if it has no animations.

See also addAnimation().

pub unsafe fn machine(&self) -> MutPtr<QStateMachine>[src]

Returns the state machine that this transition is part of, or 0 if the transition is not part of a state machine.

Calls C++ function: QStateMachine* QAbstractTransition::machine() const.

C++ documentation:

Returns the state machine that this transition is part of, or 0 if the transition is not part of a state machine.

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* QAbstractTransition::metaObject() const.

pub unsafe fn qt_metacall(
    &mut self,
    arg1: Call,
    arg2: c_int,
    arg3: impl CastInto<MutPtr<*mut c_void>>
) -> c_int
[src]

Calls C++ function: virtual int QAbstractTransition::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]

Calls C++ function: virtual void* QAbstractTransition::qt_metacast(const char* arg1).

pub unsafe fn remove_animation(
    &mut self,
    animation: impl CastInto<MutPtr<QAbstractAnimation>>
)
[src]

Removes the given animation from this transition.

Calls C++ function: void QAbstractTransition::removeAnimation(QAbstractAnimation* animation).

C++ documentation:

Removes the given animation from this transition.

See also addAnimation().

pub unsafe fn set_target_state(
    &mut self,
    target: impl CastInto<MutPtr<QAbstractState>>
)
[src]

Sets the target state of this transition.

Calls C++ function: void QAbstractTransition::setTargetState(QAbstractState* target).

C++ documentation:

Sets the target state of this transition.

Note: Setter function for property targetState.

See also targetState().

pub unsafe fn set_target_states(
    &mut self,
    targets: impl CastInto<Ref<QListOfQAbstractState>>
)
[src]

Sets the target states of this transition to be the given targets.

Calls C++ function: void QAbstractTransition::setTargetStates(const QList<QAbstractState*>& targets).

C++ documentation:

Sets the target states of this transition to be the given targets.

Note: Setter function for property targetStates.

See also targetStates().

pub unsafe fn set_transition_type(&mut self, type_: TransitionType)[src]

Sets the type of the transition to type.

Calls C++ function: void QAbstractTransition::setTransitionType(QAbstractTransition::TransitionType type).

C++ documentation:

Sets the type of the transition to type.

Note: Setter function for property transitionType.

See also transitionType().

pub unsafe fn source_state(&self) -> MutPtr<QState>[src]

This property holds the source state (parent) of this transition

Calls C++ function: QState* QAbstractTransition::sourceState() const.

C++ documentation:

This property holds the source state (parent) of this transition

Access functions:

QState *sourceState() const

pub unsafe fn target_state(&self) -> MutPtr<QAbstractState>[src]

This property holds the target state of this transition

Calls C++ function: QAbstractState* QAbstractTransition::targetState() const.

C++ documentation:

This property holds the target state of this transition

If a transition has no target state, the transition may still be triggered, but this will not cause the state machine's configuration to change (i.e. the current state will not be exited and re-entered).

Access functions:

QAbstractState *targetState() const
void setTargetState(QAbstractState *target)

Notifier signal:

void targetStateChanged()[see note below]

Note: This is a private signal. It can be used in signal connections but cannot be emitted by the user.

pub unsafe fn target_states(&self) -> CppBox<QListOfQAbstractState>[src]

This property holds the target states of this transition

Calls C++ function: QList<QAbstractState*> QAbstractTransition::targetStates() const.

C++ documentation:

This property holds the target states of this transition

If multiple states are specified, all must be descendants of the same parallel group state.

Access functions:

QList<QAbstractState *> targetStates() const
void setTargetStates(const QList<QAbstractState *> &targets)

Notifier signal:

void targetStatesChanged()[see note below]

Note: This is a private signal. It can be used in signal connections but cannot be emitted by the user.

pub unsafe fn transition_type(&self) -> TransitionType[src]

indicates whether this transition is an internal transition, or an external transition.

Calls C++ function: QAbstractTransition::TransitionType QAbstractTransition::transitionType() const.

C++ documentation:

indicates whether this transition is an internal transition, or an external transition.

Internal and external transitions behave the same, except for the case of a transition whose source state is a compound state and whose target(s) is a descendant of the source. In such a case, an internal transition will not exit and re-enter its source state, while an external one will.

By default, the type is an external transition.

Access functions:

TransitionType transitionType() const
void setTransitionType(TransitionType type)

Trait Implementations

impl Deref for QEventTransition[src]

type Target = QAbstractTransition

The resulting type after dereferencing.

fn deref(&self) -> &QAbstractTransition[src]

Calls C++ function: QAbstractTransition* static_cast<QAbstractTransition*>(QEventTransition* ptr).

impl DerefMut for QEventTransition[src]

fn deref_mut(&mut self) -> &mut QAbstractTransition[src]

Calls C++ function: QAbstractTransition* static_cast<QAbstractTransition*>(QEventTransition* ptr).

impl StaticUpcast<QAbstractTransition> for QEventTransition[src]

unsafe fn static_upcast(ptr: Ptr<QEventTransition>) -> Ptr<QAbstractTransition>[src]

Calls C++ function: QAbstractTransition* static_cast<QAbstractTransition*>(QEventTransition* ptr).

unsafe fn static_upcast_mut(
    ptr: MutPtr<QEventTransition>
) -> MutPtr<QAbstractTransition>
[src]

Calls C++ function: QAbstractTransition* static_cast<QAbstractTransition*>(QEventTransition* ptr).

impl StaticUpcast<QObject> for QEventTransition[src]

unsafe fn static_upcast(ptr: Ptr<QEventTransition>) -> Ptr<QObject>[src]

Calls C++ function: QObject* static_cast<QObject*>(QEventTransition* ptr).

unsafe fn static_upcast_mut(ptr: MutPtr<QEventTransition>) -> MutPtr<QObject>[src]

Calls C++ function: QObject* static_cast<QObject*>(QEventTransition* ptr).

impl StaticDowncast<QEventTransition> for QAbstractTransition[src]

unsafe fn static_downcast(
    ptr: Ptr<QAbstractTransition>
) -> Ptr<QEventTransition>
[src]

Calls C++ function: QEventTransition* static_cast<QEventTransition*>(QAbstractTransition* ptr).

unsafe fn static_downcast_mut(
    ptr: MutPtr<QAbstractTransition>
) -> MutPtr<QEventTransition>
[src]

Calls C++ function: QEventTransition* static_cast<QEventTransition*>(QAbstractTransition* ptr).

impl StaticDowncast<QEventTransition> for QObject[src]

unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<QEventTransition>[src]

Calls C++ function: QEventTransition* static_cast<QEventTransition*>(QObject* ptr).

unsafe fn static_downcast_mut(ptr: MutPtr<QObject>) -> MutPtr<QEventTransition>[src]

Calls C++ function: QEventTransition* static_cast<QEventTransition*>(QObject* ptr).

impl DynamicCast<QEventTransition> for QAbstractTransition[src]

unsafe fn dynamic_cast(ptr: Ptr<QAbstractTransition>) -> Ptr<QEventTransition>[src]

Calls C++ function: QEventTransition* dynamic_cast<QEventTransition*>(QAbstractTransition* ptr).

unsafe fn dynamic_cast_mut(
    ptr: MutPtr<QAbstractTransition>
) -> MutPtr<QEventTransition>
[src]

Calls C++ function: QEventTransition* dynamic_cast<QEventTransition*>(QAbstractTransition* ptr).

impl DynamicCast<QEventTransition> for QObject[src]

unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QEventTransition>[src]

Calls C++ function: QEventTransition* dynamic_cast<QEventTransition*>(QObject* ptr).

unsafe fn dynamic_cast_mut(ptr: MutPtr<QObject>) -> MutPtr<QEventTransition>[src]

Calls C++ function: QEventTransition* dynamic_cast<QEventTransition*>(QObject* ptr).

impl CppDeletable for QEventTransition[src]

unsafe fn delete(&mut self)[src]

Destroys this QObject event transition.

Calls C++ function: virtual [destructor] void QEventTransition::~QEventTransition().

C++ documentation:

Destroys this QObject event transition.

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]