From e6ca4b4568e311b47239bfe83de15ed9e91c57b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Fri, 15 Dec 2017 22:45:28 +0100 Subject: Implement few initial graphic elements --- qtmips_gui/coreview.h | 46 +++++++++++++++++----------------------------- 1 file changed, 17 insertions(+), 29 deletions(-) (limited to 'qtmips_gui/coreview.h') diff --git a/qtmips_gui/coreview.h b/qtmips_gui/coreview.h index a2772fb..fc69861 100644 --- a/qtmips_gui/coreview.h +++ b/qtmips_gui/coreview.h @@ -2,45 +2,33 @@ #define COREVIEW_H #include -#include -#include -#include "machineconfig.h" +#include +#include "qtmipsmachine.h" +#include "coreview/connection.h" +#include "coreview/programcounter.h" +#include "coreview/multiplexer.h" +#include "coreview/latch.h" class CoreView : public QGraphicsView { Q_OBJECT public: - CoreView(QWidget *parent); + CoreView(QWidget *parent, QtMipsMachine *machine); private: + void resizeEvent(QResizeEvent *event); -}; + QGraphicsScene scene; + QtMipsMachine *machine; -/* -class CoreViewBlock : public QGraphicsItem { - Q_OBJECT -public: - CoreViewBlock(); + coreview::ProgramCounter *pc; + coreview::Multiplexer *pc_multiplexer; + coreview::Connection *pc2pc; + coreview::Latch *testlatch; }; -class CoreViewLine : public QGraphicsItem { - Q_OBJECT -public: - struct point { - int x1, y1, x2, y2; - }; - - CoreViewLine(); - CoreViewLine(struct point start, struct point end, QList axis); - ~CoreViewLine(); +#else - void set_start(struct point); - void set_end(struct point); - void set_axis(QList); - -protected: - struct point start, end; - QList axis; -}; -*/ +class CoreView; +class CoreViewBlock; #endif // COREVIEW_H -- cgit v1.2.3