mirror of
https://github.com/Skycoder42/QHotkey.git
synced 2026-11-19 12:49:58 +03:00
doc ready and add QPrivateSignal to activated
This commit is contained in:
+8
-11
@@ -24,22 +24,19 @@ public:
|
||||
//! Constructor
|
||||
explicit QHotkey(QObject *parent = 0);
|
||||
//! Constructs a hotkey with a shortcut and optionally registers it
|
||||
explicit QHotkey(const QKeySequence &shortcut, bool autoRegister = true, QObject *parent = 0);
|
||||
explicit QHotkey(const QKeySequence &shortcut, bool autoRegister = false, QObject *parent = 0);
|
||||
//! Constructs a hotkey with a key and modifiers and optionally registers it
|
||||
explicit QHotkey(Qt::Key key, Qt::KeyboardModifiers modifiers, bool autoRegister = true, QObject *parent = 0);
|
||||
explicit QHotkey(Qt::Key key, Qt::KeyboardModifiers modifiers, bool autoRegister = false, QObject *parent = 0);
|
||||
//! Destructor
|
||||
~QHotkey();
|
||||
|
||||
//! Test if a certain key with modifiers is currently registered somewhere or not
|
||||
static bool isKeyCaptured(Qt::Key key, Qt::KeyboardModifiers modifiers);
|
||||
|
||||
//! READ-Accessor for QHotkey::registered
|
||||
bool isRegistered() const;
|
||||
//! READ-Accessor for QHotkey::shortcut
|
||||
//! READ-Accessor for QHotkey::shortcut - the key and modifiers as a QKeySequence
|
||||
QKeySequence shortcut() const;
|
||||
//! The key-code of the current shortcut
|
||||
//! READ-Accessor for QHotkey::shortcut - the key only
|
||||
Qt::Key keyCode() const;
|
||||
//! The modifiers of the current shortcut
|
||||
//! READ-Accessor for QHotkey::shortcut - the modifiers only
|
||||
Qt::KeyboardModifiers modifiers() const;
|
||||
|
||||
public slots:
|
||||
@@ -47,15 +44,15 @@ public slots:
|
||||
bool setRegistered(bool registered);
|
||||
|
||||
//! WRITE-Accessor for QHotkey::shortcut
|
||||
bool setShortcut(const QKeySequence& shortcut, bool autoRegister = true);
|
||||
bool setShortcut(const QKeySequence &shortcut, bool autoRegister = false);
|
||||
//! WRITE-Accessor for QHotkey::shortcut
|
||||
bool setShortcut(Qt::Key key, Qt::KeyboardModifiers modifiers, bool autoRegister = true);
|
||||
bool setShortcut(Qt::Key key, Qt::KeyboardModifiers modifiers, bool autoRegister = false);
|
||||
//! RESET-Accessor for QHotkey::shortcut
|
||||
bool resetShortcut();
|
||||
|
||||
signals:
|
||||
//! Will be emitted if the shortcut is pressed
|
||||
void activated();
|
||||
void activated(QPrivateSignal);
|
||||
|
||||
//! NOTIFY-Accessor for QHotkey::registered
|
||||
void registeredChanged(bool registered);
|
||||
|
||||
Reference in New Issue
Block a user