Refactoring
This commit is contained in:
parent
13f9764853
commit
5eede71667
21 changed files with 566 additions and 220 deletions
|
|
@ -4,6 +4,10 @@
|
|||
#include <QObject>
|
||||
#include <QString>
|
||||
|
||||
#include "core/defs.h"
|
||||
|
||||
using namespace amnezia;
|
||||
|
||||
class QSettings;
|
||||
|
||||
class Settings : public QObject
|
||||
|
|
@ -16,21 +20,27 @@ public:
|
|||
void read();
|
||||
void save();
|
||||
|
||||
void setLogin(const QString& login);
|
||||
void setUserName(const QString& login);
|
||||
void setPassword(const QString& password);
|
||||
void setServerName(const QString& serverName);
|
||||
void setServerPort(int serverPort);
|
||||
void setServerCredentials(const ServerCredentials &credentials);
|
||||
|
||||
QString userName() const { return m_userName; }
|
||||
QString password() const { return m_password; }
|
||||
QString serverName() const { return m_serverName; }
|
||||
int serverPort() const { return m_serverPort; }
|
||||
ServerCredentials serverCredentials();
|
||||
|
||||
QString login() const;
|
||||
QString password() const;
|
||||
QString serverName() const;
|
||||
|
||||
bool haveAuthData() const;
|
||||
|
||||
protected:
|
||||
QSettings* m_settings;
|
||||
QString m_login;
|
||||
QString m_userName;
|
||||
QString m_password;
|
||||
QString m_serverName;
|
||||
int m_serverPort;
|
||||
};
|
||||
|
||||
#endif // SETTINGS_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue