diff options
author | Karel Kočí <cynerd@email.cz> | 2017-12-17 13:44:26 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2017-12-17 13:44:26 +0100 |
commit | 21da0f6723f3887d200917b4720dd22261e4420a (patch) | |
tree | 2146344bc1966cd248e21000c922cf0a127b0bde /qtmips_gui/coreview/alu.h | |
parent | 63163510aecfe19d976a9125ff2151698c4efb51 (diff) | |
download | qtmips-21da0f6723f3887d200917b4720dd22261e4420a.tar.gz qtmips-21da0f6723f3887d200917b4720dd22261e4420a.tar.bz2 qtmips-21da0f6723f3887d200917b4720dd22261e4420a.zip |
Implement alu for coreview
Diffstat (limited to 'qtmips_gui/coreview/alu.h')
-rw-r--r-- | qtmips_gui/coreview/alu.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/qtmips_gui/coreview/alu.h b/qtmips_gui/coreview/alu.h new file mode 100644 index 0000000..4c9a73b --- /dev/null +++ b/qtmips_gui/coreview/alu.h @@ -0,0 +1,37 @@ +#ifndef COREVIEW_ALU_H +#define COREVIEW_ALU_H + +#include <QGraphicsObject> +#include <qtmipsmachine.h> +#include "../coreview.h" +#include "connection.h" + +namespace coreview { + +class Alu : public QGraphicsObject { +public: + Alu(); + + QRectF boundingRect() const; + void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); + + void setPos(qreal x, qreal y); + const Connector *connector_in_a() const; + const Connector *connector_in_b() const; + const Connector *connector_out() const; + const Connector *connector_ctl() const; + +private: + QGraphicsSimpleTextItem name; + Connector *con_in_a, *con_in_b, *con_out, *con_ctl; +}; + +} + +#else + +namespace coreview { + class Alu; +} + +#endif // COREVIEW_ALU_H |