Home · All Classes · alphabetical Classes List · Modules · Functions ·

QxtApplication Class Reference
[Gui]

An application with support for hotkeys aka "global shortcuts". More...

Public Member Functions

Static Public Member Functions


Detailed Description

An application with support for hotkeys aka "global shortcuts".

QxtApplication introduces hotkeys which trigger even if the application is not active.

Note:
Currently supported platforms are X11 and Windows.


Constructor & Destructor Documentation

QxtApplication::QxtApplication ( int &  argc, char **  argv )

Constructs a new QxtApplication. All other variations of QApplication constructors are supported too.



Member Function Documentation

bool QxtApplication::addHotKey ( Qt::KeyboardModifiers  modifiers, Qt::Key  key, QWidget *  receiver, const char *  member )

Adds a hotkey using modifiers and key. The member of receiver is invoked upon hotkey trigger.

Returns:
true if hotkey registration succeed, false otherwise.
Example usage:
    QxtLabel* label = new QxtLabel("Hello world!");
    qxtApp->addHotKey(Qt::ShiftModifier | Qt::ControlModifier, Qt::Key_S, label, "show");


bool QxtApplication::removeHotKey ( Qt::KeyboardModifiers  modifiers, Qt::Key  key, QWidget *  receiver, const char *  member )

Removes the hotkey using modifiers and key mapped to member of receiver.

Returns:
true if hotkey unregistration succeed, false otherwise.


QxtApplication::instance ( ) [inline, static]

Returns a pointer to the instance of the application.



(c) 2007A.Picciani and A.Higerd LGPL
libqxt 0.2