60 lines
1.1 KiB
C++
60 lines
1.1 KiB
C++
#ifndef CPROGRAMSETTINGS_H
|
|
#define CPROGRAMSETTINGS_H
|
|
|
|
#include "GlobalDefine.h"
|
|
#include <QFile>
|
|
#include <QDate>
|
|
#include <QDataStream>
|
|
#include <QString>
|
|
|
|
|
|
class CVoipMSSMSSettings
|
|
{
|
|
public:
|
|
QString mUsername;
|
|
QString mPassword;
|
|
QDate mStartDate;
|
|
QString mDefaultDID;
|
|
|
|
CVoipMSSMSSettings &operator=(const CVoipMSSMSSettings *source);
|
|
|
|
};
|
|
QDataStream &operator<<(QDataStream &out, const CVoipMSSMSSettings &source);
|
|
QDataStream &operator>>(QDataStream &in, CVoipMSSMSSettings &dest);
|
|
|
|
|
|
class CSettings
|
|
{
|
|
public:
|
|
CVoipMSSMSSettings mVoipMSSettings;
|
|
QString mChaletComPort;
|
|
quint16 mChaletLoraAddress;
|
|
quint8 mChaletLoraChannel;
|
|
bool mChaletUseLoraIF;
|
|
|
|
|
|
CSettings &operator=(const CSettings &source);
|
|
};
|
|
|
|
QDataStream &operator<<(QDataStream &out, const CSettings &source);
|
|
QDataStream &operator>>(QDataStream &in, CSettings &dest);
|
|
|
|
class CProgramSettings
|
|
{
|
|
public:
|
|
CProgramSettings();
|
|
unsigned int LoadSettings(CSettings*);
|
|
unsigned int SaveSettings(CSettings *SettingsData);
|
|
|
|
private:
|
|
|
|
void LoadDefaultSettings(CSettings* Settings);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CPROGRAMSETTINGS_H
|