blob: 999c9667994a34d8062cb2ed5960a632724aae3c (
plain)
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
|
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QSettings>
#include "ui_MainWindow.h"
#include "newdialog.h"
#include "coreview.h"
#include "registersdock.h"
#include "programdock.h"
#include "memorydock.h"
#include "qtmipsmachine.h"
#include "machineconfig.h"
class MainWindow : public QMainWindow {
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
void start();
void create_core(const machine::MachineConfig &config);
bool configured();
public slots:
// Actions signals
void new_machine();
void machine_reload();
void show_registers();
void show_program();
void show_memory();
// Actions - execution speed
void set_speed();
// Machine signals
void machine_status(enum machine::QtMipsMachine::Status st);
void machine_exit();
void machine_trap(machine::QtMipsException &e);
protected:
void closeEvent(QCloseEvent *event);
private:
Ui::MainWindow *ui;
NewDialog *ndialog;
CoreView *coreview;
CoreViewScene *corescene;
RegistersDock *registers;
ProgramDock *program;
MemoryDock *memory;
// TODO implement cache docks
QActionGroup *speed_group;
QSettings *settings;
machine::QtMipsMachine *machine; // Current simulated machine
void show_dockwidget(QDockWidget *w);
};
#endif // MAINWINDOW_H
|