blob: 25d7351d6675b9b4d701d4c24ed7700822cfa2dd (
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
|
#ifndef COREVIEW_ALU_H
#define COREVIEW_ALU_H
#include <QGraphicsItem>
#include <qtmipsmachine.h>
#include "connection.h"
namespace coreview {
class Alu : public QGraphicsItem {
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;
};
}
#endif // COREVIEW_ALU_H
|