summaryrefslogtreecommitdiff
path: root/src/gui/pathitem.h
blob: 7dc9c8031f37972990b3f4c2a424c921c1da20c5 (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
#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