-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtune_dialog.h
73 lines (58 loc) · 1.24 KB
/
tune_dialog.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
68
69
70
71
72
73
#ifndef TUNEDIALOG_H
#define TUNEDIALOG_H
#include <QDialog>
#include <QPushButton>
#include <QLineEdit>
#include <QLabel>
#include <QDialogButtonBox>
#include <QApplication>
#include <QThread>
#include <QDebug>
#include "mainwindow.h"
#include "hamlibconnector.h"
class TuneThread;
class MainWindow;
class TuneDialog : public QObject
{
Q_OBJECT
public:
explicit TuneDialog(QObject *parent = nullptr);
~TuneDialog();
private slots:
void pb_ok_clicked(QAbstractButton *button);
private:
QDialog *dp;
QLabel *pLabel;
QLabel *swrLabel;
QDialogButtonBox *pbox;
TuneThread *tp;
QPushButton *close_pb;
QPushButton *tune_pb;
MainWindow *pMainWindow;
int tuning;
public:
HamlibConnector *pHamLib;
private slots:
void accept_clicked();
void tuneFinished();
void updateSWR(float s);
signals:
void setTune_sig(bool on);
};
class TuneThread : public QThread
{
Q_OBJECT
public:
explicit TuneThread();
TuneThread(QDialog *p);
virtual void run();
private:
QDialog *pDialog;
public:
HamlibConnector *pHamLib;
signals:
void reportSWR_sig();
void setTune_sig(int on);
void updateSWR(float s);
};
#endif // TUNEDIALOG_H