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
RCircleEntity.h
Go to the documentation of this file.
1
#ifndef RCIRCLENTITY_H
2
#define RCIRCLENTITY_H
3
4
#include "
REntity.h
"
5
#include "
RCircleData.h
"
6
7
class
RDocument
;
8
class
RExporter
;
9
17
class
RCircleEntity
:
public
REntity
{
18
19
public
:
20
static
RPropertyTypeId
PropertyCustom
;
21
static
RPropertyTypeId
PropertyHandle
;
22
static
RPropertyTypeId
PropertyType
;
23
static
RPropertyTypeId
PropertyBlock
;
24
static
RPropertyTypeId
PropertyLayer
;
25
static
RPropertyTypeId
PropertyLinetype
;
26
static
RPropertyTypeId
PropertyLineweight
;
27
static
RPropertyTypeId
PropertyColor
;
28
static
RPropertyTypeId
PropertyDrawOrder
;
29
static
RPropertyTypeId
PropertyCenterX
;
30
static
RPropertyTypeId
PropertyCenterY
;
31
static
RPropertyTypeId
PropertyCenterZ
;
32
static
RPropertyTypeId
PropertyRadius
;
33
34
static
RPropertyTypeId
PropertyDiameter
;
35
static
RPropertyTypeId
PropertyCircumference
;
36
static
RPropertyTypeId
PropertyArea
;
37
38
public
:
39
RCircleEntity
(
RDocument
*
document
,
const
RCircleData
&
data
,
40
RObject::Id
objectId
=
RObject::INVALID_ID
);
41
virtual
~RCircleEntity
();
42
43
static
void
init
();
44
45
virtual
RCircleEntity
*
clone
()
const
{
46
return
new
RCircleEntity
(*
this
);
47
}
48
49
virtual
RS::EntityType
getType
()
const
{
50
return
RS::EntityCircle
;
51
}
52
53
bool
setProperty
(
RPropertyTypeId
propertyTypeId,
const
QVariant& value);
54
QPair<QVariant, RPropertyAttributes>
getProperty
(
55
RPropertyTypeId
propertyTypeId,
56
bool
humanReadable =
false
,
bool
noAttributes =
false
);
57
58
virtual
void
exportEntity
(
RExporter
& e,
bool
preview=
false
)
const
;
59
60
virtual
RCircleData
&
getData
() {
61
return
data
;
62
}
63
64
virtual
const
RCircleData
&
getData
()
const
{
65
return
data
;
66
}
67
68
RVector
getCenter
()
const
{
69
return
data
.
getCenter
();
70
}
71
72
double
getRadius
() {
73
return
data
.
getRadius
();
74
}
75
76
void
setRadius
(
double
radius) {
77
data
.
setRadius
(radius);
78
}
79
80
protected
:
81
virtual
void
print
(QDebug dbg)
const
;
82
83
protected
:
84
RCircleData
data
;
85
};
86
87
Q_DECLARE_METATYPE
(
RCircleEntity
*)
88
Q_DECLARE_METATYPE
(QSharedPointer<
RCircleEntity
>)
89
Q_DECLARE_METATYPE
(QSharedPointer<
RCircleEntity
>*)
90
91
#endif
src
entity
RCircleEntity.h
Generated on Tue Jun 26 2012 18:41:07 for QCAD Application Framework by
1.8.1.1