-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
91 lines (80 loc) · 2.17 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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QGraphicsScene>
#include <QGraphicsRectItem>
#include <QGraphicsItem>
#include <QPlainTextEdit>
#include <QSlider>
#include <QLabel>
#include <QHash>
#include <QSplitter>
#include <QTabWidget>
#include <QTreeWidget>
#include <QTableWidget>
#include <QVBoxLayout>
#include <QGraphicsGridLayout>
#include <graphicsview.h>
#include <additemdialog.h>
#include <edititemdialog.h>
#include <interpreter.h>
#include <graphicsitems.h>
namespace Ui {
class MainWindow;
}
using interpreter::cstruct;
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget* parent = 0);
~MainWindow();
void updateAll();
private slots:
void on_actionAdd_Item_triggered();
void on_actionEdit_Item_triggered();
void interpretButton_clicked();
#ifdef QT_DEBUG
//debugging buttons
void printStackButton_clicked();
void printOffsetButton_clicked();
void printVarsButton_clicked();
#endif
void on_actionZoom_In_triggered();
void on_actionZoom_Out_triggered();
void on_actionAbout_Qt_triggered();
void on_actionRefresh_Visualisation_triggered();
void on_actionAbout_triggered();
public slots:
void structDefined(cstruct const& s);
signals:
void newStructDefinition(cstruct const& s);
private:
QMessageBox msgbox;
std::string const findByValue(const int value);
void updateStackTable();
void updateVariableTree();
void updateVisualisation();
Ui::MainWindow* ui;
std::map<std::string, cstruct> const& structs;
QTabWidget* tabWidget;
QTreeWidget* structTreeWidget;
QTreeWidget* variableTreeWidget;
QTableWidget* stackTableWidget;
QHash<QString, Graphics::GraphicsWidget*> items;
QGraphicsScene* scene;
QGraphicsGridLayout* layout;
GraphicsView* graphicsView;
QPlainTextEdit* interpreterInput;
QPushButton* interpretButton;
#ifdef QT_DEBUG
QPushButton* printStackButton;
QPushButton* printOffsetButton;
QPushButton* printVarsButton;
#endif
QSplitter* mainSplitter;
QSplitter* rightSplitter;
interpreter::Interpreter interpreter;
int row, column;
};
#endif // MAINWINDOW_H