-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
67 lines (59 loc) · 1.84 KB
/
mainwindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#pragma once
#include <QMainWindow>
#include <qwt/qwt_plot_curve.h>
#include <qwt/qwt_plot_panner.h>
#include <qwt/qwt_plot_marker.h>
#include <QCloseEvent>
#include <QThread>
#include <QElapsedTimer>
#include "scope.h"
#include "customQwtPlotCurve.h"
#include "measurements.h"
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
private:
Ui::MainWindow *ui;
Scope scope;
QThread scopeThread;
QVector<CustomQwtPlotCurve*> waveformCurves;
QVector<CustomQwtPlotCurve*> functionCurves;
Measurements measurements;
QwtPlotPanner *panner = nullptr;
QwtPlotMarker *marker = nullptr;
QElapsedTimer fpsTimer;
double timebaseRange = 0;
double channelRange = 0;
double channelOffset = 0;
void closeEvent(QCloseEvent* event);
bool autoconnect();
private slots:
void plotWaveforms(MultiChannelWaveformData waveformData, ScopeSettings scopeSettings);
void on_actionConnect_triggered();
void on_actionInfo_triggered();
void on_cmdQuery_clicked();
void on_cmdSend_clicked();
void setTimebaseRange(double range);
void on_comboBoxReference_currentIndexChanged(int reference_mode);
void on_cmdStop_clicked();
void zoomTimebase(int amount);
void zoomVertical(int amount);
void updateChannelRange();
void on_checkBoxACLF_stateChanged();
void adjustXYAfterAutoscale(XYSettings autoscaleResult);
void on_cmdStart_clicked();
void on_chkEnabledCh1_stateChanged(int checkState);
void on_chkEnabledCh2_stateChanged(int checkState);
void on_chkEnabledCh3_stateChanged(int checkState);
void on_chkEnabledCh4_stateChanged(int checkState);
void on_cmdTriggerLevelSet_clicked();
void on_cmdTriggerHoldoffSet_clicked();
void on_comboBox_currentIndexChanged(const QString &channel);
void on_checkBoxNoiseReject_stateChanged(int checkState);
};