diff options
author | Gard Spreemann <gspr@nonempty.org> | 2020-08-20 09:03:17 +0200 |
---|---|---|
committer | Gard Spreemann <gspr@nonempty.org> | 2020-08-20 09:03:17 +0200 |
commit | 4e1b4e9877732d1e1887674e48312902437f08c5 (patch) | |
tree | 7993cbc3ad71eed10da830aca85ef0b99d163bac /src/gui/pathitem.h | |
parent | 99f00a3ef9d1bd2d686b1521d25c9afedb880b34 (diff) | |
parent | 300267089b80785551c4721684280efe654ec834 (diff) |
Merge tag 'v2.1.6' into debian/sid
Diffstat (limited to 'src/gui/pathitem.h')
-rw-r--r-- | src/gui/pathitem.h | 28 |
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 |