-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathGeometry.h
63 lines (57 loc) · 1.27 KB
/
Geometry.h
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef GEOMETRY_H
#define GEOMETRY_H
#include <QObject>
#include <QVariant>
#include <QGraphicsObject>
#include <QPainter>
#include <QLabel>
#include <QUuid>
#include <QDebug>
#include "ilong_global.h"
/*
* 图元基类,提供所有点类和面类的基本结构
* */
class ILONGSHARED_EXPORT Geometry : public QGraphicsObject
{
Q_OBJECT
public:
/*
* 插入图元结构
* */
typedef struct
{
Geometry * geometry; //图元
QList<QVariant> data; //一行数据放到data列表里
} ILongDataType;
explicit Geometry(ILongGeoType gType,quint8 lWidth, QColor iPen, QColor iBrush);
ILongGeoRect getRect();
ILongGeoType getGeoType();
QPointF getCenter();
QString getPen();
QString getBrush();
QString getPoints();
quint8 getLineWidth();
quint8 getSize();
quint32 getID();
int getDir();
bool getCloseFlag();
void rotate(int dir);
void setLabel(QString lb);
QString getLabel();
int getLabelPixeSize();
protected:
void checkRect();
QList<QPointF> list;
ILongGeoType geoType;
QColor pen, brush;
quint8 lineWidth;
int size;
ILongGeoRect rect;
quint32 itemID;
QString label;
int dir;
bool closeFlag;
signals:
public slots:
};
#endif // GEOMETRY_H