|
|
| enum { MOD_FLAG_COUNT = 4 } |
The number of flags.
See also: ModFlag
| enum { QtWIN = (Qt::ALT << 1) } |
| enum ModFlag { SHIFT = 0x01, CTRL = 0x02, ALT = 0x04, WIN = 0x08 } | ModFlag |
Flags to represent the modifiers. You can combine modifiers by ORing them.
| KKey ()
| KKey |
Creates a new null KKey.
See also: clear(), isNull(), null()
| KKey ( int keyQt )
| KKey |
Creates a new key for the given Qt key code.
Parameters:
| keyQt | the qt keycode |
See also: Qt::Key
| KKey ( const QKeySequence& keySeq )
| KKey |
Creates a new key from the first key code of the given key sequence.
Parameters:
| keySeq | the key sequence that contains the key |
| KKey ( const QKeyEvent* keyEvent )
| KKey |
Extracts the key from the given key event.
Parameters:
| keyEvent | the key event to get the key from |
| KKey ( const KKey& key )
| KKey |
Copy constructor.
| KKey ( const QString& key )
| KKey |
Creates a new key from the given description. The form of the description is "[modifier+[modifier+]]+key", for example "e", "CTRL+q" or "CTRL+ALT+DEL". Allowed modifiers are "SHIFT", "CTRL", "ALT", "WIN" and "META". "WIN" and "META" are equivalent. Modifiers are not case-sensitive.
Parameters:
| key | the description of the key |
See also: KKeyServer::Sym::init()
| KKey ( uint key, uint mod )
| KKey |
| ~KKey ()
| ~KKey |
| void clear ()
| clear |
Clears the key. The key is null after calling this function.
See also: isNull()
| bool init ( int keyQt )
| init |
Initializes the key with the given Qt key code.
Parameters:
| keyQt | the qt keycode |
Returns: true if successful, false otherwise
See also: Qt::Key
| bool init ( const QKeySequence& keySeq )
| init |
Initializes the key with the first key code of the given key sequence.
Parameters:
| keySeq | the key sequence that contains the key |
Returns: true if successful, false otherwise
| bool init ( const QKeyEvent* keyEvent )
| init |
Initializes the key by extracting the code from the given key event.
Parameters:
| keyEvent | the key event to get the key from |
Returns: true if successful, false otherwise
| bool init ( const KKey& key )
| init |
Copies the given key.
Parameters:
| key | the key to copy |
Returns: true if successful, false otherwise
| bool init ( const QString& )
| init |
Initializes the key with the given description. The form of the description is "[modifier+[modifier+]]+key", for example "e", "CTRL+q" or "CTRL+ALT+DEL". Allowed modifiers are "SHIFT", "CTRL", "ALT", "WIN" and "META". "WIN" and "META" are equivalent. Modifiers are not case-sensitive.
Parameters:
| key | the description of the key |
Returns: true if successful, false otherwise
See also: KKeyServer::Sym::init()
| bool init ( uint key, uint mod )
| init |
| KKey& operator = ( const KKey& key )
| operator = |
Copies the key.
| bool isNull ()
| isNull |
[const]
Returns true if the key is null (after clear() or empty constructor).
Returns: true if the key is null
See also: clear(), null()
| bool isValidQt ()
| isValidQt |
[const]
| bool isValidNative ()
| isValidNative |
[const]
| uint sym ()
| sym |
[const]
| uint modFlags ()
| modFlags |
[const]
| int compare ( const KKey& key )
| compare |
[const]
Compares this key with the given KKey object. Returns a negative number if the given KKey is larger, 0 if they are equal and a positive number this KKey is larger. The returned value is the difference between the symbol or, if the symbols are equal, the difference between the encoded modifiers.
Parameters:
| key | the key to compare with this key |
Returns: a negative number if the given KKey is larger, 0 if they are equal and a positive number this KKey is larger
| bool operator == ( const KKey& key )
| operator == |
[const]
Compares the symbol and modifiers of both keys.
See also: compare()
| bool operator != ( const KKey& key )
| operator != |
[const]
Compares the symbol and modifiers of both keys.
See also: compare()
| bool operator < ( const KKey& key )
| operator < |
[const]
Compares the symbol and modifiers of both keys.
See also: compare()
| int keyCodeQt ()
| keyCodeQt |
[const]
Returns the qt key code.
Returns: the qt key code or 0 if there is no key set.
See also: Qt::Key
| QString toString ()
| toString |
[const]
Returns a human-readable representation of the key in the form "modifier+key".
Returns: the string representation of the key
| QString toStringInternal ()
| toStringInternal |
[const]
| void simplify ()
| simplify |
| KKey& null ()
| null |
[static]
Returns a null key.
Returns: the null key
See also: isNull(), clear()
| QString modFlagLabel ( ModFlag f )
| modFlagLabel |
[static]
Returns a user-readable representation of the given modifiers.
Parameters:
| f | the modifiers to convert |
Returns: the string representation of the modifiers
| uint m_sym | m_sym |
| uint m_mod | m_mod |
| Generated by: caleb on tcdevel on Tue Jan 28 12:54:04 2003, using kdoc $. |