[][src]Struct qt_gui::QShortcutEvent

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

The QShortcutEvent class provides an event which is generated when the user presses a key combination.

C++ class: QShortcutEvent.

C++ documentation:

The QShortcutEvent class provides an event which is generated when the user presses a key combination.

Normally you do not need to use this class directly; QShortcut provides a higher-level interface to handle shortcut keys.

Methods

impl QShortcutEvent[src]

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

The QShortcutEvent class provides an event which is generated when the user presses a key combination.

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

C++ documentation:

The QShortcutEvent class provides an event which is generated when the user presses a key combination.

Normally you do not need to use this class directly; QShortcut provides a higher-level interface to handle shortcut keys.

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

Returns true if the key sequence that triggered the event is ambiguous.

Calls C++ function: bool QShortcutEvent::isAmbiguous() const.

C++ documentation:

Returns true if the key sequence that triggered the event is ambiguous.

See also QShortcut::activatedAmbiguously().

pub unsafe fn key(&self) -> Ref<QKeySequence>[src]

Returns the key sequence that triggered the event.

Calls C++ function: const QKeySequence& QShortcutEvent::key() const.

C++ documentation:

Returns the key sequence that triggered the event.

pub unsafe fn new_3a(
    key: impl CastInto<Ref<QKeySequence>>,
    id: c_int,
    ambiguous: bool
) -> CppBox<QShortcutEvent>
[src]

Constructs a shortcut event for the given key press, associated with the QShortcut ID id.

Calls C++ function: [constructor] void QShortcutEvent::QShortcutEvent(const QKeySequence& key, int id, bool ambiguous = …).

C++ documentation:

Constructs a shortcut event for the given key press, associated with the QShortcut ID id.

ambiguous specifies whether there is more than one QShortcut for the same key sequence.

pub unsafe fn new_2a(
    key: impl CastInto<Ref<QKeySequence>>,
    id: c_int
) -> CppBox<QShortcutEvent>
[src]

Constructs a shortcut event for the given key press, associated with the QShortcut ID id.

Calls C++ function: [constructor] void QShortcutEvent::QShortcutEvent(const QKeySequence& key, int id).

C++ documentation:

Constructs a shortcut event for the given key press, associated with the QShortcut ID id.

ambiguous specifies whether there is more than one QShortcut for the same key sequence.

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

The QShortcutEvent class provides an event which is generated when the user presses a key combination.

Calls C++ function: [constructor] void QShortcutEvent::QShortcutEvent(const QShortcutEvent& other).

C++ documentation:

The QShortcutEvent class provides an event which is generated when the user presses a key combination.

Normally you do not need to use this class directly; QShortcut provides a higher-level interface to handle shortcut keys.

pub unsafe fn shortcut_id(&self) -> c_int[src]

Returns the ID of the QShortcut object for which this event was generated.

Calls C++ function: int QShortcutEvent::shortcutId() const.

C++ documentation:

Returns the ID of the QShortcut object for which this event was generated.

See also QShortcut::id().

Trait Implementations

impl CppDeletable for QShortcutEvent[src]

unsafe fn delete(&self)[src]

Destroys the event object.

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

C++ documentation:

Destroys the event object.

impl Deref for QShortcutEvent[src]

type Target = QEvent

The resulting type after dereferencing.

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

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

impl DynamicCast<QShortcutEvent> for QEvent[src]

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

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

impl StaticDowncast<QShortcutEvent> for QEvent[src]

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

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

impl StaticUpcast<QEvent> for QShortcutEvent[src]

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

Calls C++ function: QEvent* static_cast<QEvent*>(QShortcutEvent* 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.