Rabbit Remote Control 0.1.0-bate10
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:
48 CParameterGlobal *GetGlobalParameters();
49private:
50 CParameterGlobal* m_pGlobalParameter;
51
52protected:
56 virtual int OnLoad(QSettings &set) override;
60 virtual int OnSave(QSettings &set) override;
61
62public:
63 bool GetCaptureAllKeyboard() const;
64 void SetCaptureAllKeyboard(bool bCapture);
65Q_SIGNALS:
66 void sigCaptureAllKeyboard();
67private:
68 bool m_bCaptureAllKeyboard;
69
70public:
71 bool GetDesktopShortcutsScript() const;
72 void SetDesktopShortcutsScript(bool newDesktopShortcutsScript);
73private:
74 bool m_bDesktopShortcutsScript;
75public:
76 QString GetDisableDesktopShortcutsScript() const;
77 void SetDisableDesktopShortcutsScript(const QString &newDisableDesktopShortcutsScript);
78private:
79 QString m_szDisableDesktopShortcutsScript;
80public:
81 QString GetRestoreDesktopShortcutsScript() const;
82 void SetRestoreDesktopShortcutsScript(const QString &newRestoreDesktopShortcutsScript);
83private:
84 QString m_szRestoreDesktopShortcutsScript;
85
86public:
87 bool GetEnableLocalInputMethod() const;
88 void SetEnableLocalInputMethod(bool enable);
89private:
90 bool m_bEnableLocalInputMethod;
91
92public:
93 bool GetPromptAdministratorPrivilege();
94 void SetPromptAdministratorPrivilege(bool bShow);
95Q_SIGNALS:
96 void sigPromptAdministratorPrivilege();
97private:
98 bool m_bPromptAdministratorPrivilege;
99
100 // Enable use the system user as the user
101public:
102 bool GetEnableSystemUserToUser() const;
103 void SetEnableSystemUserToUser(bool enable);
104private:
105 bool m_bEnableSystemUserToUser;
106
108public:
109 const QString &GetEncryptKey() const;
110 void SetEncryptKey(const QString &newPassword);
111Q_SIGNALS:
112 void sigEncryptKeyChanged();
113private:
114 QString m_szEncryptKey; //Don't save to file
115 Q_PROPERTY(QString EncryptKey READ GetEncryptKey WRITE SetEncryptKey NOTIFY sigEncryptKeyChanged)
116
117public:
118 const bool &GetSavePassword() const;
119 void SetSavePassword(bool NewAutoSavePassword);
120Q_SIGNALS:
121 void sigSavePasswordChanged(bool AutoSavePassword);
122
123private:
124 bool m_bSavePassword;
125 Q_PROPERTY(bool SavePassword READ GetSavePassword WRITE SetSavePassword NOTIFY sigSavePasswordChanged)
126
127public:
128 enum class PromptType
129 {
130 No,
131 First
132 };
133 Q_ENUM(PromptType)
134 PromptType GetPromptType() const;
135 void SetPromptType(PromptType NewPromptType);
136Q_SIGNALS:
137 void sigPromptTypeChanged(PromptType PromptType);
138private:
139 PromptType m_PromptType;
140 Q_PROPERTY(PromptType PromptType READ GetPromptType WRITE SetPromptType NOTIFY sigPromptTypeChanged)
141
142public:
143 int GetPromptCount() const;
144 void SetPromptCount(int NewPromptCount);
145Q_SIGNALS:
146 void sigPromptCountChanged(int PromptCount);
147private:
148 int m_nPromptCount;
149 Q_PROPERTY(int PromptCount READ GetPromptCount WRITE SetPromptCount NOTIFY sigPromptCountChanged)
150
151public:
152 bool GetViewPassowrd() const;
153 void SetViewPassowrd(bool NewViewPassowrd);
154Q_SIGNALS:
155 void sigViewPassowrdChanged(bool ViewPassowrd);
156private:
157 bool m_bViewPassowrd;
158 Q_PROPERTY(bool ViewPassowrd READ GetViewPassowrd WRITE SetViewPassowrd NOTIFY sigViewPassowrdChanged)
159
160public:
161 bool GetUseSystemCredential() const;
162 void SetUseSystemCredential(bool newUseSystemCredential);
163private:
164 bool m_bUseSystemCredential;
165
167public:
168 enum class NameStyle {
169 Protocol = 0x01,
170 ServerName = 0x02,
171 SecurityLevel =0x04
172 };
173 Q_ENUM(NameStyle)
174 Q_DECLARE_FLAGS(NameStyles, NameStyle)
175 Q_FLAG(NameStyles);
176 NameStyles GetNameStyles() const;
177 void SetNameStyles(const NameStyles &newNameStyles);
178Q_SIGNALS:
179 void sigNameStylesChanged();
180private:
181 NameStyles m_NameStyles;
182
183public:
184 CFrmViewer::ADAPT_WINDOWS GetAdaptWindows();
185 void SetAdaptWindows(CFrmViewer::ADAPT_WINDOWS aw);
186Q_SIGNALS:
187 void sigAdaptWindowsChanged();
188
189private:
190 CFrmViewer::ADAPT_WINDOWS m_AdaptWindows;
191 Q_PROPERTY(CFrmViewer::ADAPT_WINDOWS AdaptWindows READ GetAdaptWindows WRITE SetAdaptWindows NOTIFY sigAdaptWindowsChanged)
192
193public:
194 bool GetEnableSetPluginsPath() const;
195 void SetEnableSetPluginsPath(bool newEnableSetPluginsPath);
196private:
197 bool m_bEnableSetPluginsPath;
198
199public:
200 QStringList GetPluginsPath() const;
201 void SetPluginsPath(const QStringList &newPluginsPath);
202 bool GetOnlyLoadInWhitelist() const;
203 void SetOnlyLoadInWhitelist(bool newOnlyLoadInWhitelist);
204 CParameterFilter m_WhiteList;
205 CParameterFilter m_BlackList;
206private:
207 QStringList m_szPluginsPath;
208 bool m_bOnlyLoadInWhitelist;
209
210public:
214 CParameterRecord m_Record;
215 CParameterMediaDevices m_MediaDevices;
216#if defined(HAVE_QTERMWIDGET)
217 CParameterTerminal m_Terminal;
218#endif
220};
221
222// 在类外部声明操作符(通常放在头文件末尾)
223Q_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:220