aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui/coreview/and.h
blob: ca0af300c9329fddf12beabb7d1032cc7fc9d031 (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_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