3#include "ParameterFtpServer.h"
5CParameterFtpServer::CParameterFtpServer(QObject *parent,
const QString &szPrefix)
7 , m_bAnonymousLogin(false)
15 m_Net.SetEnablleUI(CParameterNet::SHOW_UI::Port | CParameterNet::SHOW_UI::User);
18int CParameterFtpServer::OnLoad(QSettings &set)
21 nRet = CParameterServer::OnLoad(set);
23 SetAnonymousLogin(set.value(
"AnonemousLogin", GetAnonymousLogin()).toBool());
24 SetReadOnly(set.value(
"ReadOnly", GetReadOnly()).toBool());
25 SetRoot(set.value(
"Root", GetRoot()).toString());
29int CParameterFtpServer::OnSave(QSettings &set)
32 nRet = CParameterServer::OnSave(set);
34 set.setValue(
"AnonemousLogin", GetAnonymousLogin());
35 set.setValue(
"ReadOnly", GetReadOnly());
36 set.setValue(
"Root", GetRoot());
40bool CParameterFtpServer::GetAnonymousLogin()
const
42 return m_bAnonymousLogin;
45void CParameterFtpServer::SetAnonymousLogin(
bool newAnonymousLogin)
47 if(m_bAnonymousLogin == newAnonymousLogin)
49 m_bAnonymousLogin = newAnonymousLogin;
53bool CParameterFtpServer::GetReadOnly()
const
58void CParameterFtpServer::SetReadOnly(
bool newReadOnly)
60 if(m_bReadOnly == newReadOnly)
62 m_bReadOnly = newReadOnly;
66QString CParameterFtpServer::GetRoot()
const
71void CParameterFtpServer::SetRoot(
const QString &newRoot)
73 if(m_szRoot == newRoot)
The server base parameters.
int SetModified(bool bModified=true)
When setting parameters, if there is a modification, it is called.