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
RHatchEntity.h
Go to the documentation of this file.
1
#ifndef RHATCHENTITY_H
2
#define RHATCHENTITY_H
3
4
#include "
REntity.h
"
5
#include "
RHatchData.h
"
6
7
class
RDocument
;
8
class
RExporter
;
9
17
class
RHatchEntity
:
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
30
static
RPropertyTypeId
PropertySolid
;
31
32
static
RPropertyTypeId
PropertyPatternName
;
33
static
RPropertyTypeId
PropertyScaleFactor
;
34
static
RPropertyTypeId
PropertyAngle
;
35
36
static
RPropertyTypeId
PropertyVertexNX
;
37
static
RPropertyTypeId
PropertyVertexNY
;
38
static
RPropertyTypeId
PropertyVertexNZ
;
39
40
public
:
41
RHatchEntity
(
RDocument
*
document
,
const
RHatchData
&
data
,
42
RObject::Id
objectId
=
RObject::INVALID_ID
);
43
virtual
~RHatchEntity
();
44
45
static
void
init
();
46
47
virtual
RHatchEntity
*
clone
()
const
;
48
49
virtual
RS::EntityType
getType
()
const
{
50
return
RS::EntityHatch
;
51
}
52
53
bool
setProperty
(
RPropertyTypeId
propertyTypeId,
const
QVariant& value);
54
bool
setBoundaryVector
(
RObject::XYZ
xyz,
const
QVariant& value,
bool
condition);
55
RVector
setComponent
(
const
RVector
& p,
double
v,
RObject::XYZ
xyz);
56
57
QPair<QVariant, RPropertyAttributes>
getProperty
(
58
RPropertyTypeId
propertyTypeId,
59
bool
humanReadable =
false
,
bool
noAttributes =
false
);
60
61
virtual
void
exportEntity
(
RExporter
& e,
bool
preview=
false
)
const
;
62
63
virtual
RHatchData
&
getData
() {
64
return
data
;
65
}
66
67
virtual
const
RHatchData
&
getData
()
const
{
68
return
data
;
69
}
70
71
RPainterPath
getPainterPath
(
bool
draft =
false
)
const
{
72
return
data
.
getPainterPath
(draft);
73
}
74
75
virtual
int
getComplexity
()
const
{
76
return
data
.
getPainterPath
(
false
).
getElementCount
();
77
}
78
79
void
newLoop
() {
80
data
.
newLoop
();
81
}
82
83
void
addBoundary
(QSharedPointer<RShape> shape) {
84
data
.
addBoundary
(shape);
85
}
86
87
bool
isSolid
()
const
{
88
return
data
.
isSolid
();
89
}
90
91
int
getLoopCount
()
const
{
92
return
data
.
getLoopCount
();
93
}
94
95
QList<QSharedPointer<RShape> >
getLoopBoundary
(
int
index)
const
{
96
return
data
.
getLoopBoundary
(index);
97
}
98
99
virtual
QList<QSharedPointer<RShape> >
getShapes
(
const
RBox
& queryBox =
RDEFAULT_RBOX
)
const
{
100
return
data
.
getShapes
(queryBox);
101
}
102
103
virtual
QList<QSharedPointer<RShape> >
getExploded
()
const
{
104
return
data
.
getExploded
();
105
}
106
107
protected
:
108
virtual
void
print
(QDebug dbg)
const
;
109
110
protected
:
111
RHatchData
data
;
112
};
113
114
Q_DECLARE_METATYPE
(
RHatchEntity
*)
115
Q_DECLARE_METATYPE
(QSharedPointer<
RHatchEntity
>)
116
Q_DECLARE_METATYPE
(QSharedPointer<
RHatchEntity
>*)
117
118
#endif
src
entity
RHatchEntity.h
Generated on Tue Jun 26 2012 18:41:08 for QCAD Application Framework by
1.8.1.1