Rabbit Remote Control 0.0.37
|
Operational parameter interface. More...
#include <ParameterOperate.h>
Signals | |
void | sigSetGlobalParameters () |
Only used by this class. | |
![]() | |
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) |
![]() | |
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) |
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) |
![]() | |
virtual int | OnLoad (QSettings &set)=0 |
virtual int | OnSave (QSettings &set)=0 |
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 |
Additional Inherited Members | |
![]() | |
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.
|
protected |
Definition at line 73 of file ParameterOperate.cpp.
|
protected |
Definition at line 51 of file ParameterOperate.cpp.
|
protected |
Definition at line 110 of file ParameterOperate.cpp.
int CParameterOperate::SetGlobalParameters | ( | CParameterPlugin * | p | ) |
Definition at line 38 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 252 of file ParameterOperate.h.
|
private |
Definition at line 256 of file ParameterOperate.h.