summaryrefslogtreecommitdiffstats
path: root/kdejava/koala/org/kde/koala/KKeySequence.java
diff options
context:
space:
mode:
Diffstat (limited to 'kdejava/koala/org/kde/koala/KKeySequence.java')
-rw-r--r--kdejava/koala/org/kde/koala/KKeySequence.java211
1 files changed, 211 insertions, 0 deletions
diff --git a/kdejava/koala/org/kde/koala/KKeySequence.java b/kdejava/koala/org/kde/koala/KKeySequence.java
new file mode 100644
index 00000000..143f9612
--- /dev/null
+++ b/kdejava/koala/org/kde/koala/KKeySequence.java
@@ -0,0 +1,211 @@
+//Auto-generated by kalyptus. DO NOT EDIT.
+package org.kde.koala;
+
+import org.kde.qt.Qt;
+import org.kde.qt.QKeySequence;
+import org.kde.qt.QtSupport;
+
+/**
+
+ A KKeySequence object holds a sequence of up to 4 keys.
+ Ex: Ctrl+X,I
+ @short A KKeySequence object holds a sequence of up to 4 keys.
+ @see KKey
+ @see KShortcut
+
+*/
+public class KKeySequence implements QtSupport {
+ private long _qt;
+ private boolean _allocatedInJavaWorld = true;
+ protected KKeySequence(Class dummy){}
+
+ public static final int MAX_KEYS = 4;
+
+ /**
+ Create a new null key sequence.
+ @short Create a new null key sequence.
+ @see #isNull
+ @see #null
+ @see #clear
+ */
+ public KKeySequence() {
+ newKKeySequence();
+ }
+ private native void newKKeySequence();
+ /**
+ Copies the given qt key sequence.
+ @param keySeq the qt key sequence to copy
+ @short Copies the given qt key sequence.
+ */
+ public KKeySequence(QKeySequence keySeq) {
+ newKKeySequence(keySeq);
+ }
+ private native void newKKeySequence(QKeySequence keySeq);
+ /**
+ Create a new key sequence that only contains the given key.
+ @param key the key to add
+ @short Create a new key sequence that only contains the given key.
+ */
+ public KKeySequence(KKey key) {
+ newKKeySequence(key);
+ }
+ private native void newKKeySequence(KKey key);
+ /**
+ Copies the given key sequence.
+ @param keySeq the key sequence to copy
+ @short Copies the given key sequence.
+ */
+ public KKeySequence(KKeySequence keySeq) {
+ newKKeySequence(keySeq);
+ }
+ private native void newKKeySequence(KKeySequence keySeq);
+ /**
+ Creates a new key sequence that contains the given key sequence.
+ The description consists of comma-separated keys as
+ required by KKey.KKey(String).
+ @param keySeq the description of the key
+ @short Creates a new key sequence that contains the given key sequence.
+ @see KKeyServer#Sym#init
+ @see KKey#KKey(const
+ */
+ public KKeySequence(String keySeq) {
+ newKKeySequence(keySeq);
+ }
+ private native void newKKeySequence(String keySeq);
+ /**
+ Clears the key sequence. The key sequence is null after calling this
+ function.
+ @short Clears the key sequence.
+ @see #isNull
+ */
+ public native void clear();
+ /**
+ Returns the number of key strokes of this sequence.
+ @return the number of key strokes
+
+ @short Returns the number of key strokes of this sequence.
+ @see MAX_KEYS
+ */
+ public native int count();
+ /**
+ Return the <code>i</code>'th key of this sequence, or a null key if there
+ are less then i keys.
+ @param i the key to retrieve
+ @return the <code>i</code>'th key, or KKey.null() if there are less
+ than i keys
+
+ @short Return the <code>i</code>'th key of this sequence, or a null key if there are less then i keys.
+ @see MAX_KEYS
+ */
+ public native KKey key(int i);
+ /**
+ @short
+ */
+ public native boolean isTriggerOnRelease();
+ /**
+ Sets the <code>i</code>'th key of the sequence. You can not introduce gaps
+ in a sequence, so you must use an <code>i</code> <= count(). Also note that
+ the maximum length of a key sequence is MAX_KEYS.
+ @param i the position of the new key (<= count(), <= MAX_KEYS)
+ @param key the key to set
+ @return true if successful, false otherwise
+
+ @short Sets the <code>i</code>'th key of the sequence.
+ */
+ public native boolean setKey(int i, KKey key);
+ /**
+ Returns true if the key sequence is null (after clear() or empty
+ constructor).
+ @return true if the key sequence is null
+
+ @short Returns true if the key sequence is null (after clear() or empty constructor).
+ @see #clear
+ @see #null
+ */
+ public native boolean isNull();
+ /**
+ Returns true if this key sequence begins with the given sequence.
+ @param keySeq the key sequence to search
+ @return true if this key sequence begins with the given sequence
+
+ @short Returns true if this key sequence begins with the given sequence.
+ */
+ public native boolean startsWith(KKeySequence keySeq);
+ /**
+ 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.
+ @param keySeq the key sequence to compare to
+ @return a negative number if the given KKeySequence is larger, 0 if
+ they are equal and a positive number this KKeySequence is larger
+
+ @short Compares this object with the given key sequence.
+ @see KKey#sequence
+ */
+ public native int compare(KKeySequence keySeq);
+ /**
+ Compares the keys of both sequences.
+ @short Compares the keys of both sequences.
+ @see #compare
+ */
+ public native boolean op_equals(KKeySequence seq);
+ /**
+ Compares the keys of both sequences.
+ @short Compares the keys of both sequences.
+ @see #compare
+ */
+ public native boolean op_not_equals(KKeySequence seq);
+ /**
+ Compares the keys of both sequences.
+ @short Compares the keys of both sequences.
+ @see #compare
+ */
+ public native boolean op_lt(KKeySequence seq);
+ /**
+ Converts this key sequence to a QKeySequence.
+ @return the QKeySequence
+
+ @short Converts this key sequence to a QKeySequence.
+ */
+ public native QKeySequence qt();
+ /**
+ Returns the qt key code of the first key.
+ @return the qt key code of the first key
+
+ @short Returns the qt key code of the first key.
+ @see org.kde.qt.Qt#Key
+ @see KKey#keyCodeQt
+ */
+ public native int keyCodeQt();
+ /**
+ Returns the key sequence as a number of key presses as
+ returned by KKey.toString(), separated by commas.
+ @return the string represenation of this key sequence
+
+ @short Returns the key sequence as a number of key presses as returned by KKey.toString(), separated by commas.
+ @see KKey#toString
+ */
+ public native String toString();
+ /**
+ @short
+ */
+ public native String toStringInternal();
+ /**
+ Returns a null key sequence.
+ @return the null key sequence
+
+ @short Returns a null key sequence.
+ @see #isNull
+ @see #clear
+ */
+ public static native KKeySequence nil();
+ /** Deletes the wrapped C++ instance */
+ protected native void finalize() throws InternalError;
+ /** Delete the wrapped C++ instance ahead of finalize() */
+ public native void dispose();
+ /** Has the wrapped C++ instance been deleted? */
+ public native boolean isDisposed();
+}