com.trolltech.qt.gui
Class QShortcutEvent

java.lang.Object
  extended by com.trolltech.qt.QSignalEmitter
      extended by com.trolltech.qt.QtJambiObject
          extended by com.trolltech.qt.core.QEvent
              extended by com.trolltech.qt.gui.QShortcutEvent
All Implemented Interfaces:
QtJambiInterface

public class QShortcutEvent
extends QEvent

The QShortcutEvent class provides an event which is generated when the user presses a key combination.

Normally you don't need to use this class directly; QShortcut provides a higher-level interface to handle shortcut keys.

See Also:
QShortcut

Nested Class Summary
 
Nested classes/interfaces inherited from class com.trolltech.qt.core.QEvent
QEvent.Type
 
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
QSignalEmitter.Signal0, QSignalEmitter.Signal1<A>, QSignalEmitter.Signal2<A,B>, QSignalEmitter.Signal3<A,B,C>, QSignalEmitter.Signal4<A,B,C,D>, QSignalEmitter.Signal5<A,B,C,D,E>, QSignalEmitter.Signal6<A,B,C,D,E,F>, QSignalEmitter.Signal7<A,B,C,D,E,F,G>, QSignalEmitter.Signal8<A,B,C,D,E,F,G,H>, QSignalEmitter.Signal9<A,B,C,D,E,F,G,H,I>
 
Constructor Summary
QShortcutEvent(QKeySequence key, int id)
          Equivalent to QShortcutEvent(key, id, false).
QShortcutEvent(QKeySequence key, int id, boolean ambiguous)
          Constructs a shortcut event for the given key press, associated with the QShortcut ID id.
 
Method Summary
protected  boolean ambig()
          Returns true if the key sequence that triggered the event is ambiguous.
static QShortcutEvent fromNativePointer(QNativePointer nativePointer)
          This function returns the QShortcutEvent instance pointed to by nativePointer
 boolean isAmbiguous()
          Returns true if the key sequence that triggered the event is ambiguous.
 QKeySequence key()
          Returns the key sequence that triggered the event.
protected  QKeySequence sequence()
          Returns the key sequence (QKeySequence) for this QShortcutEvent.
protected  void setAmbig(boolean ambig)
          Sets this QShortcutEvent as having an ambiguous key sequence.
protected  void setSequence(QKeySequence sequence)
          Constructs a shortcut event for the given sequence.
protected  void setSid(int sid)
          Sets this QShortcutEvent's ID to sid.
 int shortcutId()
          Returns the ID of the QShortcut object for which this event was generated.
protected  int sid()
          Returns this QShortcutEvent's ID.
 
Methods inherited from class com.trolltech.qt.core.QEvent
accept, ignore, isAccepted, setAccepted, setT, spontaneous, t, type
 
Methods inherited from class com.trolltech.qt.QtJambiObject
dispose, disposed, finalize, reassignNativeResources, tr, tr, tr
 
Methods inherited from class com.trolltech.qt.QSignalEmitter
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.trolltech.qt.QtJambiInterface
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership
 

Constructor Detail

QShortcutEvent

public QShortcutEvent(QKeySequence key,
                      int id)

Equivalent to QShortcutEvent(key, id, false).


QShortcutEvent

public QShortcutEvent(QKeySequence key,
                      int id,
                      boolean ambiguous)

Constructs a shortcut event for the given key press, associated with the QShortcut ID id.

ambiguous specifies whether there is more than one QShortcut for the same key sequence.

Method Detail

isAmbiguous

public final boolean isAmbiguous()

Returns true if the key sequence that triggered the event is ambiguous.

See Also:
QShortcut::activatedAmbiguously

key

public final QKeySequence key()

Returns the key sequence that triggered the event.


shortcutId

public final int shortcutId()

Returns the ID of the QShortcut object for which this event was generated.

See Also:
QShortcut::id

setSequence

protected final void setSequence(QKeySequence sequence)
Constructs a shortcut event for the given sequence.


sequence

protected final QKeySequence sequence()
Returns the key sequence (QKeySequence) for this QShortcutEvent.


setSid

protected final void setSid(int sid)
Sets this QShortcutEvent's ID to sid.


sid

protected final int sid()
Returns this QShortcutEvent's ID.


setAmbig

protected final void setAmbig(boolean ambig)
Sets this QShortcutEvent as having an ambiguous key sequence.


ambig

protected final boolean ambig()
Returns true if the key sequence that triggered the event is ambiguous.


fromNativePointer

public static QShortcutEvent fromNativePointer(QNativePointer nativePointer)
This function returns the QShortcutEvent instance pointed to by nativePointer

Parameters:
nativePointer - the QNativePointer of which object should be returned.