OpenHantek
settings.h
1 // SPDX-License-Identifier: GPL-2.0+
2 
3 #pragma once
4 
5 #include <QSettings>
6 #include <QSize>
7 #include <QString>
8 #include <memory>
9 
10 #include "exporting/exportsettings.h"
11 #include "post/postprocessingsettings.h"
12 #include "scopesettings.h"
13 #include "viewsettings.h"
14 
16 class DsoSettings {
17  public:
18  explicit DsoSettings(const Dso::ControlSpecification *deviceSpecification);
19  bool setFilename(const QString &filename);
20 
25  bool alwaysSave = true;
26 
27  QByteArray mainWindowGeometry;
28  QByteArray mainWindowState;
29 
31  void load();
32 
34  void save();
35 
36  private:
37  std::unique_ptr<QSettings> store = std::unique_ptr<QSettings>(new QSettings);
38 };
DsoSettings(const Dso::ControlSpecification *deviceSpecification)
Set the number of channels.
Definition: settings.cpp:14
void save()
Save the settings to the harddisk.
Definition: settings.cpp:196
Definition: postprocessingsettings.h:45
bool alwaysSave
Always save the settings on exit.
Definition: settings.h:25
DsoSettingsView view
All view related settings.
Definition: settings.h:23
QByteArray mainWindowGeometry
Geometry of the main window.
Definition: settings.h:27
Holds the settings of the program.
Definition: settings.h:16
DsoSettingsPostProcessing post
All post processing related settings.
Definition: settings.h:24
DsoSettingsScope scope
All oscilloscope related settings.
Definition: settings.h:22
DsoSettingsExport exporting
General options of the program.
Definition: settings.h:21
Stores the specifications of the currently connected device.
Definition: controlspecification.h:47
Holds the export options of the program.
Definition: exportsettings.h:8
Holds all view settings.
Definition: viewsettings.h:30
Holds the settings for the oscilloscope.
Definition: scopesettings.h:77
void load()
Read the settings from the last session or another file.
Definition: settings.cpp:61
QByteArray mainWindowState
State of docking windows and toolbars.
Definition: settings.h:28