swift
copysettingsandcachescomponent.cpp
1 // SPDX-FileCopyrightText: Copyright (C) 2018 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
5 
6 #include <QFileInfo>
7 #include <QRegularExpression>
8 #include <QStringBuilder>
9 
10 #include "ui_copysettingsandcachescomponent.h"
11 
12 #include "gui/guiapplication.h"
13 #include "gui/guiutility.h"
15 #include "misc/fileutils.h"
16 #include "misc/icons.h"
17 #include "misc/json.h"
18 
19 using namespace swift::misc;
20 using namespace swift::misc::audio;
21 using namespace swift::misc::input;
22 using namespace swift::misc::network;
23 using namespace swift::misc::network::data;
24 using namespace swift::misc::network::settings;
25 using namespace swift::misc::settings;
26 using namespace swift::misc::simulation::settings;
27 using namespace swift::core::audio;
28 using namespace swift::core::application;
29 using namespace swift::core::data;
30 using namespace swift::gui::settings;
31 
32 namespace swift::gui::components
33 {
34  CCopySettingsAndCachesComponent::CCopySettingsAndCachesComponent(QWidget *parent)
36  {
37  ui->setupUi(this);
38  this->initAll();
39  this->allCheckBoxesReadOnly();
40  connect(ui->pb_SelectAll, &QPushButton::clicked, this, &CCopySettingsAndCachesComponent::selectAll);
41  connect(ui->pb_DeselectAll, &QPushButton::clicked, this, &CCopySettingsAndCachesComponent::deselectAll);
42  connect(ui->pb_Copy, &QPushButton::clicked, this, &CCopySettingsAndCachesComponent::copy);
43  connect(ui->comp_OtherSwiftVersions, &COtherSwiftVersionsComponent::versionChanged, this,
44  &CCopySettingsAndCachesComponent::onOtherVersionChanged);
45  }
46 
48 
50  {
51  ui->comp_OtherSwiftVersions->reloadOtherVersionsDeferred(deferMs);
52  }
53 
54  void CCopySettingsAndCachesComponent::onOtherVersionChanged(const CApplicationInfo &info)
55  {
56  readOnlyCheckbox(ui->cb_SettingsAudio,
57  !CCacheSettingsUtils::hasOtherVersionSettingsFile(info, m_settingsAudio.getFilename()));
58  readOnlyCheckbox(ui->cb_SettingsAudioInputDevice,
59  !CCacheSettingsUtils::hasOtherVersionSettingsFile(info, m_settingsAudio.getFilename()));
60  readOnlyCheckbox(ui->cb_SettingsAudioOutputDevice, !CCacheSettingsUtils::hasOtherVersionSettingsFile(
61  info, m_settingsAudioOutputDevice.getFilename()));
62 
63  readOnlyCheckbox(ui->cb_SettingsNetworkTrafficServers, !CCacheSettingsUtils::hasOtherVersionSettingsFile(
64  info, m_settingsNetworkServers.getFilename()));
65  readOnlyCheckbox(ui->cb_CacheLastNetworkServer,
66  !CCacheSettingsUtils::hasOtherVersionCacheFile(info, m_cacheLastNetworkServer.getFilename()));
67  readOnlyCheckbox(ui->cb_CacheLastVatsimServer,
68  !CCacheSettingsUtils::hasOtherVersionCacheFile(info, m_cacheLastVatsimServer.getFilename()));
69 
70  readOnlyCheckbox(ui->cb_SettingsGuiGeneral,
71  !CCacheSettingsUtils::hasOtherVersionSettingsFile(info, m_settingsGuiGeneral.getFilename()));
72  readOnlyCheckbox(ui->cb_SettingsDockWidget,
73  !CCacheSettingsUtils::hasOtherVersionSettingsFile(info, m_settingsDockWidget.getFilename()));
74  readOnlyCheckbox(ui->cb_SettingsViewUpdate,
75  !CCacheSettingsUtils::hasOtherVersionSettingsFile(info, m_settingsViewUpdate.getFilename()));
76 
77  readOnlyCheckbox(ui->cb_SettingsEnabledSimulators, !CCacheSettingsUtils::hasOtherVersionSettingsFile(
78  info, m_settingsEnabledSimulators.getFilename()));
79  readOnlyCheckbox(ui->cb_SettingsSimulatorFSX,
80  !CCacheSettingsUtils::hasOtherVersionSettingsFile(info, m_settingsSimulatorFsx.getFilename()));
81  readOnlyCheckbox(ui->cb_SettingsSimulatorP3D,
82  !CCacheSettingsUtils::hasOtherVersionSettingsFile(info, m_settingsSimulatorP3D.getFilename()));
83  readOnlyCheckbox(ui->cb_SettingsSimulatorXPlane, !CCacheSettingsUtils::hasOtherVersionSettingsFile(
84  info, m_settingsSimulatorXPlane.getFilename()));
85 
86  readOnlyCheckbox(ui->cb_SettingsActionHotkeys, !CCacheSettingsUtils::hasOtherVersionSettingsFile(
87  info, m_settingsActionHotkeys.getFilename()));
88  readOnlyCheckbox(ui->cb_SettingsTextMessages,
89  !CCacheSettingsUtils::hasOtherVersionSettingsFile(info, m_settingsTextMessage.getFilename()));
90  readOnlyCheckbox(ui->cb_SettingsDirectories,
91  !CCacheSettingsUtils::hasOtherVersionSettingsFile(info, m_settingsDirectories.getFilename()));
92 
93  readOnlyCheckbox(ui->cb_SettingsConsolidation, !CCacheSettingsUtils::hasOtherVersionSettingsFile(
94  info, m_settingsConsolidation.getFilename()));
95  readOnlyCheckbox(ui->cb_SettingsModel,
96  !CCacheSettingsUtils::hasOtherVersionSettingsFile(info, m_settingsModel.getFilename()));
97  }
98 
99  void CCopySettingsAndCachesComponent::initAll()
100  {
101  this->initAudio();
102  this->initNetwork();
103  this->initUi();
104  this->initSimulator();
105  this->initMisc();
106  this->initModel();
107  }
108 
109  void CCopySettingsAndCachesComponent::initAudio()
110  {
111  ui->cb_SettingsAudio->setText(checkBoxText(TSettings::humanReadable(), true));
112  ui->cb_SettingsAudioInputDevice->setText(checkBoxText(TInputDevice::humanReadable(), true));
113  ui->cb_SettingsAudioOutputDevice->setText(checkBoxText(TOutputDevice::humanReadable(), true));
114  }
115 
116  void CCopySettingsAndCachesComponent::initNetwork()
117  {
118  ui->cb_SettingsNetworkTrafficServers->setText(checkBoxText(TTrafficServers::humanReadable(), true));
119  ui->cb_CacheLastNetworkServer->setText(checkBoxText(TLastServer::humanReadable(), false));
120  ui->cb_CacheLastVatsimServer->setText(checkBoxText(TVatsimLastServer::humanReadable(), false));
121  }
122 
123  void CCopySettingsAndCachesComponent::initUi()
124  {
125  ui->cb_SettingsGuiGeneral->setText(checkBoxText(TGeneralGui::humanReadable(), true));
126  ui->cb_SettingsDockWidget->setText(checkBoxText(TDockWidget::humanReadable(), true));
127  ui->cb_SettingsViewUpdate->setText(checkBoxText(TViewUpdateSettings::humanReadable(), true));
128  }
129 
130  void CCopySettingsAndCachesComponent::initSimulator()
131  {
132  ui->cb_SettingsEnabledSimulators->setText(checkBoxText(TEnabledSimulators::humanReadable(), true));
133  ui->cb_SettingsSimulatorFSX->setText(checkBoxText(TSimulatorFsx::humanReadable(), true));
134  ui->cb_SettingsSimulatorP3D->setText(checkBoxText(TSimulatorP3D::humanReadable(), true));
135  ui->cb_SettingsSimulatorXPlane->setText(checkBoxText(TSimulatorXP::humanReadable(), true));
136  }
137 
138  void CCopySettingsAndCachesComponent::initMisc()
139  {
140  ui->cb_SettingsActionHotkeys->setText(checkBoxText(TActionHotkeys::humanReadable(), true));
141  ui->cb_SettingsTextMessages->setText(checkBoxText(TextMessageSettings::humanReadable(), true));
142  ui->cb_SettingsDirectories->setText(checkBoxText(TDirectorySettings::humanReadable(), true));
143  }
144 
145  void CCopySettingsAndCachesComponent::initModel()
146  {
147  ui->cb_SettingsModel->setText(checkBoxText(TModel::humanReadable(), true));
148  ui->cb_SettingsConsolidation->setText(checkBoxText(TBackgroundConsolidation::humanReadable(), true));
149  }
150 
151  int CCopySettingsAndCachesComponent::copy()
152  {
153  ui->le_Status->clear();
154 
155  const CApplicationInfo otherVersionInfo = ui->comp_OtherSwiftVersions->selectedOtherVersion();
156  if (otherVersionInfo.isNull()) { return 0; }
157 
158  bool success = false;
159  int copied = 0;
160  QString errMsg;
161  ui->le_Status->setText("Starting to copy from '" + otherVersionInfo.toQString(true) + "'");
162 
163  // ------- audio -------
164  if (ui->cb_SettingsAudio->isChecked())
165  {
166  const QString joStr =
167  CCacheSettingsUtils::otherVersionSettingsFileContent(otherVersionInfo, m_settingsAudio.getFilename());
168  if (!joStr.isEmpty())
169  {
170  const audio::CSettings audioSettings = audio::CSettings::fromJsonNoThrow(joStr, true, success, errMsg);
171  if (this->parsingMessage(success, errMsg, m_settingsAudio.getKey()))
172  {
173  this->displayStatusMessage(m_settingsAudio.setAndSave(audioSettings),
174  audioSettings.toQString(true));
175  copied++;
176  }
177  }
178  }
179 
180  if (ui->cb_SettingsAudioInputDevice->isChecked())
181  {
182  const QString joStr = CCacheSettingsUtils::otherVersionSettingsFileContent(
183  otherVersionInfo, m_settingsAudioInputDevice.getFilename());
184  const QString audioInputSettings = json::firstJsonValueAsString(joStr);
185  if (!audioInputSettings.isEmpty())
186  {
187  this->displayStatusMessage(m_settingsAudioInputDevice.setAndSave(audioInputSettings),
188  audioInputSettings);
189  copied++;
190  }
191  }
192 
193  if (ui->cb_SettingsAudioOutputDevice->isChecked())
194  {
195  const QString joStr = CCacheSettingsUtils::otherVersionSettingsFileContent(
196  otherVersionInfo, m_settingsAudioOutputDevice.getFilename());
197  const QString audioOutputSettings = json::firstJsonValueAsString(joStr);
198  if (!audioOutputSettings.isEmpty())
199  {
200  this->displayStatusMessage(m_settingsAudioOutputDevice.setAndSave(audioOutputSettings),
201  audioOutputSettings);
202  copied++;
203  }
204  }
205 
206  // ------- directories -------
207  if (ui->cb_SettingsDirectories->isChecked())
208  {
209  const QString joStr = CCacheSettingsUtils::otherVersionSettingsFileContent(
210  otherVersionInfo, m_settingsDirectories.getFilename());
211  if (!joStr.isEmpty())
212  {
213  const CDirectories directories = CDirectories::fromJsonNoThrow(joStr, true, success, errMsg);
214  if (this->parsingMessage(success, errMsg, m_settingsDirectories.getKey()))
215  {
216  this->displayStatusMessage(m_settingsDirectories.setAndSave(directories),
217  directories.toQString(true));
218  }
219  copied++;
220  }
221  }
222 
223  // ------- network -------
224  if (ui->cb_SettingsNetworkTrafficServers->isChecked())
225  {
226  const QString joStr = CCacheSettingsUtils::otherVersionSettingsFileContent(
227  otherVersionInfo, m_settingsNetworkServers.getFilename());
228  if (!joStr.isEmpty())
229  {
230  const CServerList networkServers = CServerList::fromJsonNoThrow(joStr, true, success, errMsg);
231  if (this->parsingMessage(success, errMsg, m_settingsNetworkServers.getKey()))
232  {
233  this->displayStatusMessage(m_settingsNetworkServers.setAndSave(networkServers),
234  networkServers.toQString(true));
235  copied++;
236  }
237  }
238  }
239 
240  if (ui->cb_CacheLastNetworkServer->isChecked())
241  {
242  const QString joStr = CCacheSettingsUtils::otherVersionCacheFileContent(
243  otherVersionInfo, m_cacheLastNetworkServer.getFilename());
244  if (!joStr.isEmpty())
245  {
246  const CServer server = CServer::fromJsonNoThrow(joStr, true, success, errMsg);
247  if (this->parsingMessage(success, errMsg, m_cacheLastNetworkServer.getKey()))
248  {
249  this->displayStatusMessage(m_cacheLastNetworkServer.set(server), server.toQString(true));
250  copied++;
251  }
252  }
253  }
254 
255  if (ui->cb_CacheLastVatsimServer->isChecked())
256  {
257  const QString joStr = CCacheSettingsUtils::otherVersionCacheFileContent(
258  otherVersionInfo, m_cacheLastVatsimServer.getFilename());
259  if (!joStr.isEmpty())
260  {
261  const CServer server = CServer::fromJsonNoThrow(joStr, true, success, errMsg);
262  if (this->parsingMessage(success, errMsg, m_cacheLastVatsimServer.getKey()))
263  {
264  this->displayStatusMessage(m_cacheLastVatsimServer.set(server), server.toQString(true));
265  copied++;
266  }
267  }
268  }
269 
270  // ------- GUI -------
271  if (ui->cb_SettingsGuiGeneral->isChecked())
272  {
273  const QString joStr = CCacheSettingsUtils::otherVersionSettingsFileContent(
274  otherVersionInfo, m_settingsGuiGeneral.getFilename());
275  if (!joStr.isEmpty())
276  {
277  const CGeneralGuiSettings guiGeneral =
278  CGeneralGuiSettings::fromJsonNoThrow(joStr, true, success, errMsg);
279  this->displayStatusMessage(m_settingsGuiGeneral.setAndSave(guiGeneral), guiGeneral.toQString(true));
280  copied++;
281  }
282  }
283 
284  if (ui->cb_SettingsDockWidget->isChecked())
285  {
286  const QString joStr = CCacheSettingsUtils::otherVersionSettingsFileContent(
287  otherVersionInfo, m_settingsDockWidget.getFilename());
288  if (!joStr.isEmpty())
289  {
290  const CDockWidgetSettings dwSettings =
291  CDockWidgetSettings::fromJsonNoThrow(joStr, true, success, errMsg);
292  this->displayStatusMessage(m_settingsDockWidget.setAndSave(dwSettings), dwSettings.toQString(true));
293  copied++;
294  }
295  }
296 
297  if (ui->cb_SettingsViewUpdate->isChecked())
298  {
299  const QString joStr = CCacheSettingsUtils::otherVersionSettingsFileContent(
300  otherVersionInfo, m_settingsViewUpdate.getFilename());
301  if (!joStr.isEmpty())
302  {
303  const CViewUpdateSettings viewUpdate =
304  CViewUpdateSettings::fromJsonNoThrow(joStr, true, success, errMsg);
305  this->displayStatusMessage(m_settingsViewUpdate.setAndSave(viewUpdate), viewUpdate.toQString(true));
306  copied++;
307  }
308  }
309 
310  // ------- sims -------
311  if (ui->cb_SettingsEnabledSimulators->isChecked())
312  {
313  const QString joStr = CCacheSettingsUtils::otherVersionSettingsFileContent(
314  otherVersionInfo, m_settingsEnabledSimulators.getFilename());
315  if (!joStr.isEmpty())
316  {
317  const QStringList enabledSims = json::firstJsonValueAsStringList(joStr);
318  if (!enabledSims.isEmpty())
319  {
320  this->displayStatusMessage(m_settingsEnabledSimulators.setAndSave(enabledSims),
321  enabledSims.join(", "));
322  copied++;
323  }
324  }
325  }
326 
327  if (ui->cb_SettingsSimulatorFSX->isChecked())
328  {
329  const QString joStr = CCacheSettingsUtils::otherVersionSettingsFileContent(
330  otherVersionInfo, m_settingsSimulatorFsx.getFilename());
331  if (!joStr.isEmpty())
332  {
333  const CSimulatorSettings settings = CSimulatorSettings::fromJsonNoThrow(joStr, true, success, errMsg);
334  if (this->parsingMessage(success, errMsg, m_settingsSimulatorFsx.getKey()))
335  {
336  this->displayStatusMessage(m_settingsSimulatorFsx.setAndSave(settings), settings.toQString(true));
337  }
338  copied++;
339  }
340  }
341 
342  if (ui->cb_SettingsSimulatorP3D->isChecked())
343  {
344  const QString joStr = CCacheSettingsUtils::otherVersionSettingsFileContent(
345  otherVersionInfo, m_settingsSimulatorP3D.getFilename());
346  if (!joStr.isEmpty())
347  {
348  const CSimulatorSettings settings = CSimulatorSettings::fromJsonNoThrow(joStr, true, success, errMsg);
349  if (this->parsingMessage(success, errMsg, m_settingsSimulatorP3D.getKey()))
350  {
351  this->displayStatusMessage(m_settingsSimulatorP3D.setAndSave(settings), settings.toQString(true));
352  }
353  copied++;
354  }
355  }
356 
357  if (ui->cb_SettingsSimulatorXPlane->isChecked())
358  {
359  const QString joStr = CCacheSettingsUtils::otherVersionSettingsFileContent(
360  otherVersionInfo, m_settingsSimulatorXPlane.getFilename());
361  if (!joStr.isEmpty())
362  {
363  const CSimulatorSettings settings = CSimulatorSettings::fromJsonNoThrow(joStr, true, success, errMsg);
364  if (this->parsingMessage(success, errMsg, m_settingsSimulatorXPlane.getKey()))
365  {
366  this->displayStatusMessage(m_settingsSimulatorXPlane.setAndSave(settings),
367  settings.toQString(true));
368  }
369  copied++;
370  }
371  }
372 
373  // ------ model ------
374  if (ui->cb_SettingsModel->isChecked())
375  {
376  const QString joStr =
377  CCacheSettingsUtils::otherVersionSettingsFileContent(otherVersionInfo, m_settingsModel.getFilename());
378  if (!joStr.isEmpty())
379  {
380  const CModelSettings settings = CModelSettings::fromJsonNoThrow(joStr, true, success, errMsg);
381  if (this->parsingMessage(success, errMsg, m_settingsModel.getKey()))
382  {
383  this->displayStatusMessage(m_settingsModel.setAndSave(settings), settings.toQString(true));
384  copied++;
385  }
386  }
387  }
388 
389  if (ui->cb_SettingsConsolidation->isChecked())
390  {
391  const QString joStr = CCacheSettingsUtils::otherVersionSettingsFileContent(
392  otherVersionInfo, m_settingsConsolidation.getFilename());
393  if (!joStr.isEmpty())
394  {
395  bool ok = false;
396  const int consolidation = json::firstJsonValueAsInt(joStr, -1, &ok);
397  if (ok)
398  {
399  this->displayStatusMessage(m_settingsConsolidation.setAndSave(consolidation),
400  QString::number(consolidation));
401  copied++;
402  }
403  }
404  }
405 
406  // ------ misc -------
407  if (ui->cb_SettingsActionHotkeys->isChecked())
408  {
409  const QString joStr = CCacheSettingsUtils::otherVersionSettingsFileContent(
410  otherVersionInfo, m_settingsActionHotkeys.getFilename());
411  if (!joStr.isEmpty())
412  {
413  CActionHotkeyList hotkeys = CActionHotkeyList::fromJsonNoThrow(joStr, true, success, errMsg);
414  hotkeys.updateToCurrentMachine();
415  if (this->parsingMessage(success, errMsg, m_settingsActionHotkeys.getKey()))
416  {
417  this->displayStatusMessage(m_settingsActionHotkeys.setAndSave(hotkeys), hotkeys.toQString(true));
418  copied++;
419  }
420  }
421  }
422 
423  if (ui->cb_SettingsTextMessages->isChecked())
424  {
425  const QString joStr = CCacheSettingsUtils::otherVersionSettingsFileContent(
426  otherVersionInfo, m_settingsTextMessage.getFilename());
427  if (!joStr.isEmpty())
428  {
429  const CTextMessageSettings settings =
430  CTextMessageSettings::fromJsonNoThrow(joStr, true, success, errMsg);
431  if (this->parsingMessage(success, errMsg, m_settingsTextMessage.getKey()))
432  {
433  this->displayStatusMessage(m_settingsTextMessage.setAndSave(settings), settings.toQString(true));
434  copied++;
435  }
436  }
437  }
438 
439  if (copied > 0)
440  {
441  const CStatusMessage m = CStatusMessage(this).validationInfo(u"Copied %1 settings") << copied;
442  this->showOverlayHTMLMessage(m);
443  }
444 
445  return copied;
446  }
447 
448  void CCopySettingsAndCachesComponent::selectAll()
449  {
450  for (QCheckBox *cb : this->checkBoxes()) { cb->setChecked(cb->isEnabled()); }
451  }
452 
453  void CCopySettingsAndCachesComponent::deselectAll()
454  {
455  for (QCheckBox *cb : this->checkBoxes()) { cb->setChecked(false); }
456  }
457 
458  QList<QCheckBox *> CCopySettingsAndCachesComponent::checkBoxes() const { return this->findChildren<QCheckBox *>(); }
459 
460  bool CCopySettingsAndCachesComponent::parsingMessage(bool success, const QString &msg, const QString &value)
461  {
462  if (success) { return true; }
463  const CStatusMessage sm(this, msg);
464  this->displayStatusMessage(sm, value);
465  return false;
466  }
467 
468  void CCopySettingsAndCachesComponent::displayStatusMessage(const CStatusMessage &msg, const QString &value)
469  {
470  if (msg.isEmpty()) { return; }
471  if (value.isEmpty()) { ui->le_Status->setText(msg.getMessage()); }
472  else { ui->le_Status->setText(msg.getMessage() % u' ' % value); }
473  if (sGui) { sGui->processEventsToRefreshGui(); }
474  }
475 
476  void CCopySettingsAndCachesComponent::allCheckBoxesReadOnly()
477  {
478  for (QCheckBox *cb : checkBoxes()) { readOnlyCheckbox(cb, true); }
479  }
480 
481  void CCopySettingsAndCachesComponent::readOnlyCheckbox(QCheckBox *cb, bool readOnly)
482  {
483  Q_ASSERT_X(cb, Q_FUNC_INFO, "need checkbox");
484  CGuiUtility::checkBoxReadOnly(cb, readOnly);
485  if (readOnly) { cb->setChecked(false); }
486  cb->setEnabled(!readOnly);
487  // cb->setIcon(readOnly ? CIcons::cross16() : CIcons::tick16());
488  }
489 
490  QString CCopySettingsAndCachesComponent::checkBoxText(const QString &text, bool setting)
491  {
492  return setting ? QStringLiteral("%1 [setting]").arg(text) : QStringLiteral("%1 [cache]").arg(text);
493  }
494 
496  {
497  // re-init other versions
498  if (m_copyCachesAndSettings) { m_copyCachesAndSettings->reloadOtherVersions(1000); }
499  }
500 
502 
503 } // namespace swift::gui::components
void processEventsToRefreshGui() const
Allow the GUI to refresh by processing events, call the event loop.
static void checkBoxReadOnly(QCheckBox *checkBox, bool readOnly)
Pseudo readonly state for checkbox.
Definition: guiutility.cpp:450
bool showOverlayHTMLMessage(const QString &htmlMessage, std::chrono::milliseconds timeout=std::chrono::milliseconds(0))
HTML message.
Using this class provides a QFrame with the overlay functionality already integrated.
void versionChanged(const swift::misc::CApplicationInfo &info)
Selection changed.
Settings about view update rates.
Description of a swift application.
bool isNull() const
Null object.
CStatusMessage setAndSave(const T &value, qint64 timestamp=0)
Write and save in the same step. Must be called from the thread in which the owner lives.
Definition: valuecache.h:417
const QString & getKey() const
Get the key string of this value.
Definition: valuecache.h:445
CStatusMessage set(const typename Trait::type &value, qint64 timestamp=0)
Write a new value. Must be called from the thread in which the owner lives.
Definition: datacache.h:350
QString getFilename() const
Return the file that is used for persistence for this value.
Definition: datacache.h:367
Directories (swift data directories)
Definition: directories.h:25
bool isEmpty() const
Message empty.
Derived & validationInfo(const char16_t(&format)[N])
Set the severity to info, providing a format string, and adding the validation category.
QString getFilename() const
Return the file that is used for persistence for this value.
Streamable status message, e.g.
QString getMessage() const
Message.
Value object encapsulating information of audio related settings.
Definition: audiosettings.h:25
Value object encapsulating a list of hotkeys.
void updateToCurrentMachine()
Update for my machine.
QString toQString(bool i18n=false) const
Cast as QString.
Definition: mixinstring.h:76
Value object encapsulating information of a server.
Definition: server.h:28
Value object encapsulating a list of servers.
Definition: serverlist.h:23
Settings for simulator Driver independent parts (such as directories), also used in model loaders.
SWIFT_GUI_EXPORT swift::gui::CGuiApplication * sGui
Single instance of GUI application object.
Core data traits (aka cached values) and classes.
High level reusable GUI components.
Definition: aboutdialog.cpp:13
Classes related to configuration settings.
Definition: directories.h:124
Free functions in swift::misc.