summaryrefslogtreecommitdiff
path: root/src/gui/pathitem.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/pathitem.h')
-rw-r--r--src/gui/pathitem.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/gui/pathitem.h b/src/gui/pathitem.h
new file mode 100644
index 0000000..7dc9c80
--- /dev/null
+++ b/src/gui/pathitem.h
@@ -0,0 +1,28 @@
+#ifndef PATHITEM_H
+#define PATHITEM_H
+
+#include "path.h"
+
+#include <QGraphicsItem>
+
+class PathItem : public QGraphicsItem
+{
+public:
+ PathItem(Path *path);
+ void readPos();
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) override;
+
+ Path *path() const;
+
+ QPainterPath painterPath() const;
+ void setPainterPath(const QPainterPath &painterPath);
+
+ QRectF boundingRect() const override;
+
+private:
+ Path *_path;
+ QPainterPath _painterPath;
+ QRectF _boundingRect;
+};
+
+#endif // PATHITEM_H