-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
96 lines (80 loc) · 1.9 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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QtGui/QMainWindow>
#include <QtGui/QMessageBox>
#include <QTimer>
#include <QCheckBox>
#include <QThread>
#include "programmer.h"
#include "compile_dialog.h"
#include "setup_dialog.h"
#define VERSION "0.1.1"
namespace Ui
{
class MainWindow;
}
// supported file types
typedef enum {
HEX,
C
}file_types;
class Thread : public QThread
{
Q_OBJECT
public:
void run(QString filename);
QString editor_name;
};
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = 0);
~MainWindow();
enum mcu_type mcu;
setup_dialog *setup_win;
private:
Ui::MainWindow *ui;
file_types file_type;
compile_dialog *window;
hex_parser *parser;
programmer *prog;
QTimer *timer;
Thread *editor_thread;
QString opened_file;
QString directory; // last opened directory
int dev_found;
void writeSettings();
void readSettings();
void debug(QString str);
void enable_tab_func(bool en);
public slots:
void on_checkBox_stateChanged(int);
private slots:
void on_spi_data_tx_returnPressed();
void on_spi_m2_clicked();
void on_spi_m1_clicked();
void on_btn_add_00_clicked();
void on_btn_crcm_clicked();
void on_send_spi_data_clicked();
void on_btn_teminal_spi_send_clicked();
void on_UploadButton_clicked();
void on_EditFileButton_clicked();
void on_CompileButton_clicked();
void on_pushButton_clicked();
void on_clear_upload_btn_clicked();
void on_OpenFileButton_clicked();
void about();
void enterProgMode();
void resetModule();
void update_spi_status();
void test_signal();
void mcu_16f88();
void mcu_16f886();
void deviceAdded(const QString &udi);
void deviceRemoved(const QString &udi);
void toolsSetting();
signals:
void my_signal();
};
#endif // MAINWINDOW_H