QShortcutEvent Class Reference

#include <qevent.h>

Inheritance diagram for QShortcutEvent:

Inheritance graph
[legend]
Collaboration diagram for QShortcutEvent:

Collaboration graph
[legend]
List of all members.

Detailed Description

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

Definition at line 627 of file qevent.h.

Public Member Functions

 QShortcutEvent (const QKeySequence &key, int id, bool ambiguous=false)
 ~QShortcutEvent ()
const QKeySequencekey ()
const QKeySequencekey () const
int shortcutId ()
int shortcutId () const
bool isAmbiguous ()
bool isAmbiguous () const

Protected Attributes

QKeySequence sequence
bool ambig
int sid


Constructor & Destructor Documentation

QShortcutEvent::QShortcutEvent ( const QKeySequence key,
int  id,
bool  ambiguous = false 
)

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.

Definition at line 2935 of file qevent.cpp.

02936     : QEvent(Shortcut), sequence(key), ambig(ambiguous), sid(id)
02937 {
02938 }

QShortcutEvent::~QShortcutEvent (  ) 

Destroys the event object.

Definition at line 2943 of file qevent.cpp.

02944 {
02945 }


Member Function Documentation

const QKeySequence & QShortcutEvent::key (  )  [inline]

Definition at line 633 of file qevent.h.

00633 { return sequence; }

const QKeySequence & QShortcutEvent::key (  )  const [inline]

Returns the key sequence that triggered the event.

Definition at line 634 of file qevent.h.

00634 { return sequence; }

int QShortcutEvent::shortcutId (  )  [inline]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 635 of file qevent.h.

Referenced by QAbstractButton::event(), QMenuBar::event(), and QLabel::event().

00635 { return sid; }

int QShortcutEvent::shortcutId (  )  const [inline]

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

See also:
QShortcut::id()

Definition at line 636 of file qevent.h.

00636 { return sid; }

bool QShortcutEvent::isAmbiguous (  )  [inline]

Definition at line 637 of file qevent.h.

Referenced by QAbstractButton::event(), and QLabel::event().

00637 { return ambig; }

bool QShortcutEvent::isAmbiguous (  )  const [inline]

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

See also:
QShortcut::activatedAmbiguously()

Definition at line 638 of file qevent.h.

00638 { return ambig; }


Member Data Documentation

QKeySequence QShortcutEvent::sequence [protected]

Definition at line 640 of file qevent.h.

bool QShortcutEvent::ambig [protected]

Definition at line 641 of file qevent.h.

int QShortcutEvent::sid [protected]

Definition at line 642 of file qevent.h.


The documentation for this class was generated from the following files:
Generated on Thu Mar 15 18:54:16 2007 for Qt 4.2 User's Guide by  doxygen 1.5.1