aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui/coreview/junction.h
blob: 1a8f5d77919c3550cf3ec2796c3d53a02546600a (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
#ifndef JUNCTION_H
#define JUNCTION_H

#include <QGraphicsItem>
#include <QPainter>
#include <QList>
#include "connection.h"

namespace coreview {

class Junction : public QGraphicsItem {
public:
    Junction();
    ~Junction();

    QRectF boundingRect() const;
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);

    void setPos(qreal x, qreal y);
    Connector *new_connector(qreal angle);

private:
    QList<Connector*> cons;
};

}

#endif // JUNCTION_H