mirror of
https://github.com/Skycoder42/QHotkey.git
synced 2026-11-19 12:49:58 +03:00
code cleanup
This commit is contained in:
+4
-9
@@ -31,13 +31,12 @@ protected:
|
||||
virtual bool registerShortcut(QHotkey::NativeShortcut shortcut) = 0;//platform implement
|
||||
virtual bool unregisterShortcut(QHotkey::NativeShortcut shortcut) = 0;//platform implement
|
||||
|
||||
private:/*functions*/
|
||||
private:
|
||||
QMultiHash<QHotkey::NativeShortcut, QHotkey*> shortcuts;
|
||||
|
||||
Q_INVOKABLE bool addShortcutInvoked(QHotkey *hotkey);
|
||||
Q_INVOKABLE bool removeShortcutInvoked(QHotkey *hotkey);
|
||||
Q_INVOKABLE inline QHotkey::NativeShortcut nativeShortcutInvoked(Qt::Key keycode, Qt::KeyboardModifiers modifiers);
|
||||
|
||||
private:
|
||||
QMultiHash<QHotkey::NativeShortcut, QHotkey*> shortcuts;
|
||||
Q_INVOKABLE QHotkey::NativeShortcut nativeShortcutInvoked(Qt::Key keycode, Qt::KeyboardModifiers modifiers);
|
||||
};
|
||||
|
||||
#define NATIVE_INSTANCE(ClassName) \
|
||||
@@ -48,8 +47,4 @@ private:
|
||||
return hotkeyPrivate;\
|
||||
}
|
||||
|
||||
inline QHotkey::NativeShortcut QHotkeyPrivate::nativeShortcutInvoked(Qt::Key keycode, Qt::KeyboardModifiers modifiers) {
|
||||
return {this->nativeKeycode(keycode), this->nativeModifiers(modifiers)};
|
||||
}
|
||||
|
||||
#endif // QHOTKEY_P_H
|
||||
|
||||
Reference in New Issue
Block a user