-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
111 lines (81 loc) · 2.21 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QDateTime>
#include <QLabel>
#include <QDate>
#include <QTimer>
#include <QDir>
#include <QFile>
#include <QFileDialog>
#include <QFileInfo>
#include <QMessageBox>
#include <QtSerialPort/QSerialPortInfo>
#include "logwindow.h"
#include "dbmanager.h"
#include "konfiguracja.h"
#include "rig.h"
#include "config.h"
#include "cbr.h"
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = nullptr);
~MainWindow();
void set_default_rst();
bool check_serial_port();
QString find_serial_port();
private slots:
void on_addbutton_clicked();
void on_clearbutton_clicked();
void on_savebutton_clicked();
void on_logbutton_clicked();
void on_quitbutton_clicked();
void on_run_stateChanged(int arg1);
void on_searchandwork_stateChanged(int arg1);
void showTime();
void showDate();
void showFreq();
void toUpper(const QString &text);
void on_actionZakoncz_triggered();
void on_actionNowy_2_triggered();
void on_actionZapisz_triggered();
void on_actionOtworz_triggered();
void on_actionUstawienia_triggered();
void on_actionPolacz_triggered();
void on_actionAutor_triggered();
void on_actionInformacja_triggered();
void on_actionRozlacz_triggered();
private:
Ui::MainWindow *ui;
QLabel* vfo_frequency = nullptr;
QDateTime* datetime = nullptr;
QTimer* timer = nullptr;
QFile* file_pointer = nullptr;
configuration* konf = nullptr;
logwindow* logw = nullptr;
QLabel* godzina = nullptr;
dbmanager* db = nullptr;
QLabel* data = nullptr;
QLabel* mode = nullptr;
cbr* cabrillo = nullptr;
RIG* r = nullptr;
QString serial_port;
QString log_dbname;
params cfg_params;
comcfg com_params;
rig_params rig;
int rig_model;
config cfg;
bool czy_stala_wymiana;
bool run_mode = true; // default mode is run
bool sandp_mode = false; // default mode is run
bool rig_connection = false;
QString configFile = "contest_logger.conf";
void oblicz_moja_wymiane(bool, QString&);
};
#endif // MAINWINDOW_H