blob: 67f09c578c327cc46c8c7b065ed3e5493d534f09 (
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#ifndef COREVIEW_REGISTERS_H
#define COREVIEW_REGISTERS_H
#include <QGraphicsObject>
#include <QPainter>
#include <QGraphicsSimpleTextItem>
#include "connection.h"
namespace coreview {
class Registers : public QGraphicsObject {
Q_OBJECT
public:
Registers();
~Registers();
QRectF boundingRect() const;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
void setPos(qreal x, qreal y);
const Connector *connector_read1() const;
const Connector *connector_read1_reg() const;
const Connector *connector_read2() const;
const Connector *connector_read2_reg() const;
const Connector *connector_write() const;
const Connector *connector_write_reg() const;
const Connector *connector_ctl_write() const;
signals:
void open_registers();
protected:
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
private:
Connector *con_read1, *con_read1_reg, *con_read2, *con_read2_reg;
Connector *con_write, *con_write_reg, *con_ctl_write;
QGraphicsSimpleTextItem name;
};
}
#endif // COREVIEW_REGISTERS_H
|