API reference - Class QKeyEvent

Notation used in Ruby API documentation

Description: Binding of QKeyEvent

Class hierarchy: QKeyEvent » QInputEvent » QEvent

Public constructors

new QKeyEventnew(const QEvent_Type type,
int key,
const Qt_QFlags_KeyboardModifier modifiers,
string text = QString(),
bool autorep = false,
unsigned short count = 1)
Constructor QKeyEvent::QKeyEvent(QEvent::Type type, int key, QFlags<Qt::KeyboardModifier> modifiers, const QString &text, bool autorep, unsigned short int count)

Public methods

[const]voidassign(const QKeyEvent other)Assign the contents of another object to self
[const]intcountMethod int QKeyEvent::count()
voidcreateEnsures the C++ object is created
voiddestroyExplicitly destroy the object
[const]booldestroyed?Returns a value indicating whether the object was already destroyed
[const]QKeyEventdupCreates a copy of self
[const]boolhasExtendedInfoMethod bool QKeyEvent::hasExtendedInfo()
[const]boolisAutoRepeatMethod bool QKeyEvent::isAutoRepeat()
[const]boolisAutoRepeat?Method bool QKeyEvent::isAutoRepeat()
[const]boolis_const_object?Returns a value indicating whether the reference is a const reference
[const]intkeyMethod int QKeyEvent::key()
[const]boolmatches(const QKeySequence_StandardKey key)Method bool QKeyEvent::matches(QKeySequence::StandardKey key)
[const]Qt_QFlags_KeyboardModifiermodifiersMethod QFlags<Qt::KeyboardModifier> QKeyEvent::modifiers()
[const]unsigned intnativeModifiersMethod quint32 QKeyEvent::nativeModifiers()
[const]unsigned intnativeScanCodeMethod quint32 QKeyEvent::nativeScanCode()
[const]unsigned intnativeVirtualKeyMethod quint32 QKeyEvent::nativeVirtualKey()
[const]stringtextMethod QString QKeyEvent::text()

Public static methods and constants

QKeyEvent ptrcreateExtendedKeyEvent(const QEvent_Type type,
int key,
const Qt_QFlags_KeyboardModifier modifiers,
unsigned int nativeScanCode,
unsigned int nativeVirtualKey,
unsigned int nativeModifiers,
string text = QString(),
bool autorep = false,
unsigned short count = 1)
Static method QKeyEvent *QKeyEvent::createExtendedKeyEvent(QEvent::Type type, int key, QFlags<Qt::KeyboardModifier> modifiers, quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers, const QString &text, bool autorep, unsigned short int count)

Detailed description

[const] void assign(const QKeyEvent other)

Description: Assign the contents of another object to self

This method assigns the contents of another object to self. This is a deep copy that does not only copy the reference but the actual content.

[const] int count

Description: Method int QKeyEvent::count()

void create

Description: Ensures the C++ object is created

Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.

[static] QKeyEvent ptr createExtendedKeyEvent(const QEvent_Type type,int key,const Qt_QFlags_KeyboardModifier modifiers,unsigned int nativeScanCode,unsigned int nativeVirtualKey,unsigned int nativeModifiers,string text = QString(),bool autorep = false,unsigned short count = 1)

Description: Static method QKeyEvent *QKeyEvent::createExtendedKeyEvent(QEvent::Type type, int key, QFlags<Qt::KeyboardModifier> modifiers, quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers, const QString &text, bool autorep, unsigned short int count)

This method is static and can be called without an instance.

void destroy

Description: Explicitly destroy the object

Explicitly destroy the object on C++ side if it was owned by the Ruby interpreter. Subsequent access to this object will throw an exception. If the object is not owned by Ruby, this method will do nothing.

[const] bool destroyed?

Description: Returns a value indicating whether the object was already destroyed

This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.

[const] QKeyEvent dup

Description: Creates a copy of self

[const] bool hasExtendedInfo

Description: Method bool QKeyEvent::hasExtendedInfo()

[const] bool isAutoRepeat

Description: Method bool QKeyEvent::isAutoRepeat()

[const] bool isAutoRepeat?

Description: Method bool QKeyEvent::isAutoRepeat()

[const] bool is_const_object?

Description: Returns a value indicating whether the reference is a const reference

This method returns true, if self is a const reference. In that case, only const methods may be called on self.

[const] int key

Description: Method int QKeyEvent::key()

[const] bool matches(const QKeySequence_StandardKey key)

Description: Method bool QKeyEvent::matches(QKeySequence::StandardKey key)

[const] Qt_QFlags_KeyboardModifier modifiers

Description: Method QFlags<Qt::KeyboardModifier> QKeyEvent::modifiers()

[const] unsigned int nativeModifiers

Description: Method quint32 QKeyEvent::nativeModifiers()

[const] unsigned int nativeScanCode

Description: Method quint32 QKeyEvent::nativeScanCode()

[const] unsigned int nativeVirtualKey

Description: Method quint32 QKeyEvent::nativeVirtualKey()

[static] new QKeyEvent new(const QEvent_Type type,int key,const Qt_QFlags_KeyboardModifier modifiers,string text = QString(),bool autorep = false,unsigned short count = 1)

Description: Constructor QKeyEvent::QKeyEvent(QEvent::Type type, int key, QFlags<Qt::KeyboardModifier> modifiers, const QString &text, bool autorep, unsigned short int count)

This method creates an object of class QKeyEvent.

[const] string text

Description: Method QString QKeyEvent::text()