1#include "ParameterNet.h"
2#include "RabbitCommonTools.h"
9 , m_szPrompt(tr(
"The host is empty. please set it"))
15 set.beginGroup(
"Net");
16 SetHost(set.value(
"Host", GetHost()).toString());
17 SetPort(set.value(
"Port", GetPort()).toUInt());
22int CParameterNet::OnSave(QSettings &set)
24 set.beginGroup(
"Net");
25 set.setValue(
"Host", GetHost());
26 set.setValue(
"Port", GetPort());
31const QString CParameterNet::GetHost()
const
36void CParameterNet::SetHost(
const QString& host)
42 emit sigHostChanged(m_szHost);
45const quint16 CParameterNet::GetPort()
const
50void CParameterNet::SetPort(quint16 port)
58int CParameterNet::SetPrompt(
const QString szPrompt)
60 m_szPrompt = szPrompt;
64QString CParameterNet::GetPrompt()
the parameters of connecter interface.
virtual int OnLoad(QSettings &set) override
[Instance user]
CParameterNet(CParameterConnecter *parent, const QString &szPrefix=QString())
[Constructor]
int SetModified(bool bModified=true)
When setting parameters, if there is a modification, it is called.