mirror of
https://github.com/Skycoder42/QHotkey.git
synced 2026-11-19 12:49:58 +03:00
added doxyfile and begin doc
This commit is contained in:
+3
-1
@@ -4,4 +4,6 @@ SUBDIRS += \
|
|||||||
HotkeyTest
|
HotkeyTest
|
||||||
|
|
||||||
DISTFILES += README.md \
|
DISTFILES += README.md \
|
||||||
LICENSE
|
LICENSE \
|
||||||
|
doc/qhotkey.doxy \
|
||||||
|
doc/qhotkey.dox
|
||||||
|
|||||||
@@ -18,30 +18,46 @@ class QHotkey : public QObject
|
|||||||
Q_PROPERTY(QKeySequence shortcut READ shortcut WRITE setShortcut RESET resetShortcut)
|
Q_PROPERTY(QKeySequence shortcut READ shortcut WRITE setShortcut RESET resetShortcut)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
//! Defines shortcut with native keycodes
|
||||||
typedef QPair<quint32, quint32> NativeShortcut;
|
typedef QPair<quint32, quint32> NativeShortcut;
|
||||||
|
|
||||||
|
//! Constructor
|
||||||
explicit QHotkey(QObject *parent = 0);
|
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 = true, 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 = true, QObject *parent = 0);
|
||||||
|
//! Destructor
|
||||||
~QHotkey();
|
~QHotkey();
|
||||||
|
|
||||||
|
//! Test if a certain key with modifiers is currently registered somewhere or not
|
||||||
static bool isKeyCaptured(Qt::Key key, Qt::KeyboardModifiers modifiers);
|
static bool isKeyCaptured(Qt::Key key, Qt::KeyboardModifiers modifiers);
|
||||||
|
|
||||||
|
//! READ-Accessor for QHotkey::registered
|
||||||
bool isRegistered() const;
|
bool isRegistered() const;
|
||||||
|
//! READ-Accessor for QHotkey::shortcut
|
||||||
QKeySequence shortcut() const;
|
QKeySequence shortcut() const;
|
||||||
|
//! The key-code of the current shortcut
|
||||||
Qt::Key keyCode() const;
|
Qt::Key keyCode() const;
|
||||||
|
//! The modifiers of the current shortcut
|
||||||
Qt::KeyboardModifiers modifiers() const;
|
Qt::KeyboardModifiers modifiers() const;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
//! WRITE-Accessor for QHotkey::registered
|
||||||
bool setRegistered(bool registered);
|
bool setRegistered(bool registered);
|
||||||
|
|
||||||
|
//! WRITE-Accessor for QHotkey::shortcut
|
||||||
bool setShortcut(const QKeySequence& shortcut, bool autoRegister = true);
|
bool setShortcut(const QKeySequence& shortcut, bool autoRegister = true);
|
||||||
|
//! 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 = true);
|
||||||
|
//! RESET-Accessor for QHotkey::shortcut
|
||||||
bool resetShortcut();
|
bool resetShortcut();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
//! Will be emitted if the shortcut is pressed
|
||||||
void activated();
|
void activated();
|
||||||
|
|
||||||
|
//! NOTIFY-Accessor for QHotkey::registered
|
||||||
void registeredChanged(bool registered);
|
void registeredChanged(bool registered);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
+2527
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user