aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui/coreview.h
blob: fddcafef39e6c1860bf0150df191ed1ba715b6f5 (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
#ifndef COREVIEW_H
#define COREVIEW_H

#include <QGraphicsView>
#include <QGraphicsScene>
#include "qtmipsmachine.h"
#include "coreview/connection.h"
#include "coreview/programcounter.h"
#include "coreview/multiplexer.h"
#include "coreview/latch.h"
#include "coreview/alu.h"

class CoreView : public QGraphicsView {
public:
    CoreView(QWidget *parent);

private:
    void resizeEvent(QResizeEvent *event);
};

class CoreViewScene : public QGraphicsScene {
    Q_OBJECT
public:
    CoreViewScene(CoreView *view, machine::QtMipsMachine *machine);

private:
    machine::QtMipsMachine *machine;

    coreview::ProgramCounter *pc;
    coreview::Alu *alu;
    coreview::Multiplexer *pc_multiplexer;
    coreview::Connection *pc2pc;
    coreview::Latch *testlatch;
};

#else

class CoreView;
class CoreViewScene;

#endif // COREVIEW_H