From 738ecbd5fad2b46836bfd6a94aeebf165ae2bbca Mon Sep 17 00:00:00 2001 From: Aleks Kissinger Date: Thu, 4 Jan 2018 16:00:52 +0100 Subject: relocated source code to the root --- src/gui/nodeitem.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/gui/nodeitem.h (limited to 'src/gui/nodeitem.h') diff --git a/src/gui/nodeitem.h b/src/gui/nodeitem.h new file mode 100644 index 0000000..9a3edb0 --- /dev/null +++ b/src/gui/nodeitem.h @@ -0,0 +1,32 @@ +/** + * A QGraphicsItem that handles drawing a single node. + */ + +#ifndef NODEITEM_H +#define NODEITEM_H + +#include "node.h" + +#include +#include +#include +#include + +class NodeItem : public QGraphicsItem +{ +public: + NodeItem(Node *node); + void readPos(); + void writePos(); + void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *); + QVariant itemChange(GraphicsItemChange change, const QVariant &value); + QPainterPath shape() const; + QRectF boundingRect() const; + Node *node() const; + +private: + Node *_node; + QRectF labelRect() const; +}; + +#endif // NODEITEM_H -- cgit v1.2.3