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
RBlockReferenceEntity.h
Go to the documentation of this file.
1
#ifndef RBLOCKREFERENCEENTITY_H
2
#define RBLOCKREFERENCEENTITY_H
3
4
#include "
REntity.h
"
5
#include "
RBlockReferenceData.h
"
6
7
class
RDocument
;
8
class
RExporter
;
9
15
class
RBlockReferenceEntity
:
public
REntity
{
16
17
public
:
18
static
RPropertyTypeId
PropertyCustom
;
19
static
RPropertyTypeId
PropertyHandle
;
20
static
RPropertyTypeId
PropertyType
;
21
static
RPropertyTypeId
PropertyBlock
;
22
static
RPropertyTypeId
PropertyLayer
;
23
static
RPropertyTypeId
PropertyLinetype
;
24
static
RPropertyTypeId
PropertyLineweight
;
25
static
RPropertyTypeId
PropertyColor
;
26
static
RPropertyTypeId
PropertyDrawOrder
;
27
28
static
RPropertyTypeId
PropertyReferencedBlock
;
29
static
RPropertyTypeId
PropertyPositionX
;
30
static
RPropertyTypeId
PropertyPositionY
;
31
static
RPropertyTypeId
PropertyPositionZ
;
32
static
RPropertyTypeId
PropertyScaleX
;
33
static
RPropertyTypeId
PropertyScaleY
;
34
static
RPropertyTypeId
PropertyScaleZ
;
35
static
RPropertyTypeId
PropertyRotation
;
36
37
public
:
38
RBlockReferenceEntity
(
RDocument
*
document
,
const
RBlockReferenceData
&
data
,
39
RObject::Id
objectId
=
RObject::INVALID_ID
);
40
virtual
~RBlockReferenceEntity
();
41
42
static
void
init
();
43
44
virtual
RBlockReferenceEntity
*
clone
()
const
{
45
return
new
RBlockReferenceEntity
(*
this
);
46
}
47
48
virtual
RS::EntityType
getType
()
const
{
49
return
RS::EntityBlockRef
;
50
}
51
52
bool
setProperty
(
RPropertyTypeId
propertyTypeId,
const
QVariant& value);
53
QPair<QVariant, RPropertyAttributes>
getProperty
(
54
RPropertyTypeId
propertyTypeId,
55
bool
humanReadable =
false
,
bool
noAttributes =
false
);
56
57
virtual
void
exportEntity
(
RExporter
& e,
bool
preview =
false
)
const
;
58
59
virtual
RBlockReferenceData
&
getData
() {
60
return
data
;
61
}
62
63
virtual
const
RBlockReferenceData
&
getData
()
const
{
64
return
data
;
65
}
66
67
RVector
getPosition
()
const
{
68
return
data
.
getPosition
();
69
}
70
71
RVector
getScaleFactors
()
const
{
72
return
data
.
getScaleFactors
();
73
}
74
75
double
getRotation
()
const
{
76
return
data
.
getRotation
();
77
}
78
79
void
setReferencedBlockId
(
RBlock::Id
blockId) {
80
data
.
setReferencedBlockId
(blockId);
81
}
82
83
RBlock::Id
getReferencedBlockId
()
const
{
84
return
data
.
getReferencedBlockId
();
85
}
86
87
QString
getReferencedBlockName
()
const
{
88
return
data
.
getReferencedBlockName
();
89
}
90
91
virtual
void
update
()
const
{
92
data
.
update
();
93
}
94
95
void
update
(
REntity::Id
entityId)
const
{
96
data
.
update
(entityId);
97
}
98
102
virtual
void
print
(QDebug dbg)
const
;
103
104
protected
:
105
RBlockReferenceData
data
;
106
mutable
int
recursionDepth
;
107
};
108
109
Q_DECLARE_METATYPE
(
RBlockReferenceEntity
*)
110
Q_DECLARE_METATYPE
(QSharedPointer<
RBlockReferenceEntity
>)
111
Q_DECLARE_METATYPE
(QSharedPointer<
RBlockReferenceEntity
>*)
112
Q_DECLARE_METATYPE
(QStack<
RBlockReferenceEntity
*>*);
113
114
#endif
src
core
RBlockReferenceEntity.h
Generated on Tue Jun 26 2012 18:41:07 for QCAD Application Framework by
1.8.1.1