SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
Public Member Functions | Protected Types | Protected Attributes | List of all members
MainSettings Class Reference

#include <mainsettings.h>

+ Collaboration diagram for MainSettings:

Public Member Functions

 MainSettings ()
 
 ~MainSettings ()
 
void load ()
 
void save () const
 
void resetToDefaults ()
 
QString getFileLocation () const
 
int getFileFormat () const
 see QSettings::Format for the values More...
 
const PreferencesgetPreferences () const
 
PresetnewPreset (const QString &group, const QString &description)
 
void deletePreset (const Preset *preset)
 
int getPresetCount () const
 
const PresetgetPreset (int index) const
 
const PresetgetPreset (const QString &groupName, quint64 centerFrequency, const QString &description, const QString &type) const
 
void sortPresets ()
 
void renamePresetGroup (const QString &oldGroupName, const QString &newGroupName)
 
void deletePresetGroup (const QString &groupName)
 
void addCommand (Command *command)
 
void deleteCommand (const Command *command)
 
int getCommandCount () const
 
const CommandgetCommand (int index) const
 
const CommandgetCommand (const QString &groupName, const QString &description) const
 
void sortCommands ()
 
void renameCommandGroup (const QString &oldGroupName, const QString &newGroupName)
 
void deleteCommandGroup (const QString &groupName)
 
const PresetgetWorkingPresetConst () const
 
PresetgetWorkingPreset ()
 
int getSourceIndex () const
 
void setSourceIndex (int value)
 
const QString & getSourceDeviceId () const
 
void setSourceDeviceId (const QString &deviceId)
 
void setLatitude (float latitude)
 
void setLongitude (float longitude)
 
float getLatitude () const
 
float getLongitude () const
 
void setConsoleMinLogLevel (const QtMsgType &minLogLevel)
 
void setFileMinLogLevel (const QtMsgType &minLogLevel)
 
void setUseLogFile (bool useLogFile)
 
void setLogFileName (const QString &value)
 
QtMsgType getConsoleMinLogLevel () const
 
QtMsgType getFileMinLogLevel () const
 
bool getUseLogFile () const
 
const QString & getLogFileName () const
 
DeviceUserArgsgetDeviceUserArgs ()
 
const AudioDeviceManagergetAudioDeviceManager () const
 
void setAudioDeviceManager (AudioDeviceManager *audioDeviceManager)
 
void setAMBEEngine (AMBEEngine *ambeEngine)
 

Protected Types

typedef QList< Preset * > Presets
 
typedef QList< Command * > Commands
 

Protected Attributes

Preferences m_preferences
 
AudioDeviceManagerm_audioDeviceManager
 
Preset m_workingPreset
 
Presets m_presets
 
Commands m_commands
 
DeviceUserArgs m_hardwareDeviceUserArgs
 
AMBEEnginem_ambeEngine
 

Detailed Description

Definition at line 14 of file mainsettings.h.

Member Typedef Documentation

◆ Commands

typedef QList<Command*> MainSettings::Commands
protected

Definition at line 78 of file mainsettings.h.

◆ Presets

typedef QList<Preset*> MainSettings::Presets
protected

Definition at line 76 of file mainsettings.h.

Constructor & Destructor Documentation

◆ MainSettings()

MainSettings::MainSettings ( )

Definition at line 9 of file mainsettings.cpp.

References getFileFormat(), getFileLocation(), and resetToDefaults().

9  :
10  m_audioDeviceManager(nullptr),
11  m_ambeEngine(nullptr)
12 {
14  qInfo("MainSettings::MainSettings: settings file: format: %d location: %s", getFileFormat(), qPrintable(getFileLocation()));
15 }
QString getFileLocation() const
int getFileFormat() const
see QSettings::Format for the values
AMBEEngine * m_ambeEngine
Definition: mainsettings.h:81
AudioDeviceManager * m_audioDeviceManager
Definition: mainsettings.h:74
void resetToDefaults()
+ Here is the call graph for this function:

◆ ~MainSettings()

MainSettings::~MainSettings ( )

Definition at line 17 of file mainsettings.cpp.

References i, m_commands, and m_presets.

18 {
19  for(int i = 0; i < m_presets.count(); ++i)
20  {
21  delete m_presets[i];
22  }
23 
24  for(int i = 0; i < m_commands.count(); ++i)
25  {
26  delete m_commands[i];
27  }
28 }
Presets m_presets
Definition: mainsettings.h:77
Commands m_commands
Definition: mainsettings.h:79
int32_t i
Definition: decimators.h:244

Member Function Documentation

◆ addCommand()

void MainSettings::addCommand ( Command command)

Definition at line 217 of file mainsettings.cpp.

References m_commands.

Referenced by MainWindow::on_commandDuplicate_clicked(), and MainWindow::on_commandNew_clicked().

218 {
219  m_commands.append(command);
220 }
Commands m_commands
Definition: mainsettings.h:79
+ Here is the caller graph for this function:

◆ deleteCommand()

void MainSettings::deleteCommand ( const Command command)

Definition at line 222 of file mainsettings.cpp.

References m_commands.

Referenced by MainWindow::on_commandDelete_clicked().

223 {
224  m_commands.removeAll((Command*)command);
225  delete (Command*)command;
226 }
Commands m_commands
Definition: mainsettings.h:79
+ Here is the caller graph for this function:

◆ deleteCommandGroup()

void MainSettings::deleteCommandGroup ( const QString &  groupName)

Definition at line 228 of file mainsettings.cpp.

References m_commands.

Referenced by MainWindow::on_commandDelete_clicked().

229 {
230  Commands::iterator it = m_commands.begin();
231 
232  while (it != m_commands.end())
233  {
234  if ((*it)->getGroup() == groupName) {
235  it = m_commands.erase(it);
236  } else {
237  ++it;
238  }
239  }
240 }
Commands m_commands
Definition: mainsettings.h:79
+ Here is the caller graph for this function:

◆ deletePreset()

void MainSettings::deletePreset ( const Preset preset)

Definition at line 157 of file mainsettings.cpp.

References m_presets.

Referenced by MainCore::handleMessage(), MainWindow::handleMessage(), and MainWindow::on_presetDelete_clicked().

158 {
159  m_presets.removeAll((Preset*)preset);
160  delete (Preset*)preset;
161 }
Presets m_presets
Definition: mainsettings.h:77
Definition: preset.h:28
+ Here is the caller graph for this function:

◆ deletePresetGroup()

void MainSettings::deletePresetGroup ( const QString &  groupName)

Definition at line 163 of file mainsettings.cpp.

References m_presets.

Referenced by MainWindow::on_presetDelete_clicked().

164 {
165  Presets::iterator it = m_presets.begin();
166 
167  while (it != m_presets.end())
168  {
169  if ((*it)->getGroup() == groupName) {
170  it = m_presets.erase(it);
171  } else {
172  ++it;
173  }
174  }
175 }
Presets m_presets
Definition: mainsettings.h:77
+ Here is the caller graph for this function:

◆ getAudioDeviceManager()

const AudioDeviceManager* MainSettings::getAudioDeviceManager ( ) const
inline

Definition at line 68 of file mainsettings.h.

68 { return m_audioDeviceManager; }
AudioDeviceManager * m_audioDeviceManager
Definition: mainsettings.h:74

◆ getCommand() [1/2]

const Command* MainSettings::getCommand ( int  index) const
inline

◆ getCommand() [2/2]

const Command * MainSettings::getCommand ( const QString &  groupName,
const QString &  description 
) const

Definition at line 261 of file mainsettings.cpp.

References getCommand(), getCommandCount(), and i.

262 {
263  int nbCommands = getCommandCount();
264 
265  for (int i = 0; i < nbCommands; i++)
266  {
267  if ((getCommand(i)->getGroup() == groupName) &&
268  (getCommand(i)->getDescription() == description))
269  {
270  return getCommand(i);
271  }
272  }
273 
274  return 0;
275 }
const Command * getCommand(int index) const
Definition: mainsettings.h:40
int32_t i
Definition: decimators.h:244
int getCommandCount() const
Definition: mainsettings.h:39
+ Here is the call graph for this function:

◆ getCommandCount()

int MainSettings::getCommandCount ( ) const
inline

◆ getConsoleMinLogLevel()

QtMsgType MainSettings::getConsoleMinLogLevel ( ) const
inline

Definition at line 62 of file mainsettings.h.

Referenced by WebAPIAdapterGUI::instanceLoggingPut(), WebAPIAdapterSrv::instanceLoggingPut(), LoggingDialog::LoggingDialog(), MainCore::setLoggingOptions(), and MainWindow::setLoggingOptions().

Preferences m_preferences
Definition: mainsettings.h:73
QtMsgType getConsoleMinLogLevel() const
Definition: preferences.h:35
+ Here is the caller graph for this function:

◆ getDeviceUserArgs()

DeviceUserArgs& MainSettings::getDeviceUserArgs ( )
inline

◆ getFileFormat()

int MainSettings::getFileFormat ( ) const

see QSettings::Format for the values

Definition at line 36 of file mainsettings.cpp.

Referenced by MainSettings().

37 {
38  QSettings s;
39  return (int) s.format();
40 }
+ Here is the caller graph for this function:

◆ getFileLocation()

QString MainSettings::getFileLocation ( ) const

Definition at line 30 of file mainsettings.cpp.

Referenced by AboutDialog::AboutDialog(), and MainSettings().

31 {
32  QSettings s;
33  return s.fileName();
34 }
+ Here is the caller graph for this function:

◆ getFileMinLogLevel()

QtMsgType MainSettings::getFileMinLogLevel ( ) const
inline

Definition at line 63 of file mainsettings.h.

Referenced by WebAPIAdapterGUI::instanceLoggingPut(), WebAPIAdapterSrv::instanceLoggingPut(), LoggingDialog::LoggingDialog(), MainCore::setLoggingOptions(), and MainWindow::setLoggingOptions().

Preferences m_preferences
Definition: mainsettings.h:73
QtMsgType getFileMinLogLevel() const
Definition: preferences.h:36
+ Here is the caller graph for this function:

◆ getLatitude()

float MainSettings::getLatitude ( ) const
inline

◆ getLogFileName()

const QString& MainSettings::getLogFileName ( ) const
inline

Definition at line 65 of file mainsettings.h.

Referenced by WebAPIAdapterGUI::instanceLoggingPut(), WebAPIAdapterSrv::instanceLoggingPut(), LoggingDialog::LoggingDialog(), MainCore::setLoggingOptions(), and MainWindow::setLoggingOptions().

65 { return m_preferences.getLogFileName(); }
Preferences m_preferences
Definition: mainsettings.h:73
const QString & getLogFileName() const
Definition: preferences.h:38
+ Here is the caller graph for this function:

◆ getLongitude()

float MainSettings::getLongitude ( ) const
inline

◆ getPreferences()

const Preferences& MainSettings::getPreferences ( ) const
inline

Definition at line 26 of file mainsettings.h.

Referenced by WebAPIAdapterGUI::instanceConfigGet(), and WebAPIAdapterSrv::instanceConfigGet().

26 { return m_preferences; }
Preferences m_preferences
Definition: mainsettings.h:73
+ Here is the caller graph for this function:

◆ getPreset() [1/2]

const Preset* MainSettings::getPreset ( int  index) const
inline

◆ getPreset() [2/2]

const Preset * MainSettings::getPreset ( const QString &  groupName,
quint64  centerFrequency,
const QString &  description,
const QString &  type 
) const

Definition at line 196 of file mainsettings.cpp.

References getPreset(), getPresetCount(), and i.

197 {
198  int nbPresets = getPresetCount();
199 
200  for (int i = 0; i < nbPresets; i++)
201  {
202  if ((getPreset(i)->getGroup() == groupName) &&
203  (getPreset(i)->getCenterFrequency() == centerFrequency) &&
204  (getPreset(i)->getDescription() == description))
205  {
206  if (type == "R" && getPreset(i)->isSourcePreset()) {
207  return getPreset(i);
208  } else if (type == "T" && !getPreset(i)->isSourcePreset()) {
209  return getPreset(i);
210  }
211  }
212  }
213 
214  return 0;
215 }
int getPresetCount() const
Definition: mainsettings.h:30
int32_t i
Definition: decimators.h:244
const Preset * getPreset(int index) const
Definition: mainsettings.h:31
+ Here is the call graph for this function:

◆ getPresetCount()

int MainSettings::getPresetCount ( ) const
inline

◆ getSourceDeviceId()

const QString& MainSettings::getSourceDeviceId ( ) const
inline

Definition at line 50 of file mainsettings.h.

Referenced by MainWindow::MainWindow().

50 { return m_preferences.getSourceDevice(); }
Preferences m_preferences
Definition: mainsettings.h:73
const QString & getSourceDevice() const
Definition: preferences.h:17
+ Here is the caller graph for this function:

◆ getSourceIndex()

int MainSettings::getSourceIndex ( ) const
inline

Definition at line 48 of file mainsettings.h.

Referenced by MainWindow::MainWindow().

48 { return m_preferences.getSourceIndex(); }
Preferences m_preferences
Definition: mainsettings.h:73
int getSourceIndex() const
Definition: preferences.h:19
+ Here is the caller graph for this function:

◆ getUseLogFile()

bool MainSettings::getUseLogFile ( ) const
inline

Definition at line 64 of file mainsettings.h.

Referenced by WebAPIAdapterGUI::instanceLoggingPut(), WebAPIAdapterSrv::instanceLoggingPut(), LoggingDialog::LoggingDialog(), MainCore::setLoggingOptions(), and MainWindow::setLoggingOptions().

64 { return m_preferences.getUseLogFile(); }
Preferences m_preferences
Definition: mainsettings.h:73
bool getUseLogFile() const
Definition: preferences.h:37
+ Here is the caller graph for this function:

◆ getWorkingPreset()

Preset* MainSettings::getWorkingPreset ( )
inline

◆ getWorkingPresetConst()

const Preset& MainSettings::getWorkingPresetConst ( ) const
inline

Definition at line 46 of file mainsettings.h.

Referenced by WebAPIAdapterGUI::instanceConfigGet(), and WebAPIAdapterSrv::instanceConfigGet().

46 { return m_workingPreset; }
Preset m_workingPreset
Definition: mainsettings.h:75
+ Here is the caller graph for this function:

◆ load()

void MainSettings::load ( )

Definition at line 42 of file mainsettings.cpp.

References Preferences::deserialize(), Command::deserialize(), DeviceUserArgs::deserialize(), AMBEEngine::deserialize(), Preset::deserialize(), AudioDeviceManager::deserialize(), i, m_ambeEngine, m_audioDeviceManager, m_commands, m_hardwareDeviceUserArgs, m_preferences, m_presets, and m_workingPreset.

Referenced by MainCore::loadSettings(), and MainWindow::loadSettings().

43 {
44  QSettings s;
45 
46  m_preferences.deserialize(qUncompress(QByteArray::fromBase64(s.value("preferences").toByteArray())));
47  m_workingPreset.deserialize(qUncompress(QByteArray::fromBase64(s.value("current").toByteArray())));
48 
50  m_audioDeviceManager->deserialize(qUncompress(QByteArray::fromBase64(s.value("audio").toByteArray())));
51  }
52 
53  if (m_ambeEngine) {
54  m_ambeEngine->deserialize(qUncompress(QByteArray::fromBase64(s.value("ambe").toByteArray())));
55  }
56 
57  QStringList groups = s.childGroups();
58 
59  for(int i = 0; i < groups.size(); ++i)
60  {
61  if (groups[i].startsWith("preset"))
62  {
63  s.beginGroup(groups[i]);
64  Preset* preset = new Preset;
65 
66  if(preset->deserialize(qUncompress(QByteArray::fromBase64(s.value("data").toByteArray()))))
67  {
68  m_presets.append(preset);
69  }
70  else
71  {
72  delete preset;
73  }
74 
75  s.endGroup();
76  }
77  else if (groups[i].startsWith("command"))
78  {
79  s.beginGroup(groups[i]);
80  Command* command = new Command;
81 
82  if(command->deserialize(qUncompress(QByteArray::fromBase64(s.value("data").toByteArray()))))
83  {
84  m_commands.append(command);
85  }
86  else
87  {
88  delete command;
89  }
90 
91  s.endGroup();
92  }
93  }
94 
95  m_hardwareDeviceUserArgs.deserialize(qUncompress(QByteArray::fromBase64(s.value("hwDeviceUserArgs").toByteArray())));
96 }
Preferences m_preferences
Definition: mainsettings.h:73
bool deserialize(const QByteArray &data)
Presets m_presets
Definition: mainsettings.h:77
Commands m_commands
Definition: mainsettings.h:79
AMBEEngine * m_ambeEngine
Definition: mainsettings.h:81
Preset m_workingPreset
Definition: mainsettings.h:75
Definition: preset.h:28
int32_t i
Definition: decimators.h:244
bool deserialize(const QByteArray &data)
Definition: preferences.cpp:39
bool deserialize(const QByteArray &data)
AudioDeviceManager * m_audioDeviceManager
Definition: mainsettings.h:74
bool deserialize(const QByteArray &data)
Definition: ambeengine.cpp:355
bool deserialize(const QByteArray &data)
Definition: preset.cpp:94
DeviceUserArgs m_hardwareDeviceUserArgs
Definition: mainsettings.h:80
bool deserialize(const QByteArray &data)
Definition: command.cpp:110
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ newPreset()

Preset * MainSettings::newPreset ( const QString &  group,
const QString &  description 
)

Definition at line 148 of file mainsettings.cpp.

References m_presets, Preset::setDescription(), and Preset::setGroup().

Referenced by WebAPIAdapterSrv::instancePresetFilePut(), WebAPIAdapterGUI::instancePresetPost(), WebAPIAdapterSrv::instancePresetPost(), MainWindow::on_presetImport_clicked(), and MainWindow::on_presetSave_clicked().

149 {
150  Preset* preset = new Preset();
151  preset->setGroup(group);
152  preset->setDescription(description);
153  m_presets.append(preset);
154  return preset;
155 }
Presets m_presets
Definition: mainsettings.h:77
Definition: preset.h:28
void setDescription(const QString &description)
Definition: preset.h:73
void setGroup(const QString &group)
Definition: preset.h:71
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renameCommandGroup()

void MainSettings::renameCommandGroup ( const QString &  oldGroupName,
const QString &  newGroupName 
)

Definition at line 247 of file mainsettings.cpp.

References getCommand(), getCommandCount(), i, and Command::setGroup().

Referenced by MainWindow::on_commandEdit_clicked().

248 {
249  int nbCommands = getCommandCount();
250 
251  for (int i = 0; i < nbCommands; i++)
252  {
253  if (getCommand(i)->getGroup() == oldGroupName)
254  {
255  Command *command_mod = const_cast<Command*>(getCommand(i));
256  command_mod->setGroup(newGroupName);
257  }
258  }
259 }
const Command * getCommand(int index) const
Definition: mainsettings.h:40
int32_t i
Definition: decimators.h:244
void setGroup(const QString &group)
Definition: command.h:47
int getCommandCount() const
Definition: mainsettings.h:39
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renamePresetGroup()

void MainSettings::renamePresetGroup ( const QString &  oldGroupName,
const QString &  newGroupName 
)

Definition at line 182 of file mainsettings.cpp.

References getPreset(), getPresetCount(), i, and Preset::setGroup().

Referenced by MainWindow::on_presetEdit_clicked().

183 {
184  int nbPresets = getPresetCount();
185 
186  for (int i = 0; i < nbPresets; i++)
187  {
188  if (getPreset(i)->getGroup() == oldGroupName)
189  {
190  Preset *preset_mod = const_cast<Preset*>(getPreset(i));
191  preset_mod->setGroup(newGroupName);
192  }
193  }
194 }
int getPresetCount() const
Definition: mainsettings.h:30
Definition: preset.h:28
int32_t i
Definition: decimators.h:244
void setGroup(const QString &group)
Definition: preset.h:71
const Preset * getPreset(int index) const
Definition: mainsettings.h:31
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetToDefaults()

void MainSettings::resetToDefaults ( )

Definition at line 142 of file mainsettings.cpp.

References m_preferences, m_workingPreset, Preferences::resetToDefaults(), and Preset::resetToDefaults().

Referenced by MainSettings().

143 {
146 }
Preferences m_preferences
Definition: mainsettings.h:73
void resetToDefaults()
Definition: preferences.cpp:9
void resetToDefaults()
Definition: preset.cpp:30
Preset m_workingPreset
Definition: mainsettings.h:75
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ save()

void MainSettings::save ( ) const

Definition at line 98 of file mainsettings.cpp.

References i, m_ambeEngine, m_audioDeviceManager, m_commands, m_hardwareDeviceUserArgs, m_preferences, m_presets, m_workingPreset, Preferences::serialize(), DeviceUserArgs::serialize(), AMBEEngine::serialize(), Preset::serialize(), and AudioDeviceManager::serialize().

Referenced by MainWindow::closeEvent(), MainCore::handleMessage(), MainWindow::handleMessage(), MainWindow::on_commandsSave_clicked(), MainWindow::on_settingsSave_clicked(), and MainCore::~MainCore().

99 {
100  QSettings s;
101 
102  s.setValue("preferences", qCompress(m_preferences.serialize()).toBase64());
103  s.setValue("current", qCompress(m_workingPreset.serialize()).toBase64());
104 
105  if (m_audioDeviceManager) {
106  s.setValue("audio", qCompress(m_audioDeviceManager->serialize()).toBase64());
107  }
108 
109  if (m_ambeEngine) {
110  s.setValue("ambe", qCompress(m_ambeEngine->serialize()).toBase64());
111  }
112 
113  QStringList groups = s.childGroups();
114 
115  for(int i = 0; i < groups.size(); ++i)
116  {
117  if ((groups[i].startsWith("preset")) || (groups[i].startsWith("command")))
118  {
119  s.remove(groups[i]);
120  }
121  }
122 
123  for (int i = 0; i < m_presets.count(); ++i)
124  {
125  QString group = QString("preset-%1").arg(i + 1);
126  s.beginGroup(group);
127  s.setValue("data", qCompress(m_presets[i]->serialize()).toBase64());
128  s.endGroup();
129  }
130 
131  for (int i = 0; i < m_commands.count(); ++i)
132  {
133  QString group = QString("command-%1").arg(i + 1);
134  s.beginGroup(group);
135  s.setValue("data", qCompress(m_commands[i]->serialize()).toBase64());
136  s.endGroup();
137  }
138 
139  s.setValue("hwDeviceUserArgs", qCompress(m_hardwareDeviceUserArgs.serialize()).toBase64());
140 }
Preferences m_preferences
Definition: mainsettings.h:73
QByteArray serialize() const
Presets m_presets
Definition: mainsettings.h:77
QByteArray serialize() const
Commands m_commands
Definition: mainsettings.h:79
AMBEEngine * m_ambeEngine
Definition: mainsettings.h:81
Preset m_workingPreset
Definition: mainsettings.h:75
QByteArray serialize() const
Definition: preset.cpp:43
int32_t i
Definition: decimators.h:244
QByteArray serialize() const
Definition: ambeengine.cpp:335
QByteArray serialize() const
Definition: preferences.cpp:23
AudioDeviceManager * m_audioDeviceManager
Definition: mainsettings.h:74
DeviceUserArgs m_hardwareDeviceUserArgs
Definition: mainsettings.h:80
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAMBEEngine()

void MainSettings::setAMBEEngine ( AMBEEngine ambeEngine)
inline

Definition at line 70 of file mainsettings.h.

Referenced by MainCore::MainCore(), and MainWindow::MainWindow().

70 { m_ambeEngine = ambeEngine; }
AMBEEngine * m_ambeEngine
Definition: mainsettings.h:81
+ Here is the caller graph for this function:

◆ setAudioDeviceManager()

void MainSettings::setAudioDeviceManager ( AudioDeviceManager audioDeviceManager)
inline

Definition at line 69 of file mainsettings.h.

Referenced by MainCore::MainCore(), and MainWindow::MainWindow().

69 { m_audioDeviceManager = audioDeviceManager; }
AudioDeviceManager * m_audioDeviceManager
Definition: mainsettings.h:74
+ Here is the caller graph for this function:

◆ setConsoleMinLogLevel()

void MainSettings::setConsoleMinLogLevel ( const QtMsgType &  minLogLevel)
inline

Definition at line 58 of file mainsettings.h.

Referenced by LoggingDialog::accept(), WebAPIAdapterSrv::instanceLoggingPut(), and WebAPIAdapterGUI::instanceLoggingPut().

58 { m_preferences.setConsoleMinLogLevel(minLogLevel); }
Preferences m_preferences
Definition: mainsettings.h:73
void setConsoleMinLogLevel(const QtMsgType &minLogLevel)
Definition: preferences.h:31
+ Here is the caller graph for this function:

◆ setFileMinLogLevel()

void MainSettings::setFileMinLogLevel ( const QtMsgType &  minLogLevel)
inline

Definition at line 59 of file mainsettings.h.

Referenced by LoggingDialog::accept(), WebAPIAdapterSrv::instanceLoggingPut(), and WebAPIAdapterGUI::instanceLoggingPut().

59 { m_preferences.setFileMinLogLevel(minLogLevel); }
Preferences m_preferences
Definition: mainsettings.h:73
void setFileMinLogLevel(const QtMsgType &minLogLevel)
Definition: preferences.h:32
+ Here is the caller graph for this function:

◆ setLatitude()

void MainSettings::setLatitude ( float  latitude)
inline

Definition at line 53 of file mainsettings.h.

Referenced by MyPositionDialog::accept(), WebAPIAdapterSrv::instanceLocationPut(), and WebAPIAdapterGUI::instanceLocationPut().

53 { m_preferences.setLatitude(latitude); }
Preferences m_preferences
Definition: mainsettings.h:73
void setLatitude(float latitude)
Definition: preferences.h:26
+ Here is the caller graph for this function:

◆ setLogFileName()

void MainSettings::setLogFileName ( const QString &  value)
inline

Definition at line 61 of file mainsettings.h.

Referenced by LoggingDialog::accept(), WebAPIAdapterSrv::instanceLoggingPut(), and WebAPIAdapterGUI::instanceLoggingPut().

61 { m_preferences.setLogFileName(value); }
Preferences m_preferences
Definition: mainsettings.h:73
void setLogFileName(const QString &value)
Definition: preferences.h:34
+ Here is the caller graph for this function:

◆ setLongitude()

void MainSettings::setLongitude ( float  longitude)
inline

Definition at line 54 of file mainsettings.h.

Referenced by MyPositionDialog::accept(), WebAPIAdapterSrv::instanceLocationPut(), and WebAPIAdapterGUI::instanceLocationPut().

54 { m_preferences.setLongitude(longitude); }
Preferences m_preferences
Definition: mainsettings.h:73
void setLongitude(float longitude)
Definition: preferences.h:27
+ Here is the caller graph for this function:

◆ setSourceDeviceId()

void MainSettings::setSourceDeviceId ( const QString &  deviceId)
inline

Definition at line 51 of file mainsettings.h.

Referenced by MainWindow::sampleSourceChanged().

51 { m_preferences.setSourceDevice(deviceId); }
Preferences m_preferences
Definition: mainsettings.h:73
void setSourceDevice(const QString &value)
Definition: preferences.h:16
+ Here is the caller graph for this function:

◆ setSourceIndex()

void MainSettings::setSourceIndex ( int  value)
inline

Definition at line 49 of file mainsettings.h.

Referenced by MainWindow::sampleSourceChanged().

49 { m_preferences.setSourceIndex(value); }
Preferences m_preferences
Definition: mainsettings.h:73
void setSourceIndex(const int value)
Definition: preferences.h:18
+ Here is the caller graph for this function:

◆ setUseLogFile()

void MainSettings::setUseLogFile ( bool  useLogFile)
inline

Definition at line 60 of file mainsettings.h.

Referenced by LoggingDialog::accept(), WebAPIAdapterSrv::instanceLoggingPut(), and WebAPIAdapterGUI::instanceLoggingPut().

60 { m_preferences.setUseLogFile(useLogFile); }
Preferences m_preferences
Definition: mainsettings.h:73
void setUseLogFile(bool useLogFile)
Definition: preferences.h:33
+ Here is the caller graph for this function:

◆ sortCommands()

void MainSettings::sortCommands ( )

Definition at line 242 of file mainsettings.cpp.

References Command::commandCompare(), and m_commands.

Referenced by MainWindow::loadSettings(), MainWindow::on_commandDuplicate_clicked(), MainWindow::on_commandEdit_clicked(), and MainWindow::on_commandNew_clicked().

243 {
244  qSort(m_commands.begin(), m_commands.end(), Command::commandCompare);
245 }
static bool commandCompare(const Command *c1, Command *c2)
Definition: command.h:72
Commands m_commands
Definition: mainsettings.h:79
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sortPresets()

void MainSettings::sortPresets ( )

Definition at line 177 of file mainsettings.cpp.

References m_presets, and Preset::presetCompare().

Referenced by MainCore::handleMessage(), MainWindow::handleMessage(), MainCore::loadSettings(), MainWindow::loadSettings(), MainWindow::on_presetEdit_clicked(), MainWindow::on_presetSave_clicked(), and MainWindow::on_presetUpdate_clicked().

178 {
179  qSort(m_presets.begin(), m_presets.end(), Preset::presetCompare);
180 }
Presets m_presets
Definition: mainsettings.h:77
static bool presetCompare(const Preset *p1, Preset *p2)
Definition: preset.h:103
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_ambeEngine

AMBEEngine* MainSettings::m_ambeEngine
protected

Definition at line 81 of file mainsettings.h.

Referenced by load(), and save().

◆ m_audioDeviceManager

AudioDeviceManager* MainSettings::m_audioDeviceManager
protected

Definition at line 74 of file mainsettings.h.

Referenced by load(), and save().

◆ m_commands

Commands MainSettings::m_commands
protected

◆ m_hardwareDeviceUserArgs

DeviceUserArgs MainSettings::m_hardwareDeviceUserArgs
protected

Definition at line 80 of file mainsettings.h.

Referenced by load(), and save().

◆ m_preferences

Preferences MainSettings::m_preferences
protected

Definition at line 73 of file mainsettings.h.

Referenced by load(), resetToDefaults(), and save().

◆ m_presets

Presets MainSettings::m_presets
protected

◆ m_workingPreset

Preset MainSettings::m_workingPreset
protected

Definition at line 75 of file mainsettings.h.

Referenced by load(), resetToDefaults(), and save().


The documentation for this class was generated from the following files: