2014-05-18 15:52:39 +00:00
|
|
|
#ifndef INCLUDE_PREFERENCES_H
|
|
|
|
#define INCLUDE_PREFERENCES_H
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
|
2018-03-20 12:49:21 +00:00
|
|
|
#include "export.h"
|
2018-03-03 19:23:38 +00:00
|
|
|
|
|
|
|
class SDRBASE_API Preferences {
|
2014-05-18 15:52:39 +00:00
|
|
|
public:
|
|
|
|
Preferences();
|
|
|
|
|
|
|
|
void resetToDefaults();
|
|
|
|
QByteArray serialize() const;
|
|
|
|
bool deserialize(const QByteArray& data);
|
|
|
|
|
2019-08-06 06:48:14 +00:00
|
|
|
void setSourceDevice(const QString& value) { m_sourceDevice = value; }
|
2014-05-18 15:52:39 +00:00
|
|
|
const QString& getSourceDevice() const { return m_sourceDevice; }
|
2015-10-02 00:22:56 +00:00
|
|
|
void setSourceIndex(const int value) { m_sourceIndex = value; }
|
|
|
|
int getSourceIndex() const { return m_sourceIndex; }
|
2014-05-18 15:52:39 +00:00
|
|
|
|
|
|
|
void setAudioType(const QString& value) { m_audioType = value; }
|
|
|
|
const QString& getAudioType() const { return m_audioType; }
|
2019-08-06 06:48:14 +00:00
|
|
|
void setAudioDevice(const QString& value) { m_audioDevice = value; }
|
2014-05-18 15:52:39 +00:00
|
|
|
const QString& getAudioDevice() const { return m_audioDevice; }
|
|
|
|
|
2020-10-27 16:22:10 +00:00
|
|
|
void setStationName(const QString& name) { m_stationName = name; }
|
|
|
|
void setLatitude(float latitude) { m_latitude = latitude; }
|
2016-09-28 11:38:38 +00:00
|
|
|
void setLongitude(float longitude) { m_longitude = longitude; }
|
2020-10-27 16:22:10 +00:00
|
|
|
void setAltitude(float altitude) { m_altitude = altitude; }
|
|
|
|
QString getStationName() const { return m_stationName; }
|
2016-09-28 11:38:38 +00:00
|
|
|
float getLatitude() const { return m_latitude; }
|
|
|
|
float getLongitude() const { return m_longitude; }
|
2020-10-27 16:22:10 +00:00
|
|
|
float getAltitude() const { return m_altitude; }
|
2016-09-28 11:38:38 +00:00
|
|
|
|
2017-11-12 01:23:55 +00:00
|
|
|
void setConsoleMinLogLevel(const QtMsgType& minLogLevel) { m_consoleMinLogLevel = minLogLevel; }
|
|
|
|
void setFileMinLogLevel(const QtMsgType& minLogLevel) { m_fileMinLogLevel = minLogLevel; }
|
2017-11-11 18:26:23 +00:00
|
|
|
void setUseLogFile(bool useLogFile) { m_useLogFile = useLogFile; }
|
|
|
|
void setLogFileName(const QString& value) { m_logFileName = value; }
|
2017-11-12 01:23:55 +00:00
|
|
|
QtMsgType getConsoleMinLogLevel() const { return m_consoleMinLogLevel; }
|
|
|
|
QtMsgType getFileMinLogLevel() const { return m_fileMinLogLevel; }
|
2017-11-11 18:26:23 +00:00
|
|
|
bool getUseLogFile() const { return m_useLogFile; }
|
|
|
|
const QString& getLogFileName() const { return m_logFileName; }
|
|
|
|
|
2014-05-18 15:52:39 +00:00
|
|
|
protected:
|
2019-07-31 21:56:23 +00:00
|
|
|
QString m_sourceDevice; //!< Identification of the source used in R0 tab (GUI flavor) at startup
|
|
|
|
int m_sourceIndex; //!< Index of the source used in R0 tab (GUI flavor) at startup
|
2014-05-18 15:52:39 +00:00
|
|
|
|
|
|
|
QString m_audioType;
|
|
|
|
QString m_audioDevice;
|
2016-09-28 11:38:38 +00:00
|
|
|
|
2020-10-27 16:22:10 +00:00
|
|
|
QString m_stationName; //!< Name of the station (for drawing on the map)
|
|
|
|
float m_latitude; //!< Position of the station
|
2016-09-28 11:38:38 +00:00
|
|
|
float m_longitude;
|
2020-10-27 16:22:10 +00:00
|
|
|
float m_altitude; //!< Altitude in metres
|
2017-11-11 18:26:23 +00:00
|
|
|
|
2017-11-12 01:23:55 +00:00
|
|
|
QtMsgType m_consoleMinLogLevel;
|
|
|
|
QtMsgType m_fileMinLogLevel;
|
2017-11-11 18:26:23 +00:00
|
|
|
bool m_useLogFile;
|
|
|
|
QString m_logFileName;
|
2014-05-18 15:52:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // INCLUDE_PREFERENCES_H
|