QCAD Application Framework
CAD Application Development and Automation.
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
RLeaderEntity.h
Go to the documentation of this file.
1
#ifndef RLEADERENTITY_H
2
#define RLEADERENTITY_H
3
4
#include "
REntity.h
"
5
#include "
RLeaderData.h
"
6
7
class
RDocument
;
8
class
RExporter
;
9
17
class
RLeaderEntity
:
public
REntity
{
18
Q_DECLARE_TR_FUNCTIONS(
RLeaderEntity
)
19
20
public
:
21
static
RPropertyTypeId
PropertyCustom
;
22
static
RPropertyTypeId
PropertyHandle
;
23
static
RPropertyTypeId
PropertyType
;
24
static
RPropertyTypeId
PropertyBlock
;
25
static
RPropertyTypeId
PropertyLayer
;
26
static
RPropertyTypeId
PropertyLinetype
;
27
static
RPropertyTypeId
PropertyLineweight
;
28
static
RPropertyTypeId
PropertyColor
;
29
static
RPropertyTypeId
PropertyDrawOrder
;
30
31
static
RPropertyTypeId
PropertyArrowHead
;
32
static
RPropertyTypeId
PropertyVertexNX
;
33
static
RPropertyTypeId
PropertyVertexNY
;
34
static
RPropertyTypeId
PropertyVertexNZ
;
35
36
public
:
37
RLeaderEntity
(
RDocument
*
document
,
const
RLeaderData
&
data
,
38
RObject::Id
objectId
=
RObject::INVALID_ID
);
39
virtual
~RLeaderEntity
();
40
41
static
void
init
();
42
43
virtual
RLeaderEntity
*
clone
()
const
{
44
return
new
RLeaderEntity
(*
this
);
45
}
46
47
virtual
RS::EntityType
getType
()
const
{
48
return
RS::EntityLeader
;
49
}
50
51
bool
setProperty
(
RPropertyTypeId
propertyTypeId,
const
QVariant& value);
52
QPair<QVariant, RPropertyAttributes>
getProperty
(
53
RPropertyTypeId
propertyTypeId,
54
bool
humanReadable =
false
,
bool
noAttributes =
false
);
55
56
virtual
RLeaderData
&
getData
() {
57
return
data
;
58
}
59
60
void
setData
(
RLeaderData
& d) {
61
data
= d;
62
}
63
64
virtual
const
RLeaderData
&
getData
()
const
{
65
return
data
;
66
}
67
68
void
setArrowHead
(
bool
on) {
69
data
.
setArrowHead
(on);
70
}
71
72
bool
hasArrowHead
()
const
{
73
return
data
.
hasArrowHead
();
74
}
75
76
void
clear
() {
77
data
.
clear
();
78
}
79
80
void
normalize
() {
81
data
.
normalize
();
82
}
83
84
int
countVertices
()
const
{
85
return
data
.
countVertices
();
86
}
87
88
void
appendVertex
(
const
RVector
& vertex) {
89
data
.
appendVertex
(vertex);
90
}
91
92
void
prependVertex
(
const
RVector
& vertex) {
93
data
.
prependVertex
(vertex);
94
}
95
96
void
insertVertex
(
int
index,
const
RVector
& vertex) {
97
data
.
insertVertex
(index, vertex);
98
}
99
100
RVector
getVertexAt
(
int
i)
const
{
101
return
data
.
getVertexAt
(i);
102
}
103
104
void
removeLastVertex
() {
105
data
.
removeLastVertex
();
106
}
107
108
void
removeVertex
(
int
index) {
109
data
.
removeVertex
(index);
110
}
111
112
int
countSegments
()
const
{
113
return
data
.
countSegments
();
114
}
115
116
QSharedPointer<RShape>
getSegmentAt
(
int
i)
const
{
117
return
data
.
getSegmentAt
(i);
118
}
119
120
double
getBulgeAt
(
int
i)
const
{
121
return
data
.
getBulgeAt
(i);
122
}
123
124
void
setBulgeAt
(
int
i,
double
b) {
125
data
.
setBulgeAt
(i, b);
126
}
127
128
double
getDirection1
()
const
{
129
return
data
.
getDirection1
();
130
}
131
132
double
getDirection2
()
const
{
133
return
data
.
getDirection2
();
134
}
135
136
RVector
getEndPoint
()
const
{
137
return
data
.
getEndPoint
();
138
}
139
140
RVector
getStartPoint
()
const
{
141
return
data
.
getStartPoint
();
142
}
143
144
void
setClosed
(
bool
on) {
145
data
.
setClosed
(on);
146
}
147
148
bool
isClosed
()
const
{
149
return
data
.
isClosed
();
150
}
151
152
QList<QSharedPointer<RShape> >
getExploded
()
const
{
153
return
data
.
getExploded
();
154
}
155
156
virtual
void
exportEntity
(
RExporter
& e,
bool
preview=
false
)
const
;
157
158
protected
:
159
virtual
void
print
(QDebug dbg)
const
;
160
161
protected
:
162
RLeaderData
data
;
163
};
164
165
Q_DECLARE_METATYPE
(
RLeaderEntity
*)
166
Q_DECLARE_METATYPE
(QSharedPointer<
RLeaderEntity
>)
167
Q_DECLARE_METATYPE
(QSharedPointer<
RLeaderEntity
>*)
168
169
#endif
src
entity
RLeaderEntity.h
Generated on Tue Jun 26 2012 18:41:08 for QCAD Application Framework by
1.8.1.1