|
Rabbit Remote Control 0.1.0-bate4
|
Operational parameter interface. More...
#include <ParameterOperate.h>


Signals | |
| void | sigSetGlobalParameters () |
| Only used by this class. | |
| void | sigNameChanged (const QString &name=QString()) |
Signals inherited from CParameter | |
| void | sigChanged () |
| emit when the parameter changes Usually if required, the corresponding parameter corresponds to a change event. | |
Public Member Functions | |
| CParameterOperate (QObject *parent=nullptr, const QString &szPrefix=QString()) | |
| CParameterPlugin * | GetGlobalParameters () |
| Get CParameterPlugin. | |
| int | SetGlobalParameters (CParameterPlugin *p) |
| const QString | GetName () const |
| void | SetName (const QString &szName) |
| int | LoadPassword (const QString &szTitle, const QString &szKey, QString &password, QSettings &set) |
| int | SavePassword (const QString &szKey, const QString &password, QSettings &set, bool bSave=false) |
Public Member Functions inherited from CParameter | |
| CParameter (QObject *parent=nullptr, const QString &szPrefix=QString()) | |
| virtual int | Load (QString szFile=QString()) |
| Load from file. | |
| virtual int | Save (QString szFile=QString(), bool bForce=true) |
| Save to file. | |
| virtual int | Load (QSettings &set) |
| Load from QSettings. | |
| virtual int | Save (QSettings &set, bool bForce=true) |
| Save to QSettings. | |
| virtual bool | CheckValidity () |
| Check whether the parameter is valid to decide whether to use or save the parameter. | |
Protected Slots | |
| virtual void | slotSetGlobalParameters () |
| Call after set CParameterPlugin. | |
Protected Member Functions | |
| QByteArray | PasswordSum (const std::string &password, const std::string &key) |
| virtual int | OnLoad (QSettings &set) override |
| virtual int | OnSave (QSettings &set) override |
Protected Member Functions inherited from CParameter | |
| virtual bool | OnCheckValidity () |
| Check validity. | |
| int | SetModified (bool bModified=true) |
| When setting parameters, if there is a modification, it is called. | |
| bool | GetModified () |
| Whether the parameters have been modified. | |
Private Attributes | |
| CParameterOperate * | m_Parent |
| CParameterPlugin * | m_pParameterPlugin |
| QString | m_szName |
Additional Inherited Members | |
Properties inherited from CParameter | |
| bool | Modified |
Operational parameter interface.
Valid only within the plugin.
Set and get global parameters. Parameters that need to manipulate global parameters should be derived from this class.
Because there may be many parameters, it is necessary to classify them by parameter category. Each category can derive a separate class from this class. Each category is then used as a member variable in the derived classes of this class.
For example:
Operate parameters include the following categories:
CParameterBase, CParameterUser need global parameters, so that it must derived from CParameterOperate. other is derived from CParameter.
Then the operate parameters can be a combination of the above categories:
Definition at line 209 of file ParameterOperate.h.
| CParameterPlugin * CParameterOperate::GetGlobalParameters | ( | ) |
Get CParameterPlugin.
Definition at line 32 of file ParameterOperate.cpp.
| const QString CParameterOperate::GetName | ( | ) | const |
Definition at line 177 of file ParameterOperate.cpp.
| int CParameterOperate::LoadPassword | ( | const QString & | szTitle, |
| const QString & | szKey, | ||
| QString & | password, | ||
| QSettings & | set | ||
| ) |
Definition at line 81 of file ParameterOperate.cpp.
|
overrideprotectedvirtual |
Implements CParameter.
Reimplemented in CParameterWakeOnLan, and CParameterNet.
Definition at line 191 of file ParameterOperate.cpp.
|
overrideprotectedvirtual |
Implements CParameter.
Definition at line 197 of file ParameterOperate.cpp.
|
protected |
Definition at line 51 of file ParameterOperate.cpp.
| int CParameterOperate::SavePassword | ( | const QString & | szKey, |
| const QString & | password, | ||
| QSettings & | set, | ||
| bool | bSave = false |
||
| ) |
Definition at line 131 of file ParameterOperate.cpp.
| int CParameterOperate::SetGlobalParameters | ( | CParameterPlugin * | p | ) |
Definition at line 38 of file ParameterOperate.cpp.
| void CParameterOperate::SetName | ( | const QString & | szName | ) |
Definition at line 182 of file ParameterOperate.cpp.
|
signal |
Only used by this class.
|
protectedvirtualslot |
Call after set CParameterPlugin.
Used to initialize operations related to CParameterPlugin.
Use CParameterPlugin in CParameterOperate
Reimplemented in CParameterBase.
Definition at line 46 of file ParameterOperate.cpp.
|
private |
Definition at line 257 of file ParameterOperate.h.
|
private |
Definition at line 261 of file ParameterOperate.h.
|
private |
Definition at line 263 of file ParameterOperate.h.