-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainwindow.hpp
79 lines (64 loc) · 2.14 KB
/
mainwindow.hpp
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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <map>
#include "runwindow.h"
#include <QMainWindow>
#include "Block.hpp"
#include "Func_Block.hpp"
#include "Visible_Block.hpp"
#include "dataStorage.hpp"
#include "drawpalette.h"
#include "logicline.h"
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
Ui::MainWindow const *get_ui() const { return ui; }
RunWindow* &get_runWindow() { return runWindow; }
std::map<std::string, Visible_Block*>* *getCurrentVBPool() {return &visible_block_pool;}
private slots:
void on_runButton_clicked();
void on_clearButton_clicked();
void when_runWindow_closed();
void _on_logicWireButton_toggled(bool checked);
void on_andButton_clicked();
void on_assignmentButton_clicked();
void on_biggerThanButton_clicked();
void on_divisionButton_clicked();
void on_equalButton_clicked();
void on_funcDefButton_clicked();
void on_ifButton_clicked();
void on_minusButton_clicked();
void on_multiplyButton_clicked();
void on_notButton_clicked();
void on_orButton_clicked();
void on_plusButton_clicked();
void on_printButton_clicked();
void on_smallerThanButton_clicked();
void on_startButton_clicked();
void on_takeIndSetButton_clicked();
void on_takeIndGetButton_clicked();
void on_varDefButton_clicked();
void on_whileButton_clicked();
void eraseBlock(std::string deleteName);
void hideAllFlowBlk();
void hideAllLine();
void retrieveAllFlowBlk();
void retrieveAllLine();
void add_user_func_blk(std::string addFuncName);
void switch_user_func(std::string targetFuncName);
private:
Ui::MainWindow *ui;
RunWindow *runWindow {nullptr};
std::string currentFunc {}; //name of the current function
std::map<std::string, Visible_Block*> *visible_block_pool; // connect name and visible_block
std::map<std::string, std::vector<LogicLine*>*> visibleLine_pool;
DrawPalette *dp;
std::string getAvailName(std::string prefix);
};
#endif // MAINWINDOW_H