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
REllipseEntity.h
Go to the documentation of this file.
1
#ifndef RELLIPSEENTITY_H
2
#define RELLIPSEENTITY_H
3
4
#include "
REntity.h
"
5
#include "
REllipseData.h
"
6
#include "
RLineweight.h
"
7
8
class
RDocument
;
9
class
RExporter
;
10
18
class
REllipseEntity
:
public
REntity
{
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
PropertyCenterX
;
32
static
RPropertyTypeId
PropertyCenterY
;
33
static
RPropertyTypeId
PropertyCenterZ
;
34
static
RPropertyTypeId
PropertyMajorPointX
;
35
static
RPropertyTypeId
PropertyMajorPointY
;
36
static
RPropertyTypeId
PropertyMajorPointZ
;
37
static
RPropertyTypeId
PropertyRatio
;
38
static
RPropertyTypeId
PropertyStartParam
;
39
static
RPropertyTypeId
PropertyEndParam
;
40
static
RPropertyTypeId
PropertyStartAngle
;
41
static
RPropertyTypeId
PropertyEndAngle
;
42
static
RPropertyTypeId
PropertyReversed
;
43
44
static
RPropertyTypeId
PropertyStartPointX
;
45
static
RPropertyTypeId
PropertyStartPointY
;
46
static
RPropertyTypeId
PropertyStartPointZ
;
47
static
RPropertyTypeId
PropertyEndPointX
;
48
static
RPropertyTypeId
PropertyEndPointY
;
49
static
RPropertyTypeId
PropertyEndPointZ
;
50
51
static
RPropertyTypeId
PropertyCircumference
;
52
53
public
:
54
REllipseEntity
(
RDocument
*
document
,
const
REllipseData
&
data
,
55
RObject::Id
objectId
=
RObject::INVALID_ID
);
56
virtual
~REllipseEntity
();
57
58
static
void
init
();
59
60
virtual
REllipseEntity
*
clone
()
const
{
61
return
new
REllipseEntity
(*
this
);
62
}
63
64
virtual
RS::EntityType
getType
()
const
{
65
return
RS::EntityEllipse
;
66
}
67
68
void
setShape
(
const
REllipse
& e);
69
70
bool
setProperty
(
RPropertyTypeId
propertyTypeId,
const
QVariant& value);
71
QPair<QVariant, RPropertyAttributes>
getProperty
(
72
RPropertyTypeId
propertyTypeId,
73
bool
humanReadable =
false
,
bool
noAttributes =
false
);
74
75
virtual
void
exportEntity
(
RExporter
& e,
bool
preview=
false
)
const
;
76
77
virtual
REllipseData
&
getData
() {
78
return
data
;
79
}
80
81
virtual
const
REllipseData
&
getData
()
const
{
82
return
data
;
83
}
84
85
RVector
getCenter
()
const
{
86
return
data
.
getCenter
();
87
}
88
89
RVector
getMajorPoint
()
const
{
90
return
data
.
getMajorPoint
();
91
}
92
93
double
getMajorRadius
()
const
{
94
return
data
.
getMajorRadius
();
95
}
96
97
double
getMinorRadius
()
const
{
98
return
data
.
getMinorRadius
();
99
}
100
101
double
getRatio
()
const
{
102
return
data
.
getRatio
();
103
}
104
105
double
getAngle
()
const
{
106
return
data
.
getAngle
();
107
}
108
109
void
setRatio
(
double
ratio) {
110
data
.
setRatio
(ratio);
111
}
112
113
double
getStartAngle
()
const
{
114
return
data
.
getStartAngle
();
115
}
116
117
double
getStartParam
()
const
{
118
return
data
.
getStartParam
();
119
}
120
121
void
setStartParam
(
double
param) {
122
data
.
setStartParam
(param);
123
}
124
125
double
getEndAngle
()
const
{
126
return
data
.
getEndAngle
();
127
}
128
129
double
getEndParam
()
const
{
130
return
data
.
getEndParam
();
131
}
132
133
void
setEndParam
(
double
param) {
134
data
.
setEndParam
(param);
135
}
136
137
double
getAngleLength
()
const
{
138
return
data
.
getAngleLength
();
139
}
140
141
bool
isReversed
()
const
{
142
return
data
.
isReversed
();
143
}
144
145
void
setRevered
(
bool
reversed) {
146
data
.
setReversed
(reversed);
147
}
148
149
RVector
getStartPoint
()
const
{
150
return
data
.
getStartPoint
();
151
}
152
153
RVector
getEndPoint
()
const
{
154
return
data
.
getEndPoint
();
155
}
156
157
bool
isFullEllipse
()
const
{
158
return
data
.
isFullEllipse
();
159
}
160
161
virtual
bool
reverse
() {
162
return
data
.
reverse
();
163
}
164
165
double
getParamTo
(
const
RVector
& pos) {
166
return
data
.
getParamTo
(pos);
167
}
168
169
RS::Ending
getTrimEnd
(
const
RVector
& coord,
170
const
RVector
& trimPoint) {
171
return
data
.
getTrimEnd
(coord, trimPoint);
172
}
173
174
void
trimStartPoint
(
const
RVector
& p) {
175
return
data
.
trimStartPoint
(p);
176
}
177
178
void
trimEndPoint
(
const
RVector
& p) {
179
return
data
.
trimEndPoint
(p);
180
}
181
182
protected
:
183
virtual
void
print
(QDebug dbg)
const
;
184
185
protected
:
186
REllipseData
data
;
187
};
188
189
Q_DECLARE_METATYPE
(
REllipseEntity
*)
190
Q_DECLARE_METATYPE
(QSharedPointer<
REllipseEntity
>)
191
Q_DECLARE_METATYPE
(QSharedPointer<
REllipseEntity
>*)
192
193
#endif
src
entity
REllipseEntity.h
Generated on Tue Jun 26 2012 18:41:08 for QCAD Application Framework by
1.8.1.1