Rabbit Remote Control 0.1.0-bate8
Loading...
Searching...
No Matches
ParameterPlugin.h
1// Author: Kang Lin <kl222@126.com>
2
3#pragma once
4
5#include <QObject>
6#include "FrmViewer.h"
7#include "ParameterRecord.h"
8#include "ParameterMediaDevices.h"
9
10#if defined(HAVE_QTERMWIDGET)
11#include "ParameterTerminal.h"
12#endif
13
14#include "ParameterFilter.h"
15
17
35class PLUGIN_EXPORT CParameterPlugin : public CParameter
36{
37 Q_OBJECT
38
39public:
40 explicit CParameterPlugin(QObject *parent = nullptr);
41 virtual ~CParameterPlugin();
42
43public:
44 CParameterGlobal *GetGlobalParameters();
45private:
46 CParameterGlobal* m_pGlobalParameter;
47
48protected:
52 virtual int OnLoad(QSettings &set) override;
56 virtual int OnSave(QSettings &set) override;
57
58public:
59 bool GetCaptureAllKeyboard() const;
60 void SetCaptureAllKeyboard(bool bCapture);
61Q_SIGNALS:
62 void sigCaptureAllKeyboard();
63private:
64 bool m_bCaptureAllKeyboard;
65
66public:
67 bool GetDesktopShortcutsScript() const;
68 void SetDesktopShortcutsScript(bool newDesktopShortcutsScript);
69private:
70 bool m_bDesktopShortcutsScript;
71public:
72 QString GetDisableDesktopShortcutsScript() const;
73 void SetDisableDesktopShortcutsScript(const QString &newDisableDesktopShortcutsScript);
74private:
75 QString m_szDisableDesktopShortcutsScript;
76public:
77 QString GetRestoreDesktopShortcutsScript() const;
78 void SetRestoreDesktopShortcutsScript(const QString &newRestoreDesktopShortcutsScript);
79private:
80 QString m_szRestoreDesktopShortcutsScript;
81
82public:
83 bool GetEnableLocalInputMethod() const;
84 void SetEnableLocalInputMethod(bool enable);
85private:
86 bool m_bEnableLocalInputMethod;
87
88public:
89 bool GetPromptAdministratorPrivilege();
90 void SetPromptAdministratorPrivilege(bool bShow);
91Q_SIGNALS:
92 void sigPromptAdministratorPrivilege();
93private:
94 bool m_bPromptAdministratorPrivilege;
95
96 // Enable use the system user as the user
97public:
98 bool GetEnableSystemUserToUser() const;
99 void SetEnableSystemUserToUser(bool enable);
100private:
101 bool m_bEnableSystemUserToUser;
102
104public:
105 const QString &GetEncryptKey() const;
106 void SetEncryptKey(const QString &newPassword);
107Q_SIGNALS:
108 void sigEncryptKeyChanged();
109private:
110 QString m_szEncryptKey; //Don't save to file
111 Q_PROPERTY(QString EncryptKey READ GetEncryptKey WRITE SetEncryptKey NOTIFY sigEncryptKeyChanged)
112
113public:
114 const bool &GetSavePassword() const;
115 void SetSavePassword(bool NewAutoSavePassword);
116Q_SIGNALS:
117 void sigSavePasswordChanged(bool AutoSavePassword);
118
119private:
120 bool m_bSavePassword;
121 Q_PROPERTY(bool SavePassword READ GetSavePassword WRITE SetSavePassword NOTIFY sigSavePasswordChanged)
122
123public:
124 enum class PromptType
125 {
126 No,
127 First
128 };
129 Q_ENUM(PromptType)
130 PromptType GetPromptType() const;
131 void SetPromptType(PromptType NewPromptType);
132Q_SIGNALS:
133 void sigPromptTypeChanged(PromptType PromptType);
134private:
135 PromptType m_PromptType;
136 Q_PROPERTY(PromptType PromptType READ GetPromptType WRITE SetPromptType NOTIFY sigPromptTypeChanged)
137
138public:
139 int GetPromptCount() const;
140 void SetPromptCount(int NewPromptCount);
141Q_SIGNALS:
142 void sigPromptCountChanged(int PromptCount);
143private:
144 int m_nPromptCount;
145 Q_PROPERTY(int PromptCount READ GetPromptCount WRITE SetPromptCount NOTIFY sigPromptCountChanged)
146
147public:
148 bool GetViewPassowrd() const;
149 void SetViewPassowrd(bool NewViewPassowrd);
150Q_SIGNALS:
151 void sigViewPassowrdChanged(bool ViewPassowrd);
152private:
153 bool m_bViewPassowrd;
154 Q_PROPERTY(bool ViewPassowrd READ GetViewPassowrd WRITE SetViewPassowrd NOTIFY sigViewPassowrdChanged)
155
156public:
157 bool GetUseSystemCredential() const;
158 void SetUseSystemCredential(bool newUseSystemCredential);
159private:
160 bool m_bUseSystemCredential;
161
163public:
164 enum class NameStyle {
165 Protocol = 0x01,
166 ServerName = 0x02,
167 SecurityLevel =0x04
168 };
169 Q_ENUM(NameStyle)
170 Q_DECLARE_FLAGS(NameStyles, NameStyle)
171 Q_FLAG(NameStyles);
172 NameStyles GetNameStyles() const;
173 void SetNameStyles(const NameStyles &newNameStyles);
174Q_SIGNALS:
175 void sigNameStylesChanged();
176private:
177 NameStyles m_NameStyles;
178
179public:
180 CFrmViewer::ADAPT_WINDOWS GetAdaptWindows();
181 void SetAdaptWindows(CFrmViewer::ADAPT_WINDOWS aw);
182Q_SIGNALS:
183 void sigAdaptWindowsChanged();
184
185private:
186 CFrmViewer::ADAPT_WINDOWS m_AdaptWindows;
187 Q_PROPERTY(CFrmViewer::ADAPT_WINDOWS AdaptWindows READ GetAdaptWindows WRITE SetAdaptWindows NOTIFY sigAdaptWindowsChanged)
188
189public:
190 bool GetEnableSetPluginsPath() const;
191 void SetEnableSetPluginsPath(bool newEnableSetPluginsPath);
192private:
193 bool m_bEnableSetPluginsPath;
194
195public:
196 QStringList GetPluginsPath() const;
197 void SetPluginsPath(const QStringList &newPluginsPath);
198 bool GetOnlyLoadInWhitelist() const;
199 void SetOnlyLoadInWhitelist(bool newOnlyLoadInWhitelist);
200 CParameterFilter m_WhiteList;
201 CParameterFilter m_BlackList;
202private:
203 QStringList m_szPluginsPath;
204 bool m_bOnlyLoadInWhitelist;
205
206public:
207 CParameterRecord m_Record;
208 CParameterMediaDevices m_MediaDevices;
209#if defined(HAVE_QTERMWIDGET)
210 CParameterTerminal m_Terminal;
211#endif
212};
213
214// 在类外部声明操作符(通常放在头文件末尾)
215Q_DECLARE_OPERATORS_FOR_FLAGS(CParameterPlugin::NameStyles)
ADAPT_WINDOWS
The ADAPT_WINDOWS enum.
Definition FrmViewer.h:60
Global parameters.
Global parameters of plugins.
Parameter interface.
Definition Parameter.h:218