General improvements and bug fixes
This commit is contained in:
parent
07974a7e34
commit
187fa0080a
10 changed files with 762 additions and 144 deletions
36
client/settings.h
Normal file
36
client/settings.h
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
#ifndef SETTINGS_H
|
||||
#define SETTINGS_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
|
||||
class QSettings;
|
||||
|
||||
class Settings : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit Settings(QObject* parent = nullptr);
|
||||
|
||||
void read();
|
||||
void save();
|
||||
|
||||
void setLogin(const QString& login);
|
||||
void setPassword(const QString& password);
|
||||
void setServerName(const QString& serverName);
|
||||
|
||||
QString login() const;
|
||||
QString password() const;
|
||||
QString serverName() const;
|
||||
|
||||
bool haveAuthData() const;
|
||||
|
||||
protected:
|
||||
QSettings* m_settings;
|
||||
QString m_login;
|
||||
QString m_password;
|
||||
QString m_serverName;
|
||||
};
|
||||
|
||||
#endif // SETTINGS_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue