2015-10-02 04:04:38 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#ifndef INCLUDE_SETTINGS_H
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#define INCLUDE_SETTINGS_H
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#include <QString>
							 | 
						
					
						
							
								
									
										
										
										
											2019-06-12 18:50:53 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include "device/deviceuserargs.h"
							 | 
						
					
						
							
								
									
										
										
										
											2020-01-16 18:23:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include "limerfe/limerfeusbcalib.h"
							 | 
						
					
						
							
								
									
										
										
										
											2015-10-02 04:04:38 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#include "preferences.h"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#include "preset.h"
							 | 
						
					
						
							
								
									
										
										
										
											2020-09-24 05:38:05 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include "featuresetpreset.h"
							 | 
						
					
						
							
								
									
										
										
										
											2018-03-20 13:49:21 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include "export.h"
							 | 
						
					
						
							
								
									
										
										
										
											2020-09-08 15:47:20 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include "plugin/pluginmanager.h"
							 | 
						
					
						
							
								
									
										
										
										
											2015-10-02 04:04:38 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2018-01-04 11:11:53 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								class Command;
							 | 
						
					
						
							
								
									
										
										
										
											2019-07-20 23:25:00 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								class AudioDeviceManager;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								class AMBEEngine;
							 | 
						
					
						
							
								
									
										
										
										
											2018-01-04 11:11:53 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2020-09-08 15:47:20 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2018-03-03 20:23:38 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								class SDRBASE_API MainSettings {
							 | 
						
					
						
							
								
									
										
										
										
											2015-10-02 04:04:38 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								public:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									MainSettings();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									~MainSettings();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2020-09-24 05:38:05 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									void load();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									void save() const;
							 | 
						
					
						
							
								
									
										
										
										
											2015-10-02 04:04:38 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									void resetToDefaults();
							 | 
						
					
						
							
								
									
										
										
										
											2019-08-06 08:48:14 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    void initialize();
							 | 
						
					
						
							
								
									
										
										
										
											2019-01-17 11:22:38 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									QString getFileLocation() const;
							 | 
						
					
						
							
								
									
										
										
										
											2019-01-17 11:17:28 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									int getFileFormat() const; //!< see QSettings::Format for the values
							 | 
						
					
						
							
								
									
										
										
										
											2015-10-02 04:04:38 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2019-08-01 02:16:56 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    const Preferences& getPreferences() const { return m_preferences; }
							 | 
						
					
						
							
								
									
										
										
										
											2019-08-06 08:48:14 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    void setPreferences(const Preferences& preferences) { m_preferences = preferences; }
							 | 
						
					
						
							
								
									
										
										
										
											2019-08-01 02:16:56 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-10-02 04:04:38 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Preset* newPreset(const QString& group, const QString& description);
							 | 
						
					
						
							
								
									
										
										
										
											2019-08-06 08:48:14 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    void addPreset(Preset *preset);
							 | 
						
					
						
							
								
									
										
										
										
											2015-10-02 04:04:38 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									void deletePreset(const Preset* preset);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									int getPresetCount() const { return m_presets.count(); }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									const Preset* getPreset(int index) const { return m_presets[index]; }
							 | 
						
					
						
							
								
									
										
										
										
											2019-05-09 01:12:40 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									const Preset* getPreset(const QString& groupName, quint64 centerFrequency, const QString& description, const QString& type) const;
							 | 
						
					
						
							
								
									
										
										
										
											2016-09-11 18:58:40 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									void sortPresets();
							 | 
						
					
						
							
								
									
										
										
										
											2018-01-05 11:45:20 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									void renamePresetGroup(const QString& oldGroupName, const QString& newGroupName);
							 | 
						
					
						
							
								
									
										
										
										
											2018-01-06 20:02:08 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									void deletePresetGroup(const QString& groupName);
							 | 
						
					
						
							
								
									
										
										
										
											2019-08-06 08:48:14 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    void clearPresets();
							 | 
						
					
						
							
								
									
										
										
										
											2020-09-24 05:38:05 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    const Preset& getWorkingPresetConst() const { return m_workingPreset; }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Preset* getWorkingPreset() { return &m_workingPreset; }
							 | 
						
					
						
							
								
									
										
										
										
											2015-10-02 04:04:38 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2018-01-04 11:11:53 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    void addCommand(Command *command);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    void deleteCommand(const Command* command);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int getCommandCount() const { return m_commands.count(); }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    const Command* getCommand(int index) const { return m_commands[index]; }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    const Command* getCommand(const QString& groupName, const QString& description) const;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    void sortCommands();
							 | 
						
					
						
							
								
									
										
										
										
											2018-01-05 11:45:20 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    void renameCommandGroup(const QString& oldGroupName, const QString& newGroupName);
							 | 
						
					
						
							
								
									
										
										
										
											2018-01-06 20:02:08 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    void deleteCommandGroup(const QString& groupName);
							 | 
						
					
						
							
								
									
										
										
										
											2019-08-06 08:48:14 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    void clearCommands();
							 | 
						
					
						
							
								
									
										
										
										
											2018-01-04 11:11:53 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2020-09-24 05:38:05 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									FeatureSetPreset* newFeatureSetPreset(const QString& group, const QString& description);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    void addFeatureSetPreset(FeatureSetPreset *preset);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									void deleteFeatureSetPreset(const FeatureSetPreset* preset);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									int getFeatureSetPresetCount() const { return m_featureSetPresets.count(); }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									const FeatureSetPreset* getFeatureSetPreset(int index) const { return m_featureSetPresets[index]; }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									const FeatureSetPreset* getFeatureSetPreset(const QString& groupName, const QString& description) const;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									void sortFeatureSetPresets();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									void renameFeatureSetPresetGroup(const QString& oldGroupName, const QString& newGroupName);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									void deleteFeatureSetPresetGroup(const QString& groupName);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    void clearFeatureSetPresets();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    const FeatureSetPreset& getWorkingFeatureSetPresetConst() const { return m_workingFeatureSetPreset; }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									FeatureSetPreset* getWorkingFeatureSetPreset() { return &m_workingFeatureSetPreset; }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									QList<FeatureSetPreset*> *getFeatureSetPresets() { return &m_featureSetPresets; }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-10-02 04:04:38 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									int getSourceIndex() const { return m_preferences.getSourceIndex(); }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									void setSourceIndex(int value) { m_preferences.setSourceIndex(value); }
							 | 
						
					
						
							
								
									
										
										
										
											2017-11-02 03:30:54 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									const QString& getSourceDeviceId() const { return m_preferences.getSourceDevice(); }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									void setSourceDeviceId(const QString& deviceId) { m_preferences.setSourceDevice(deviceId); }
							 | 
						
					
						
							
								
									
										
										
										
											2015-10-02 04:04:38 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2016-09-28 13:38:38 +02: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(); }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2017-11-12 02:23:55 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    void setConsoleMinLogLevel(const QtMsgType& minLogLevel) { m_preferences.setConsoleMinLogLevel(minLogLevel); }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    void setFileMinLogLevel(const QtMsgType& minLogLevel) { m_preferences.setFileMinLogLevel(minLogLevel); }
							 | 
						
					
						
							
								
									
										
										
										
											2017-11-11 19:26:23 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    void setUseLogFile(bool useLogFile) { m_preferences.setUseLogFile(useLogFile); }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    void setLogFileName(const QString& value) { m_preferences.setLogFileName(value); }
							 | 
						
					
						
							
								
									
										
										
										
											2017-11-12 02:23:55 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    QtMsgType getConsoleMinLogLevel() const { return m_preferences.getConsoleMinLogLevel(); }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    QtMsgType getFileMinLogLevel() const { return m_preferences.getFileMinLogLevel(); }
							 | 
						
					
						
							
								
									
										
										
										
											2017-11-11 19:26:23 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    bool getUseLogFile() const { return m_preferences.getUseLogFile(); }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    const QString& getLogFileName() const { return m_preferences.getLogFileName(); }
							 | 
						
					
						
							
								
									
										
										
										
											2019-06-12 18:50:53 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									DeviceUserArgs& getDeviceUserArgs() { return m_hardwareDeviceUserArgs; }
							 | 
						
					
						
							
								
									
										
										
										
											2020-01-16 18:23:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									LimeRFEUSBCalib& getLimeRFEUSBCalib() { return m_limeRFEUSBCalib; }
							 | 
						
					
						
							
								
									
										
										
										
											2017-11-11 19:26:23 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2018-03-23 18:08:38 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									const AudioDeviceManager *getAudioDeviceManager() const { return m_audioDeviceManager; }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									void setAudioDeviceManager(AudioDeviceManager *audioDeviceManager) { m_audioDeviceManager = audioDeviceManager; }
							 | 
						
					
						
							
								
									
										
										
										
											2019-07-20 23:25:00 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    void setAMBEEngine(AMBEEngine *ambeEngine) { m_ambeEngine = ambeEngine; }
							 | 
						
					
						
							
								
									
										
										
										
											2017-01-06 18:56:46 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-10-02 04:04:38 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								protected:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Preferences m_preferences;
							 | 
						
					
						
							
								
									
										
										
										
											2018-03-23 18:08:38 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									AudioDeviceManager *m_audioDeviceManager;
							 | 
						
					
						
							
								
									
										
										
										
											2015-10-02 04:04:38 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Preset m_workingPreset;
							 | 
						
					
						
							
								
									
										
										
										
											2020-09-24 05:38:05 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									FeatureSetPreset m_workingFeatureSetPreset;
							 | 
						
					
						
							
								
									
										
										
										
											2015-10-02 04:04:38 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									typedef QList<Preset*> Presets;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Presets m_presets;
							 | 
						
					
						
							
								
									
										
										
										
											2018-01-04 11:11:53 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    typedef QList<Command*> Commands;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    Commands m_commands;
							 | 
						
					
						
							
								
									
										
										
										
											2020-09-24 05:38:05 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    typedef QList<FeatureSetPreset*> FeatureSetPresets;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    FeatureSetPresets m_featureSetPresets;
							 | 
						
					
						
							
								
									
										
										
										
											2019-06-12 18:50:53 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									DeviceUserArgs m_hardwareDeviceUserArgs;
							 | 
						
					
						
							
								
									
										
										
										
											2020-01-16 18:23:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									LimeRFEUSBCalib m_limeRFEUSBCalib;
							 | 
						
					
						
							
								
									
										
										
										
											2019-07-20 23:25:00 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    AMBEEngine *m_ambeEngine;
							 | 
						
					
						
							
								
									
										
										
										
											2015-10-02 04:04:38 +02:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								};
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#endif // INCLUDE_SETTINGS_H
							 |