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
RLineEntity.h
Go to the documentation of this file.
1
#ifndef RLINEENTITY_H
2
#define RLINEENTITY_H
3
4
#include "
REntity.h
"
5
#include "
RLineData.h
"
6
7
class
RDocument
;
8
class
RExporter
;
9
17
class
RLineEntity
:
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
PropertyStartPointX
;
31
static
RPropertyTypeId
PropertyStartPointY
;
32
static
RPropertyTypeId
PropertyStartPointZ
;
33
static
RPropertyTypeId
PropertyEndPointX
;
34
static
RPropertyTypeId
PropertyEndPointY
;
35
static
RPropertyTypeId
PropertyEndPointZ
;
36
37
static
RPropertyTypeId
PropertyAngle
;
38
static
RPropertyTypeId
PropertyLength
;
39
40
public
:
41
RLineEntity
(
RDocument
*
document
,
const
RLineData
&
data
,
42
RObject::Id
objectId
=
RObject::INVALID_ID
);
43
virtual
~RLineEntity
();
44
45
static
void
init
();
46
47
virtual
RLineEntity
*
clone
()
const
{
48
return
new
RLineEntity
(*
this
);
49
}
50
51
virtual
RS::EntityType
getType
()
const
{
52
return
RS::EntityLine
;
53
}
54
55
bool
setProperty
(
RPropertyTypeId
propertyTypeId,
const
QVariant& value);
56
QPair<QVariant, RPropertyAttributes>
getProperty
(
57
RPropertyTypeId
propertyTypeId,
58
bool
humanReadable =
false
,
bool
noAttributes =
false
);
59
60
virtual
void
exportEntity
(
RExporter
& e,
bool
preview=
false
)
const
;
61
62
virtual
RLineData
&
getData
() {
63
return
data
;
64
}
65
66
virtual
const
RLineData
&
getData
()
const
{
67
return
data
;
68
}
69
70
void
setShape
(
const
RLine
& l);
71
72
void
setStartPoint
(
const
RVector
& p) {
73
data
.
setStartPoint
(p);
74
}
75
76
RVector
getStartPoint
()
const
{
77
return
data
.
getStartPoint
();
78
}
79
80
void
setEndPoint
(
const
RVector
& p) {
81
data
.
setEndPoint
(p);
82
}
83
84
RVector
getEndPoint
()
const
{
85
return
data
.
getEndPoint
();
86
}
87
88
double
getAngle
()
const
{
89
return
data
.
getAngle
();
90
}
91
92
double
getDirection1
()
const
{
93
return
data
.
getDirection1
();
94
}
95
96
double
getDirection2
()
const
{
97
return
data
.
getDirection2
();
98
}
99
100
bool
reverse
() {
101
return
data
.
reverse
();
102
}
103
104
RS::Side
getSideOfPoint
(
const
RVector
& point)
const
{
105
return
data
.
getSideOfPoint
(point);
106
}
107
108
RS::Ending
getTrimEnd
(
const
RVector
& coord,
109
const
RVector
& trimPoint) {
110
return
data
.
getTrimEnd
(coord, trimPoint);
111
}
112
113
void
trimStartPoint
(
const
RVector
& p) {
114
return
data
.
trimStartPoint
(p);
115
}
116
void
trimEndPoint
(
const
RVector
& p) {
117
return
data
.
trimEndPoint
(p);
118
}
119
120
double
getLength
()
const
{
121
return
data
.
getLength
();
122
}
123
124
protected
:
125
virtual
void
print
(QDebug dbg)
const
;
126
127
protected
:
128
RLineData
data
;
129
};
130
131
Q_DECLARE_METATYPE
(
RLineEntity
*)
132
Q_DECLARE_METATYPE
(QSharedPointer<
RLineEntity
>)
133
Q_DECLARE_METATYPE
(QSharedPointer<
RLineEntity
>*)
134
135
#endif
src
entity
RLineEntity.h
Generated on Tue Jun 26 2012 18:41:08 for QCAD Application Framework by
1.8.1.1