aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui/coreview/alu.h
blob: 288de87cc10ec1314b3d3756a0e9691bc32d7b2b (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
#ifndef COREVIEW_ALU_H
#define COREVIEW_ALU_H

#include <QGraphicsItem>
#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