Rabbit Remote Control 0.1.0-bate6
Loading...
Searching...
No Matches
ParameterPlugin.h
1// Author: Kang Lin <kl222@126.com>
2
3#pragma once
4
5#include "FrmViewer.h"
6#include "ParameterGlobal.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
33class PLUGIN_EXPORT CParameterPlugin : public CParameter
34{
35 Q_OBJECT
36
37public:
38 explicit CParameterPlugin(QObject *parent = nullptr);
39 virtual ~CParameterPlugin();
40
41public:
42 CParameterGlobal *GetGlobalParameters();
43private:
44 CParameterGlobal m_GlobalParameter;
45
46protected:
50 virtual int OnLoad(QSettings &set) override;
54 virtual int OnSave(QSettings &set) override;
55
56public:
57 bool GetCaptureAllKeyboard() const;
58 void SetCaptureAllKeyboard(bool bCapture);
59Q_SIGNALS:
60 void sigCaptureAllKeyboard();
61private:
62 bool m_bCaptureAllKeyboard;
63
64public:
65 bool GetDesktopShortcutsScript() const;
66 void SetDesktopShortcutsScript(bool newDesktopShortcutsScript);
67private:
68 bool m_bDesktopShortcutsScript;
69public:
70 QString GetDisableDesktopShortcutsScript() const;
71 void SetDisableDesktopShortcutsScript(const QString &newDisableDesktopShortcutsScript);
72private:
73 QString m_szDisableDesktopShortcutsScript;
74public:
75 QString GetRestoreDesktopShortcutsScript() const;
76 void SetRestoreDesktopShortcutsScript(const QString &newRestoreDesktopShortcutsScript);
77private:
78 QString m_szRestoreDesktopShortcutsScript;
79
80public:
81 bool GetEnableLocalInputMethod() const;
82 void SetEnableLocalInputMethod(bool enable);
83private:
84 bool m_bEnableLocalInputMethod;
85
86public:
87 bool GetPromptAdministratorPrivilege();
88 void SetPromptAdministratorPrivilege(bool bShow);
89Q_SIGNALS:
90 void sigPromptAdministratorPrivilege();
91private:
92 bool m_bPromptAdministratorPrivilege;
93
94 // Enable use the system user as the user
95public:
96 bool GetEnableSystemUserToUser() const;
97 void SetEnableSystemUserToUser(bool enable);
98private:
99 bool m_bEnableSystemUserToUser;
100
102public:
103 const QString &GetEncryptKey() const;
104 void SetEncryptKey(const QString &newPassword);
105Q_SIGNALS:
106 void sigEncryptKeyChanged();
107private:
108 QString m_szEncryptKey; //Don't save to file
109 Q_PROPERTY(QString EncryptKey READ GetEncryptKey WRITE SetEncryptKey NOTIFY sigEncryptKeyChanged)
110
111public:
112 const bool &GetSavePassword() const;
113 void SetSavePassword(bool NewAutoSavePassword);
114Q_SIGNALS:
115 void sigSavePasswordChanged(bool AutoSavePassword);
116
117private:
118 bool m_bSavePassword;
119 Q_PROPERTY(bool SavePassword READ GetSavePassword WRITE SetSavePassword NOTIFY sigSavePasswordChanged)
120
121public:
122 enum class PromptType
123 {
124 No,
125 First
126 };
127 Q_ENUM(PromptType)
128 PromptType GetPromptType() const;
129 void SetPromptType(PromptType NewPromptType);
130Q_SIGNALS:
131 void sigPromptTypeChanged(PromptType PromptType);
132private:
133 PromptType m_PromptType;
134 Q_PROPERTY(PromptType PromptType READ GetPromptType WRITE SetPromptType NOTIFY sigPromptTypeChanged)
135
136public:
137 int GetPromptCount() const;
138 void SetPromptCount(int NewPromptCount);
139Q_SIGNALS:
140 void sigPromptCountChanged(int PromptCount);
141private:
142 int m_nPromptCount;
143 Q_PROPERTY(int PromptCount READ GetPromptCount WRITE SetPromptCount NOTIFY sigPromptCountChanged)
144
145public:
146 bool GetViewPassowrd() const;
147 void SetViewPassowrd(bool NewViewPassowrd);
148Q_SIGNALS:
149 void sigViewPassowrdChanged(bool ViewPassowrd);
150private:
151 bool m_bViewPassowrd;
152 Q_PROPERTY(bool ViewPassowrd READ GetViewPassowrd WRITE SetViewPassowrd NOTIFY sigViewPassowrdChanged)
153
154public:
155 bool GetUseSystemCredential() const;
156 void SetUseSystemCredential(bool newUseSystemCredential);
157private:
158 bool m_bUseSystemCredential;
159
161
162public:
163 bool GetShowProtocolPrefix() const;
164 void SetShowProtocolPrefix(bool bShowProtocolPrefix);
165Q_SIGNALS:
166 void sigShowProtocolPrefixChanged();
167private:
168 bool m_bShowProtocolPrefix;
169 Q_PROPERTY(bool ShowProtocolPrefix READ GetShowProtocolPrefix WRITE SetShowProtocolPrefix NOTIFY sigShowProtocolPrefixChanged)
170
171public:
172 bool GetShowIpPortInName() const;
173 void SetShowIpPortInName(bool bShowIpPortInName);
174Q_SIGNALS:
175 void sigSHowIpPortInNameChanged();
176private:
177 bool m_bShowIpPortInName;
178 Q_PROPERTY(bool ShowIpPortInName READ GetShowIpPortInName WRITE SetShowIpPortInName NOTIFY sigSHowIpPortInNameChanged)
179
180public:
181 CFrmViewer::ADAPT_WINDOWS GetAdaptWindows();
182 void SetAdaptWindows(CFrmViewer::ADAPT_WINDOWS aw);
183Q_SIGNALS:
184 void sigAdaptWindowsChanged();
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};
ADAPT_WINDOWS
The ADAPT_WINDOWS enum.
Definition FrmViewer.h:60
Global parameters of plugins.
Parameter interface.
Definition Parameter.h:209