Rabbit Remote Control 0.1.0-bate5
Loading...
Searching...
No Matches
Hook.h
1// Author: Kang Lin <kl222@126.com>
2
3#pragma once
4
5#include <QObject>
6#include "ParameterPlugin.h"
7#include "Unix/DesktopShortcuts.h"
8
14class CHook : public QObject
15{
16public:
17 static CHook* GetHook(CParameterPlugin* pPara, QObject *parent = nullptr);
18
19 virtual int RegisterKeyboard();
20 virtual int UnRegisterKeyboard();
21
22 static bool RunCommand(const QString &program, const QStringList &args = QStringList(), int timeout = 5000);
23
24public:
25 // QObject interface
26 virtual bool eventFilter(QObject *watched, QEvent *event) override;
27
28protected:
29 CParameterPlugin* m_pParameterPlugin;
30
31protected:
32 explicit CHook(CParameterPlugin* pPara, QObject *parent = nullptr);
33 virtual ~CHook();
34
35 virtual int OnRegisterKeyboard();
36 virtual int OnUnRegisterKeyboard();
37 virtual int OnDisableDesktopShortcuts();
38 virtual int OnRestoreDesktopShortcuts();
39
40private:
41 bool m_bScript;
42 CDesktopShortcutManager m_DesktopShortcutsManager;
43};
44
The class is the HOOK abstract class.
Definition Hook.h:15
Global parameters of plugins.