1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-20 16:41:01 -05:00
sdrangel/sdrbase/settings/mainsettings.h

41 lines
1.1 KiB
C
Raw Normal View History

#ifndef INCLUDE_SETTINGS_H
#define INCLUDE_SETTINGS_H
#include <QString>
#include "preferences.h"
#include "preset.h"
class MainSettings {
public:
MainSettings();
~MainSettings();
void load();
void save() const;
void resetToDefaults();
Preset* newPreset(const QString& group, const QString& description);
void deletePreset(const Preset* preset);
int getPresetCount() const { return m_presets.count(); }
const Preset* getPreset(int index) const { return m_presets[index]; }
void sortPresets();
Preset* getWorkingPreset() { return &m_workingPreset; }
int getSourceIndex() const { return m_preferences.getSourceIndex(); }
void setSourceIndex(int value) { m_preferences.setSourceIndex(value); }
2016-09-28 07:38:38 -04:00
void setLatitude(float latitude) { m_preferences.setLatitude(latitude); }
void setLongitude(float longitude) { m_preferences.setLongitude(longitude); }
float getLatitude() const { return m_preferences.getLatitude(); }
float getLongitude() const { return m_preferences.getLongitude(); }
protected:
Preferences m_preferences;
Preset m_workingPreset;
typedef QList<Preset*> Presets;
Presets m_presets;
};
#endif // INCLUDE_SETTINGS_H