OpenHantek
Loading...
Searching...
No Matches
mainwindow.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
2
3#pragma once
5#include "post/ppresult.h"
6#include <QElapsedTimer>
7#include <QLineEdit>
8#include <QMainWindow>
9#include <memory>
10
11#include "scopesettings.h"
12
15class DsoSettings;
17class DsoWidget;
18class HorizontalDock;
19class TriggerDock;
20class SpectrumDock;
21class VoltageDock;
22
23namespace Ui {
24class MainWindow;
25}
26
30class MainWindow : public QMainWindow {
31 Q_OBJECT
32
33 public:
35 QWidget *parent = nullptr );
36 ~MainWindow() override;
37 QElapsedTimer elapsedTime;
38
39 public slots:
40 void showNewData( std::shared_ptr< PPresult > newData );
41 void exporterStatusChanged( const QString &exporterName, const QString &status );
43
44 protected:
45 void closeEvent( QCloseEvent *event ) override;
46
47 private:
48 Ui::MainWindow *ui;
49 QIcon iconPause;
50 QIcon iconPlay;
51 QLineEdit *commandEdit;
53
54 // Central widgets
56
57 // Settings used for the whole program
60
61 // Taking screenshots
64 void screenShot( screenshotType_t screenshotType = SCREENSHOT, bool autoSave = false );
65
66 bool openDocument( QString docName );
67
68 signals:
70};
Holds the settings of the program.
Definition dsosettings.h:20
The widget for the oszilloscope-screen This widget contains the scopes and all level sliders.
Definition dsowidget.h:23
Definition exporterregistry.h:23
The DsoControl abstraction layer for Hantek USB DSOs. TODO Please anyone, refactor this class into sm...
Definition hantekdsocontrol.h:50
Dock window for the horizontal axis. It contains the settings for the timebase and the display format...
Definition HorizontalDock.h:27
The main window of the application. The main window contains the classic oszilloscope-screen and the ...
Definition mainwindow.h:30
void closeEvent(QCloseEvent *event) override
Save the settings before exiting.
Definition mainwindow.cpp:682
void screenShot(screenshotType_t screenshotType=SCREENSHOT, bool autoSave=false)
Definition mainwindow.cpp:571
~MainWindow() override
Definition mainwindow.cpp:538
ExporterRegistry * exporterRegistry
Definition mainwindow.h:59
Ui::MainWindow * ui
Definition mainwindow.h:48
screenshotType_t screenshotType
Definition mainwindow.h:63
void exporterProgressChanged()
Definition mainwindow.cpp:559
QElapsedTimer elapsedTime
Definition mainwindow.h:37
QtAwesome * iconFont
Definition mainwindow.h:52
QIcon iconPlay
Definition mainwindow.h:50
MainWindow(HantekDsoControl *dsoControl, DsoSettings *dsoSettings, ExporterRegistry *exporterRegistry, QWidget *parent=nullptr)
Definition mainwindow.cpp:38
QLineEdit * commandEdit
Definition mainwindow.h:51
DsoSettings * dsoSettings
Definition mainwindow.h:58
void showNewData(std::shared_ptr< PPresult > newData)
Definition mainwindow.cpp:545
DsoWidget * dsoWidget
Definition mainwindow.h:55
screenshotType_t
Definition mainwindow.h:62
@ SCREENSHOT
Definition mainwindow.h:62
@ PRINTER
Definition mainwindow.h:62
@ HARDCOPY
Definition mainwindow.h:62
void exporterStatusChanged(const QString &exporterName, const QString &status)
Definition mainwindow.cpp:552
void settingsLoaded(DsoSettingsScope *scope, const Dso::ControlSpecification *spec)
QIcon iconPause
Definition mainwindow.h:49
bool openDocument(QString docName)
Definition mainwindow.cpp:668
Definition QtAwesome.h:28
Dock window for the spectrum view. It contains the magnitude for all channels and allows to enable/di...
Definition SpectrumDock.h:19
Analyzes the data from the dso. Calculates the spectrum and various data about the signal and saves t...
Definition spectrumgenerator.h:26
Dock window for the trigger settings. It contains the settings for the trigger mode,...
Definition TriggerDock.h:21
Dock window for the voltage channel settings. It contains the settings for gain and coupling for both...
Definition VoltageDock.h:24
Definition mainwindow.h:23
Holds the settings for the oscilloscope.
Definition scopesettings.h:88
Stores the specifications of the currently connected device.
Definition controlspecification.h:42