QxtGlobalShortcut Class Reference
[QxtGui module]

A global shortcut aka "hotkey". More...

 #include <QxtGlobalShortcut>

Inherits QObject.

Properties

Public Functions

Public Slots

Signals


Detailed Description

A global shortcut triggers even if the application is not active. This makes it easy to implement applications that react to certain shortcuts still if some other application is active or if the application is for example minimized to the system tray.

note Note: QxtGlobalShortcut requires QxtApplication.

Member Documentation

bool enabled

This property holds whether the shortcut is enabled.

A disabled shortcut does not get activated.

The default value is true.

see See also: setDisabled()

Access Functions:




QKeySequence shortcut

This property holds the shortcut key sequence.

note Note: Notice that corresponding key press and release events are not delivered for registered global shortcuts even if they are disabled. Also, comma separated key sequences are not supported. Only the first part is used:
qxtShortcut->setShortcut(QKeySequence("Ctrl+Alt+A,Ctrl+Alt+B"));
Q_ASSERT(qxtShortcut->shortcut() == QKeySequence("Ctrl+Alt+A"));

Access Functions:




explicit QxtGlobalShortcut ( QObject * parent = 0 )

Constructs a new QxtGlobalShortcut with parent.




explicit QxtGlobalShortcut ( const QKeySequence & shortcut , QObject * parent = 0 )

Constructs a new QxtGlobalShortcut with shortcut and parent.




virtual ~QxtGlobalShortcut ( )

Destructs the QxtGlobalShortcut.




void setEnabled ( bool enabled = true )




void setDisabled ( bool disabled = true )

Sets the shortcut disabled.

see See also: enabled




void activated ( )

This signal is emitted when the user types the shortcut's key sequence.

see See also: shortcut






Copyright © 2007 Qxt Foundation Trademarks
Qt Extension Library 0.4