-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathsvgitem.h
More file actions
44 lines (34 loc) · 1.07 KB
/
svgitem.h
File metadata and controls
44 lines (34 loc) · 1.07 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef SVGITEM_H
#define SVGITEM_H
#include <QGraphicsRectItem>
#include <QPainter>
#include "line.h"
#include <QDebug>
#include "circle.h"
#include "qbezier.h"
#include "polygon.h"
#include "arc.h"
#include "basicpolygon.h"
class SvgItem : public QGraphicsRectItem
{
public:
enum { Type = UserType + 15 };
explicit SvgItem(QGraphicsItem *parent = 0);
int type() const
{ return Type;}
protected:
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
public slots:
void setLineList(QList<Line*> list) { lineList = list; }
void setCircleList(QList<Circle*> list) { circleList = list; }
void setQBezierList(QList<QBezier*> list) { qBezierList = list; }
void setPolygonList(QList<BasicPolygon*> list) { polyList = list; }
void setArcList(QList<Arc*> list) { arcList = list; }
private:
QList<Line*> lineList;
QList<Circle*> circleList;
QList<QBezier*> qBezierList;
QList<BasicPolygon*> polyList;
QList<Arc*> arcList;
};
#endif // SVGITEM_H