OpenHantek
dsosettings.h
Go to the documentation of this file.
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 
12 #include "scopesettings.h"
13 #include "viewsettings.h"
14 
16 class DsoSettings {
17  public:
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);
39 };
DsoSettings(const Dso::ControlSpecification *deviceSpecification)
Set the number of channels.
Definition: dsosettings.cpp:14
void save()
Save the settings to the harddisk.
Definition: dsosettings.cpp:207
Definition: postprocessingsettings.h:47
bool alwaysSave
Always save the settings on exit.
Definition: dsosettings.h:25
DsoSettingsView view
All view related settings.
Definition: dsosettings.h:23
QByteArray mainWindowGeometry
Geometry of the main window.
Definition: dsosettings.h:27
const Dso::ControlSpecification * deviceSpecification
Definition: dsosettings.h:38
Holds the settings of the program.
Definition: dsosettings.h:16
DsoSettingsPostProcessing post
All post processing related settings.
Definition: dsosettings.h:24
DsoSettingsScope scope
All oscilloscope related settings.
Definition: dsosettings.h:22
DsoSettingsExport exporting
General options of the program.
Definition: dsosettings.h:21
Stores the specifications of the currently connected device.
Definition: controlspecification.h:42
Holds the export options of the program.
Definition: exportsettings.h:8
std::unique_ptr< QSettings > store
Definition: dsosettings.h:37
Holds all view settings.
Definition: viewsettings.h:30
Holds the settings for the oscilloscope.
Definition: scopesettings.h:75
void load()
Read the settings from the last session or another file.
Definition: dsosettings.cpp:64
QByteArray mainWindowState
State of docking windows and toolbars.
Definition: dsosettings.h:28
bool setFilename(const QString &filename)
Definition: dsosettings.cpp:54