[][src]Struct qt_core::q_state_machine::WrappedEvent

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

The WrappedEvent class inherits QEvent and holds a clone of an event associated with a QObject.

C++ class: QStateMachine::WrappedEvent.

C++ documentation:

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

impl WrappedEvent[src]

pub unsafe fn copy_from(
    &self,
    other: impl CastInto<Ref<WrappedEvent>>
) -> Ref<WrappedEvent>
[src]

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).

C++ documentation:

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.

pub unsafe fn event(&self) -> Ptr<QEvent>[src]

Returns a clone of the original event.

Calls C++ function: QEvent* QStateMachine::WrappedEvent::event() const.

C++ documentation:

Returns a clone of the original event.

pub unsafe fn new(
    object: impl CastInto<Ptr<QObject>>,
    event: impl CastInto<Ptr<QEvent>>
) -> CppBox<WrappedEvent>
[src]

Calls C++ function: [constructor] void QStateMachine::WrappedEvent::WrappedEvent(QObject* object, QEvent* event).

pub unsafe fn new_copy(
    other: impl CastInto<Ref<WrappedEvent>>
) -> CppBox<WrappedEvent>
[src]

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).

C++ documentation:

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.

pub unsafe fn object(&self) -> QPtr<QObject>[src]

Returns the object that the event is associated with.

Calls C++ function: QObject* QStateMachine::WrappedEvent::object() const.

C++ documentation:

Returns the object that the event is associated with.

Methods from Deref<Target = QEvent>

pub unsafe fn accept(&self)[src]

Sets the accept flag of the event object, the equivalent of calling setAccepted(true).

Calls C++ function: void QEvent::accept().

C++ documentation:

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().

pub unsafe fn copy_from(&self, other: impl CastInto<Ref<QEvent>>) -> Ref<QEvent>[src]

Calls C++ function: QEvent& QEvent::operator=(const QEvent& other).

pub unsafe fn ignore(&self)[src]

Clears the accept flag parameter of the event object, the equivalent of calling setAccepted(false).

Calls C++ function: void QEvent::ignore().

C++ documentation:

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().

pub unsafe fn is_accepted(&self) -> bool[src]

the accept flag of the event object

Calls C++ function: bool QEvent::isAccepted() const.

C++ documentation:

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)

pub unsafe fn set_accepted(&self, accepted: bool)[src]

the accept flag of the event object

Calls C++ function: void QEvent::setAccepted(bool accepted).

C++ documentation:

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)

pub unsafe fn spontaneous(&self) -> bool[src]

Returns true if the event originated outside the application (a system event); otherwise returns false.

Calls C++ function: bool QEvent::spontaneous() const.

C++ documentation:

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.

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

Returns the event type.

Calls C++ function: QEvent::Type QEvent::type() const.

C++ documentation:

Returns the event type.

Trait Implementations

impl CppDeletable for WrappedEvent[src]

unsafe fn delete(&self)[src]

Destroys this WrappedEvent.

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

C++ documentation:

Destroys this WrappedEvent.

impl Deref for WrappedEvent[src]

type Target = QEvent

The resulting type after dereferencing.

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

Calls C++ function: QEvent* static_cast<QEvent*>(QStateMachine::WrappedEvent* ptr).

impl DynamicCast<WrappedEvent> for QEvent[src]

unsafe fn dynamic_cast(ptr: Ptr<QEvent>) -> Ptr<WrappedEvent>[src]

Calls C++ function: QStateMachine::WrappedEvent* dynamic_cast<QStateMachine::WrappedEvent*>(QEvent* ptr).

impl StaticDowncast<WrappedEvent> for QEvent[src]

unsafe fn static_downcast(ptr: Ptr<QEvent>) -> Ptr<WrappedEvent>[src]

Calls C++ function: QStateMachine::WrappedEvent* static_cast<QStateMachine::WrappedEvent*>(QEvent* ptr).

impl StaticUpcast<QEvent> for WrappedEvent[src]

unsafe fn static_upcast(ptr: Ptr<WrappedEvent>) -> Ptr<QEvent>[src]

Calls C++ function: QEvent* static_cast<QEvent*>(QStateMachine::WrappedEvent* ptr).

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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

impl<T> StaticUpcast<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.