Rabbit Remote Control 0.0.37
Loading...
Searching...
No Matches
Signals | Public Member Functions | Protected Slots | Protected Member Functions | Private Attributes | List of all members
CParameterOperate Class Reference

Operational parameter interface. More...

#include <ParameterOperate.h>

Inheritance diagram for CParameterOperate:
Inheritance graph
[legend]
Collaboration diagram for CParameterOperate:
Collaboration graph
[legend]

Signals

void sigSetGlobalParameters ()
 Only used by this class.
 
- 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())
 
CParameterPluginGetGlobalParameters ()
 Get CParameterPlugin.
 
int SetGlobalParameters (CParameterPlugin *p)
 
- 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)
 
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)
 
- Protected Member Functions inherited from CParameter
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

CParameterOperatem_Parent
 
CParameterPluginm_pParameterPlugin
 

Additional Inherited Members

- Properties inherited from CParameter
bool Modified
 

Detailed Description

Operational parameter interface.

Valid only within the plugin.

Note

Set and get global parameters. Parameters that need to manipulate global parameters should be derived from this class.

Use CParameterPlugin

Set CParameterPlugin for CParameterOperate

Use CParameterPlugin in CParameterOperate

CParameterOperate category

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:

{
public:
explicit CParameterBase(CParameterOperate *parent = nullptr);
CParameterVideo m_Video;
CParameterAudio m_Audio;
};
CParameterBase::CParameterBase(CParameterOperate *parent = nullptr)
: CParameterOperate(parent),
m_User(this, "Host"),
m_Video(this),
m_Audio(this)
{}
Note
See also
CParameterOperate CParameterPlugin CManager::CreateOperate CPlugin::CreateOperate COperate::SetGlobalParameters COperateDesktop::SetParameter CParameterOperate::GetGlobalParameters

Definition at line 209 of file ParameterOperate.h.

Member Function Documentation

◆ GetGlobalParameters()

CParameterPlugin * CParameterOperate::GetGlobalParameters ( )

Get CParameterPlugin.

Definition at line 32 of file ParameterOperate.cpp.

◆ LoadPassword()

int CParameterOperate::LoadPassword ( const QString &  szTitle,
const QString &  szKey,
QString &  password,
QSettings &  set 
)
protected

Definition at line 73 of file ParameterOperate.cpp.

◆ PasswordSum()

QByteArray CParameterOperate::PasswordSum ( const std::string &  password,
const std::string &  key 
)
protected

Definition at line 51 of file ParameterOperate.cpp.

◆ SavePassword()

int CParameterOperate::SavePassword ( const QString &  szKey,
const QString &  password,
QSettings &  set,
bool  bSave = false 
)
protected

Definition at line 110 of file ParameterOperate.cpp.

◆ SetGlobalParameters()

int CParameterOperate::SetGlobalParameters ( CParameterPlugin p)

Definition at line 38 of file ParameterOperate.cpp.

◆ sigSetGlobalParameters

void CParameterOperate::sigSetGlobalParameters ( )
signal

Only used by this class.

See also
slotSetGlobalParameters

◆ slotSetGlobalParameters

void CParameterOperate::slotSetGlobalParameters ( )
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.

Member Data Documentation

◆ m_Parent

CParameterOperate* CParameterOperate::m_Parent
private

Definition at line 252 of file ParameterOperate.h.

◆ m_pParameterPlugin

CParameterPlugin* CParameterOperate::m_pParameterPlugin
private
See also
CManager::CreateConnecter COperate::SetGlobalParameters

Definition at line 256 of file ParameterOperate.h.


The documentation for this class was generated from the following files: