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
RDimensionEntity.h
Go to the documentation of this file.
1
#ifndef RDIMENSIONENTITY_H
2
#define RDIMENSIONENTITY_H
3
4
#include "
REntity.h
"
5
#include "
RDimensionData.h
"
6
7
class
RDocument
;
8
class
RExporter
;
9
17
class
RDimensionEntity
:
public
REntity
{
18
19
Q_DECLARE_TR_FUNCTIONS(
RDimensionEntity
)
20
21
public
:
22
static
RPropertyTypeId
PropertyCustom
;
23
static
RPropertyTypeId
PropertyHandle
;
24
static
RPropertyTypeId
PropertyType
;
25
static
RPropertyTypeId
PropertyBlock
;
26
static
RPropertyTypeId
PropertyLayer
;
27
static
RPropertyTypeId
PropertyLinetype
;
28
static
RPropertyTypeId
PropertyLineweight
;
29
static
RPropertyTypeId
PropertyColor
;
30
static
RPropertyTypeId
PropertyDrawOrder
;
31
32
static
RPropertyTypeId
PropertyDefinitionPointX
;
33
static
RPropertyTypeId
PropertyDefinitionPointY
;
34
static
RPropertyTypeId
PropertyDefinitionPointZ
;
35
static
RPropertyTypeId
PropertyMiddleOfTextX
;
36
static
RPropertyTypeId
PropertyMiddleOfTextY
;
37
static
RPropertyTypeId
PropertyMiddleOfTextZ
;
38
static
RPropertyTypeId
PropertyText
;
39
static
RPropertyTypeId
PropertyUpperTolerance
;
40
static
RPropertyTypeId
PropertyLowerTolerance
;
41
//static RPropertyTypeId PropertyFontName;
42
//static RPropertyTypeId PropertyHeight;
43
//static RPropertyTypeId PropertyAngle;
44
//static RPropertyTypeId PropertyLineSpacingFactor;
45
//static RPropertyTypeId PropertyHAlign;
46
//static RPropertyTypeId PropertyVAlign;
47
48
static
RPropertyTypeId
PropertyMeasuredValue
;
49
50
public
:
51
RDimensionEntity
(
RDocument
*
document
,
RObject::Id
objectId
=
RObject::INVALID_ID
);
52
virtual
~RDimensionEntity
();
53
54
static
void
init
();
55
56
virtual
RS::EntityType
getType
()
const
{
57
return
RS::EntityDimension
;
58
}
59
60
bool
setProperty
(
RPropertyTypeId
propertyTypeId,
const
QVariant& value);
61
QPair<QVariant, RPropertyAttributes>
getProperty
(
62
RPropertyTypeId
propertyTypeId,
63
bool
humanReadable =
false
,
bool
noAttributes =
false
);
64
65
virtual
void
exportEntity
(
RExporter
& e,
bool
preview=
false
)
const
;
66
67
virtual
RDimensionData
&
getData
() = 0;
68
69
virtual
const
RDimensionData
&
getData
()
const
= 0;
70
71
virtual
bool
isValid
()
const
{
72
return
getData
().
isValid
();
73
}
74
75
void
setDefinitionPoint
(
const
RVector
& p) {
76
getData
().
setDefinitionPoint
(p);
77
}
78
79
RVector
getDefinitionPoint
()
const
{
80
return
getData
().
getDefinitionPoint
();
81
}
82
83
void
setText
(
const
QString& t) {
84
getData
().
setText
(t);
85
}
86
87
QString
getText
()
const
{
88
return
getData
().
getText
();
89
}
90
91
RTextData
getTextData
()
const
{
92
return
getData
().
getTextData
();
93
}
94
95
void
setMiddleOfText
(
const
RVector
& p) {
96
getData
().
setTextPosition
(p);
97
}
98
99
RVector
getMiddleOfText
()
const
{
100
return
getData
().
getTextPosition
();
101
}
102
103
void
setFontName
(
const
QString& fn) {
104
getData
().
setFontName
(fn);
105
}
106
107
QString
getFontName
()
const
{
108
return
getData
().
getFontName
();
109
}
110
111
bool
hasCustomTextPosition
()
const
{
112
return
getData
().
hasCustomTextPosition
();
113
}
114
115
void
setCustomTextPosition
(
bool
on) {
116
getData
().
setCustomTextPosition
(on);
117
}
118
119
protected
:
120
virtual
void
print
(QDebug dbg)
const
;
121
};
122
123
Q_DECLARE_METATYPE
(
RDimensionEntity
*)
124
Q_DECLARE_METATYPE
(QSharedPointer<
RDimensionEntity
>)
125
Q_DECLARE_METATYPE
(QSharedPointer<
RDimensionEntity
>*)
126
127
#endif
src
entity
RDimensionEntity.h
Generated on Tue Jun 26 2012 18:41:07 for QCAD Application Framework by
1.8.1.1