[−][src]Struct qt_3d_input::QKeyEvent
QKeyEvent event type send by KeyBoardHandler.
C++ class: Qt3DInput::QKeyEvent
.
QKeyEvent event type send by KeyBoardHandler.
Contains parameters that describe a key event
Methods
impl QKeyEvent
[src]
pub unsafe fn count(&self) -> c_int
[src]
Holds the number of keys involved in this event. If text is not empty, this is simply the length of the string.
Calls C++ function: int Qt3DInput::QKeyEvent::count() const
.
Holds the number of keys involved in this event. If text is not empty, this is simply the length of the string.
Access functions:
int | count() const |
pub unsafe fn is_accepted(&self) -> bool
[src]
Setting accepted to true
prevents the key event from being propagated to the item's parent.
Calls C++ function: bool Qt3DInput::QKeyEvent::isAccepted() const
.
Setting accepted to true
prevents the key event from being propagated to the item's parent.
Generally, if the item acts on the key event then it should be accepted so that ancestor items do not also respond to the same event.
Access functions:
bool | isAccepted() const |
void | setAccepted(bool accepted) |
pub unsafe fn is_auto_repeat(&self) -> bool
[src]
Holds whether this event comes from an auto-repeating key.
Calls C++ function: bool Qt3DInput::QKeyEvent::isAutoRepeat() const
.
Holds whether this event comes from an auto-repeating key.
Access functions:
bool | isAutoRepeat() const |
pub unsafe fn key(&self) -> c_int
[src]
This property holds the code of the key that was pressed or released.
Calls C++ function: int Qt3DInput::QKeyEvent::key() const
.
This property holds the code of the key that was pressed or released.
See Qt.Key for the list of keyboard codes.
Access functions:
int | key() const |
See also QKeyEvent::key.
pub unsafe fn matches(&self, key: StandardKey) -> bool
[src]
Returns true
if the key event matches the given standard key key_; otherwise returns false
.
Calls C++ function: bool Qt3DInput::QKeyEvent::matches(QKeySequence::StandardKey key_) const
.
Returns true
if the key event matches the given standard key key_; otherwise returns false
.
See also QKeySequence::StandardKey.
pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>
[src]
Calls C++ function: virtual const QMetaObject* Qt3DInput::QKeyEvent::metaObject() const
.
pub unsafe fn modifiers(&self) -> c_int
[src]
This property holds the keyboard modifier flags that existed immediately before the event occurred.
Calls C++ function: int Qt3DInput::QKeyEvent::modifiers() const
.
This property holds the keyboard modifier flags that existed immediately before the event occurred.
Access functions:
int | modifiers() const |
See also QKeyEvent::modifiers.
pub unsafe fn native_scan_code(&self) -> u32
[src]
This property contains the native scan code of the key that was pressed. It is passed through from QKeyEvent unchanged.
Calls C++ function: quint32 Qt3DInput::QKeyEvent::nativeScanCode() const
.
This property contains the native scan code of the key that was pressed. It is passed through from QKeyEvent unchanged.
Access functions:
quint32 | nativeScanCode() const |
pub unsafe fn new_6a(
type_: Type,
key: c_int,
modifiers: QFlags<KeyboardModifier>,
text: impl CastInto<Ref<QString>>,
autorep: bool,
count: c_ushort
) -> QBox<QKeyEvent>
[src]
type_: Type,
key: c_int,
modifiers: QFlags<KeyboardModifier>,
text: impl CastInto<Ref<QString>>,
autorep: bool,
count: c_ushort
) -> QBox<QKeyEvent>
Default constructs an instance of QKeyEvent.
Calls C++ function: [constructor] void Qt3DInput::QKeyEvent::QKeyEvent(QEvent::Type type, int key, QFlags<Qt::KeyboardModifier> modifiers, const QString& text = …, bool autorep = …, unsigned short count = …)
.
Default constructs an instance of QKeyEvent.
pub unsafe fn new_1a(ke: impl CastInto<Ref<QKeyEvent>>) -> QBox<QKeyEvent>
[src]
Copy constructor.
Calls C++ function: [constructor] void Qt3DInput::QKeyEvent::QKeyEvent(const QKeyEvent& ke)
.
Copy constructor.
pub unsafe fn new_5a(
type_: Type,
key: c_int,
modifiers: QFlags<KeyboardModifier>,
text: impl CastInto<Ref<QString>>,
autorep: bool
) -> QBox<QKeyEvent>
[src]
type_: Type,
key: c_int,
modifiers: QFlags<KeyboardModifier>,
text: impl CastInto<Ref<QString>>,
autorep: bool
) -> QBox<QKeyEvent>
Default constructs an instance of QKeyEvent.
Calls C++ function: [constructor] void Qt3DInput::QKeyEvent::QKeyEvent(QEvent::Type type, int key, QFlags<Qt::KeyboardModifier> modifiers, const QString& text = …, bool autorep = …)
.
Default constructs an instance of QKeyEvent.
pub unsafe fn new_4a(
type_: Type,
key: c_int,
modifiers: QFlags<KeyboardModifier>,
text: impl CastInto<Ref<QString>>
) -> QBox<QKeyEvent>
[src]
type_: Type,
key: c_int,
modifiers: QFlags<KeyboardModifier>,
text: impl CastInto<Ref<QString>>
) -> QBox<QKeyEvent>
Default constructs an instance of QKeyEvent.
Calls C++ function: [constructor] void Qt3DInput::QKeyEvent::QKeyEvent(QEvent::Type type, int key, QFlags<Qt::KeyboardModifier> modifiers, const QString& text = …)
.
Default constructs an instance of QKeyEvent.
pub unsafe fn new_3a(
type_: Type,
key: c_int,
modifiers: QFlags<KeyboardModifier>
) -> QBox<QKeyEvent>
[src]
type_: Type,
key: c_int,
modifiers: QFlags<KeyboardModifier>
) -> QBox<QKeyEvent>
Default constructs an instance of QKeyEvent.
Calls C++ function: [constructor] void Qt3DInput::QKeyEvent::QKeyEvent(QEvent::Type type, int key, QFlags<Qt::KeyboardModifier> modifiers)
.
Default constructs an instance of QKeyEvent.
pub unsafe fn qt_metacall(
&self,
arg1: Call,
arg2: c_int,
arg3: *mut *mut c_void
) -> c_int
[src]
&self,
arg1: Call,
arg2: c_int,
arg3: *mut *mut c_void
) -> c_int
Calls C++ function: virtual int Qt3DInput::QKeyEvent::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3)
.
pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void
[src]
Calls C++ function: virtual void* Qt3DInput::QKeyEvent::qt_metacast(const char* arg1)
.
pub unsafe fn set_accepted(&self, accepted: bool)
[src]
Setting accepted to true
prevents the key event from being propagated to the item's parent.
Calls C++ function: void Qt3DInput::QKeyEvent::setAccepted(bool accepted)
.
Setting accepted to true
prevents the key event from being propagated to the item's parent.
Generally, if the item acts on the key event then it should be accepted so that ancestor items do not also respond to the same event.
Access functions:
bool | isAccepted() const |
void | setAccepted(bool accepted) |
pub unsafe fn static_meta_object() -> Ref<QMetaObject>
[src]
Returns a reference to the staticMetaObject
field.
pub unsafe fn text(&self) -> CppBox<QString>
[src]
This property holds the Unicode text that the key generated. The text returned can be an empty string in cases where modifier keys, such as Shift, Control, Alt, and Meta, are being pressed or released. In such cases key will contain a valid value.
Calls C++ function: QString Qt3DInput::QKeyEvent::text() const
.
This property holds the Unicode text that the key generated. The text returned can be an empty string in cases where modifier keys, such as Shift, Control, Alt, and Meta, are being pressed or released. In such cases key will contain a valid value.
Access functions:
QString | text() const |
pub unsafe fn tr(
s: *const c_char,
c: *const c_char,
n: c_int
) -> CppBox<QString>
[src]
s: *const c_char,
c: *const c_char,
n: c_int
) -> CppBox<QString>
Calls C++ function: static QString Qt3DInput::QKeyEvent::tr(const char* s, const char* c, int n)
.
pub unsafe fn tr_utf8(
s: *const c_char,
c: *const c_char,
n: c_int
) -> CppBox<QString>
[src]
s: *const c_char,
c: *const c_char,
n: c_int
) -> CppBox<QString>
Calls C++ function: static QString Qt3DInput::QKeyEvent::trUtf8(const char* s, const char* c, int n)
.
pub unsafe fn type_(&self) -> Type
[src]
Returns the type of event
Calls C++ function: QEvent::Type Qt3DInput::QKeyEvent::type() const
.
Returns the type of event
Trait Implementations
impl CppDeletable for QKeyEvent
[src]
unsafe fn delete(&self)
[src]
Calls C++ function: virtual [destructor] void Qt3DInput::QKeyEvent::~QKeyEvent()
.
impl Deref for QKeyEvent
[src]
type Target = QObject
The resulting type after dereferencing.
fn deref(&self) -> &QObject
[src]
Calls C++ function: QObject* static_cast<QObject*>(Qt3DInput::QKeyEvent* ptr)
.
impl DynamicCast<QKeyEvent> for QObject
[src]
unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QKeyEvent>
[src]
Calls C++ function: Qt3DInput::QKeyEvent* dynamic_cast<Qt3DInput::QKeyEvent*>(QObject* ptr)
.
impl StaticDowncast<QKeyEvent> for QObject
[src]
unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<QKeyEvent>
[src]
Calls C++ function: Qt3DInput::QKeyEvent* static_cast<Qt3DInput::QKeyEvent*>(QObject* ptr)
.
impl StaticUpcast<QObject> for QKeyEvent
[src]
Auto Trait Implementations
impl RefUnwindSafe for QKeyEvent
impl Send for QKeyEvent
impl Sync for QKeyEvent
impl Unpin for QKeyEvent
impl UnwindSafe for QKeyEvent
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]
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>,