From 506174a8266eb9842ff9e50a89ddf86cb975be30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 8 Jan 2018 21:43:58 +0100 Subject: Add coreview progress --- qtmips_gui/coreview/constant.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 qtmips_gui/coreview/constant.h (limited to 'qtmips_gui/coreview/constant.h') diff --git a/qtmips_gui/coreview/constant.h b/qtmips_gui/coreview/constant.h new file mode 100644 index 0000000..2d60f04 --- /dev/null +++ b/qtmips_gui/coreview/constant.h @@ -0,0 +1,35 @@ +#ifndef CONSTANT_H +#define CONSTANT_H + +#include +#include +#include +#include "connection.h" + +namespace coreview { + +class Constant : public QGraphicsObject { + Q_OBJECT +public: + Constant(const Connector *con, const QString &text); + ~Constant(); + + QRectF boundingRect() const; + void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); + + void set_text(const QString &text); + +private slots: + void ref_con_updated(QPointF); + +private: + QGraphicsSimpleTextItem text; + Connector *con_our; + Connection *conn; + + void set_text_pos(); +}; + +} + +#endif // CONSTANT_H -- cgit v1.2.3