玉兔远程控制
0.1.0-bate11
Toggle main menu visibility
载入中...
搜索中...
未找到
Src
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
14
class
CHook :
public
QObject
15
{
16
Q_OBJECT
17
public
:
18
static
CHook* GetHook(
CParameterPlugin
* pPara, QObject *parent =
nullptr
);
19
20
virtual
int
RegisterKeyboard();
21
virtual
int
UnRegisterKeyboard();
22
23
static
bool
RunCommand(
const
QString &program,
const
QStringList &args = QStringList(),
int
timeout = 5000);
24
25
public
:
26
// QObject interface
27
virtual
bool
eventFilter(QObject *watched, QEvent *event)
override
;
28
29
protected
:
30
CParameterPlugin
* m_pParameterPlugin;
31
32
protected
:
33
explicit
CHook(
CParameterPlugin
* pPara, QObject *parent =
nullptr
);
34
virtual
~CHook();
35
36
virtual
int
OnRegisterKeyboard();
37
virtual
int
OnUnRegisterKeyboard();
38
virtual
int
OnDisableDesktopShortcuts();
39
virtual
int
OnRestoreDesktopShortcuts();
40
41
private
:
42
bool
m_bScript;
43
CDesktopShortcutManager
m_DesktopShortcutsManager;
44
};
45
CDesktopShortcutManager
Manage desktop shortcut keys
定义
DesktopShortcuts.h:17
CParameterPlugin
插件的全局参数。
定义
ParameterPlugin.h:36
作者:康林 (kl222@126.com)
版权所有(c) 康林工作室 保留所有权力