CopperSpice API  1.9.2
QShortcutEvent Class Reference

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

Inheritance diagram for QShortcutEvent:
QEvent

Public Methods

 QShortcutEvent (const QKeySequence &key, int id, bool ambiguous=false)
 
 ~QShortcutEvent ()
 
bool isAmbiguous () const
 
const QKeySequencekey () const
 
int shortcutId () const
 
- Public Methods inherited from QEvent
 QEvent (const QEvent &other)
 
 QEvent (Type type)
 
virtual ~QEvent ()
 
void accept ()
 
void ignore ()
 
bool isAccepted () const
 
QEvent & operator= (const QEvent &other)
 
void setAccepted (bool accepted)
 
bool spontaneous () const
 
Type type () const
 

Additional Inherited Members

- Public Types inherited from QEvent
enum  Type
 
- Static Public Methods inherited from QEvent
static int registerEventType (int hint=-1)
 

Detailed Description

The QShortcutEvent class provides an event which is generated when the user presses a key combination. Normally you do not need to use this class directly; QShortcut provides a higher-level interface to handle shortcut keys.

See also
QShortcut

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. The value for ambiguous specifies whether there is more than one QShortcut for the same key sequence.

QShortcutEvent::~QShortcutEvent ( )

Destroys the event object.

Method Documentation

bool QShortcutEvent::isAmbiguous ( ) const
inline

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

See also
QShortcut::activatedAmbiguously()
const QKeySequence & QShortcutEvent::key ( ) const
inline

Returns the key sequence that triggered the event.

int QShortcutEvent::shortcutId ( ) const
inline

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

See also
QShortcut::id()