|
|
A KKeySequence object holds a sequence of up to 4 keys. Ex: Ctrl+X,I
enum { MAX_KEYS = 4 } |
KKeySequence ()
| KKeySequence |
Create a new null key sequence.
See also: isNull(), null(), clear()
KKeySequence ( const QKeySequence& keySeq )
| KKeySequence |
Copies the given qt key sequence.
Parameters:
keySeq | the qt key sequence to copy |
KKeySequence ( const KKey& key )
| KKeySequence |
Create a new key sequence that only contains the given key.
Parameters:
key | the key to add |
KKeySequence ( const KKeyNative& key )
| KKeySequence |
Create a new key sequence that only contains the given key.
Parameters:
key | the key to add |
KKeySequence ( const KKeySequence& keySeq )
| KKeySequence |
Copies the given key sequence.
Parameters:
keySeq | the key sequence to copy |
KKeySequence ( const QString& keySeq )
| KKeySequence |
Creates a new key sequence that contains the given key sequence. The description consists of comma-separated keys as required by KKey::KKey(const QString&).
Parameters:
keySeq | the description of the key |
See also: KKeyServer::Sym::init(), KKey::KKey(const, QString&)
~KKeySequence ()
| ~KKeySequence |
void clear ()
| clear |
Clears the key sequence. The key sequence is null after calling this function.
See also: isNull()
bool init ( const QKeySequence& keySeq )
| init |
Copies the given qt key sequence over this key sequence.
Parameters:
keySeq | the qt key sequence to copy |
Returns: true if successful, false otherwise
bool init ( const KKey& key )
| init |
Initializes the key sequence to only contain the given key.
Parameters:
key | the key to set |
Returns: true if successful, false otherwise
bool init ( const KKeyNative& key )
| init |
Initializes the key sequence to only contain the given key.
Parameters:
key | the key to set |
Returns: true if successful, false otherwise
bool init ( const KKeySequence& keySeq )
| init |
Copies the given key sequence over this key sequence.
Parameters:
keySeq | the key sequence to copy |
Returns: true if successful, false otherwise
bool init ( const QString& key )
| init |
Initializes this key sequence to contain the given key sequence. The description consists of comma-separated keys as required by KKey::KKey(const QString&).
Parameters:
key | the description of the key |
Returns: true if successful, false otherwise
See also: KKeyServer::Sym::init(), KKey::KKey(const, QString&)
KKeySequence& operator = ( const KKeySequence& seq )
| operator = |
Copy the given key sequence into this sequence.
uint count ()
| count |
[const]
Returns the number of key strokes of this sequence.
Returns: the number of key strokes
See also: MAX_KEYS
const KKey& key ( uint i )
| key |
[const]
Return the i
'th key of this sequence, or a null key if there
are less then i keys.
Parameters:
i | the key to retrieve |
Returns: the i
'th key, or KKey::null() if there are less
than i keys
See also: MAX_KEYS
bool isTriggerOnRelease ()
| isTriggerOnRelease |
[const]
bool setKey ( uint i, const KKey& key )
| setKey |
Sets the i
'th key of the sequence. You can not introduce gaps
in a sequence, so you must use an i
<= count(). Also note that
the maximum length of a key sequence is MAX_KEYS.
Parameters:
i | the position of the new key (<= count(), <= MAX_KEYS) |
key | the key to set |
Returns: true if successful, false otherwise
void setTriggerOnRelease ( bool )
| setTriggerOnRelease |
bool isNull ()
| isNull |
[const]
Returns true if the key sequence is null (after clear() or empty constructor).
Returns: true if the key sequence is null
See also: clear(), null()
bool startsWith ( const KKeySequence& keySeq )
| startsWith |
[const]
Returns true if this key sequence begins with the given sequence.
Parameters:
keySeq | the key sequence to search |
Returns: true if this key sequence begins with the given sequence
int compare ( const KKeySequence& keySeq )
| compare |
[const]
Compares this object with the given key sequence. Returns a negative number if the given KKeySequence is larger, 0 if they are equal and a positive number this KKeySequence is larger. Key sequences are compared by comparing the individual keys, starting from the beginning until an unequal key has been found. If a sequence contains more keys, it is considered larger.
Parameters:
keySeq | the key sequence to compare to |
Returns: a negative number if the given KKeySequence is larger, 0 if they are equal and a positive number this KKeySequence is larger
See also: KKey::sequence
bool operator == ( const KKeySequence& seq )
| operator == |
[const]
Compares the keys of both sequences.
See also: compare()
bool operator != ( const KKeySequence& seq )
| operator != |
[const]
Compares the keys of both sequences.
See also: compare()
bool operator < ( const KKeySequence& seq )
| operator < |
[const]
Compares the keys of both sequences.
See also: compare()
QKeySequence qt ()
| qt |
[const]
Converts this key sequence to a QKeySequence.
Returns: the QKeySequence
int keyCodeQt ()
| keyCodeQt |
[const]
Returns the qt key code of the first key.
Returns: the qt key code of the first key
See also: Qt::Key, KKey::keyCodeQt()
QString toString ()
| toString |
[const]
Returns the key sequence as a number of key presses as returned by KKey::toString(), seperated by commas.
Returns: the string represenation of this key sequence
See also: KKey::toString()
QString toStringInternal ()
| toStringInternal |
[const]
KKeySequence& null ()
| null |
[static]
Returns a null key sequence.
Returns: the null key sequence
See also: isNull(), clear()
uchar m_nKeys | m_nKeys |
[protected]
uchar m_bTriggerOnRelease | m_bTriggerOnRelease |
[protected]
KKey m_rgvar[MAX_KEYS] | m_rgvar[MAX_KEYS] |
[protected]
Generated by: caleb on tcdevel on Tue Jan 28 12:54:04 2003, using kdoc $. |