OpenHantek
mainwindow.h
Go to the documentation of this file.
1 // SPDX-License-Identifier: GPL-2.0+
2 
3 #pragma once
4 #include "post/ppresult.h"
5 #include <QMainWindow>
6 #include <memory>
7 
8 #include "scopesettings.h"
9 
10 class SpectrumGenerator;
11 class HantekDsoControl;
12 class DsoSettings;
13 class ExporterRegistry;
14 class DsoWidget;
15 class HorizontalDock;
16 class TriggerDock;
17 class SpectrumDock;
18 class VoltageDock;
19 
20 namespace Ui {
21 class MainWindow;
22 }
23 
27 class MainWindow : public QMainWindow {
28  Q_OBJECT
29 
30  public:
32  QWidget *parent = nullptr);
33  ~MainWindow() override;
34  public slots:
35  void showNewData(std::shared_ptr<PPresult> newData);
36  void exporterStatusChanged(const QString &exporterName, const QString &status);
38 
39  protected:
40  void closeEvent(QCloseEvent *event) override;
41 
42  private:
43  Ui::MainWindow *ui;
44  QIcon iconPause;
45  QIcon iconPlay;
46 
47  // Central widgets
49 
50  // Settings used for the whole program
53 
54  signals:
56 };
void closeEvent(QCloseEvent *event) override
Save the settings before exiting.
Definition: mainwindow.cpp:380
Ui::MainWindow * ui
Definition: mainwindow.h:43
Definition: exporterregistry.h:23
void showNewData(std::shared_ptr< PPresult > newData)
Definition: mainwindow.cpp:366
Definition: mainwindow.h:20
The widget for the oszilloscope-screen This widget contains the scopes and all level sliders...
Definition: dsowidget.h:22
Holds the settings of the program.
Definition: dsosettings.h:16
void settingsLoaded(DsoSettingsScope *scope, const Dso::ControlSpecification *spec)
Stores the specifications of the currently connected device.
Definition: controlspecification.h:42
QIcon iconPlay
Definition: mainwindow.h:45
~MainWindow() override
Definition: mainwindow.cpp:362
void exporterProgressChanged()
Definition: mainwindow.cpp:374
QIcon iconPause
Definition: mainwindow.h:44
Dock window for the trigger settings. It contains the settings for the trigger mode, source and slope.
Definition: TriggerDock.h:21
DsoWidget * dsoWidget
Definition: mainwindow.h:48
Dock window for the voltage channel settings. It contains the settings for gain and coupling for both...
Definition: VoltageDock.h:24
DsoSettings * dsoSettings
Definition: mainwindow.h:51
MainWindow(HantekDsoControl *dsoControl, DsoSettings *dsoSettings, ExporterRegistry *exporterRegistry, QWidget *parent=nullptr)
Definition: mainwindow.cpp:33
Holds the settings for the oscilloscope.
Definition: scopesettings.h:75
Dock window for the spectrum view. It contains the magnitude for all channels and allows to enable/di...
Definition: SpectrumDock.h:19
Dock window for the horizontal axis. It contains the settings for the timebase and the display format...
Definition: HorizontalDock.h:25
void exporterStatusChanged(const QString &exporterName, const QString &status)
Definition: mainwindow.cpp:370
Analyzes the data from the dso. Calculates the spectrum and various data about the signal and saves t...
Definition: spectrumgenerator.h:24
The main window of the application. The main window contains the classic oszilloscope-screen and the ...
Definition: mainwindow.h:27
The DsoControl abstraction layer for Hantek USB DSOs. TODO Please anyone, refactor this class into sm...
Definition: hantekdsocontrol.h:31
ExporterRegistry * exporterRegistry
Definition: mainwindow.h:52