aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui/coreview/and.h
diff options
context:
space:
mode:
Diffstat (limited to 'qtmips_gui/coreview/and.h')
-rw-r--r--qtmips_gui/coreview/and.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/qtmips_gui/coreview/and.h b/qtmips_gui/coreview/and.h
new file mode 100644
index 0000000..ca0af30
--- /dev/null
+++ b/qtmips_gui/coreview/and.h
@@ -0,0 +1,29 @@
+#ifndef COREVIEW_AND_H
+#define COREVIEW_AND_H
+
+#include <QGraphicsItem>
+#include <QVector>
+#include "connection.h"
+
+namespace coreview {
+
+class And : public QGraphicsItem {
+public:
+ And(unsigned size = 2);
+ ~And();
+
+ QRectF boundingRect() const;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
+
+ void setPos(qreal x, qreal y);
+ const Connector *connector_in(unsigned) const;
+ const Connector *connector_out() const;
+
+private:
+ QVector<Connector*> connectors;
+ Connector* con_out;
+};
+
+}
+
+#endif // COREVIEW_AND_H