[][src]Struct qt_gui::QFocusEvent

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

The QFocusEvent class contains event parameters for widget focus events.

C++ class: QFocusEvent.

C++ documentation:

The QFocusEvent class contains event parameters for widget focus events.

Focus events are sent to widgets when the keyboard input focus changes. Focus events occur due to mouse actions, key presses (such as Tab or Backtab), the window system, popup menus, keyboard shortcuts, or other application-specific reasons. The reason for a particular focus event is returned by reason() in the appropriate event handler.

The event handlers QWidget::focusInEvent(), QWidget::focusOutEvent(), QGraphicsItem::focusInEvent and QGraphicsItem::focusOutEvent() receive focus events.

Methods

impl QFocusEvent[src]

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

The QFocusEvent class contains event parameters for widget focus events.

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

C++ documentation:

The QFocusEvent class contains event parameters for widget focus events.

Focus events are sent to widgets when the keyboard input focus changes. Focus events occur due to mouse actions, key presses (such as Tab or Backtab), the window system, popup menus, keyboard shortcuts, or other application-specific reasons. The reason for a particular focus event is returned by reason() in the appropriate event handler.

The event handlers QWidget::focusInEvent(), QWidget::focusOutEvent(), QGraphicsItem::focusInEvent and QGraphicsItem::focusOutEvent() receive focus events.

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

Returns true if type() is QEvent::FocusIn; otherwise returns false.

Calls C++ function: bool QFocusEvent::gotFocus() const.

C++ documentation:

Returns true if type() is QEvent::FocusIn; otherwise returns false.

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

Returns true if type() is QEvent::FocusOut; otherwise returns false.

Calls C++ function: bool QFocusEvent::lostFocus() const.

C++ documentation:

Returns true if type() is QEvent::FocusOut; otherwise returns false.

pub unsafe fn new_2a(type_: Type, reason: FocusReason) -> CppBox<QFocusEvent>[src]

Constructs a focus event object.

Calls C++ function: [constructor] void QFocusEvent::QFocusEvent(QEvent::Type type, Qt::FocusReason reason = …).

C++ documentation:

Constructs a focus event object.

The type parameter must be either QEvent::FocusIn or QEvent::FocusOut. The reason describes the cause of the change in focus.

pub unsafe fn new_1a(type_: Type) -> CppBox<QFocusEvent>[src]

Constructs a focus event object.

Calls C++ function: [constructor] void QFocusEvent::QFocusEvent(QEvent::Type type).

C++ documentation:

Constructs a focus event object.

The type parameter must be either QEvent::FocusIn or QEvent::FocusOut. The reason describes the cause of the change in focus.

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

The QFocusEvent class contains event parameters for widget focus events.

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

C++ documentation:

The QFocusEvent class contains event parameters for widget focus events.

Focus events are sent to widgets when the keyboard input focus changes. Focus events occur due to mouse actions, key presses (such as Tab or Backtab), the window system, popup menus, keyboard shortcuts, or other application-specific reasons. The reason for a particular focus event is returned by reason() in the appropriate event handler.

The event handlers QWidget::focusInEvent(), QWidget::focusOutEvent(), QGraphicsItem::focusInEvent and QGraphicsItem::focusOutEvent() receive focus events.

pub unsafe fn reason(&self) -> FocusReason[src]

Returns the reason for this focus event.

Calls C++ function: Qt::FocusReason QFocusEvent::reason() const.

C++ documentation:

Returns the reason for this focus event.

Trait Implementations

impl CppDeletable for QFocusEvent[src]

unsafe fn delete(&self)[src]

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

impl Deref for QFocusEvent[src]

type Target = QEvent

The resulting type after dereferencing.

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

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

impl DynamicCast<QFocusEvent> for QEvent[src]

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

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

impl StaticDowncast<QFocusEvent> for QEvent[src]

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

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

impl StaticUpcast<QEvent> for QFocusEvent[src]

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

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