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
RImageEntity.h
Go to the documentation of this file.
1
#ifndef RIMAGEENTITY_H
2
#define RIMAGEENTITY_H
3
4
#include "
REntity.h
"
5
#include "
RImageData.h
"
6
7
class
RDocument
;
8
class
RExporter
;
9
17
class
RImageEntity
:
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
PropertyFileName
;
31
static
RPropertyTypeId
PropertyInsertionPointX
;
32
static
RPropertyTypeId
PropertyInsertionPointY
;
33
static
RPropertyTypeId
PropertyInsertionPointZ
;
34
static
RPropertyTypeId
PropertyScaleFactorX
;
35
static
RPropertyTypeId
PropertyScaleFactorY
;
36
static
RPropertyTypeId
PropertyAngle
;
37
38
static
RPropertyTypeId
PropertyWidth
;
39
static
RPropertyTypeId
PropertyHeight
;
40
41
public
:
42
RImageEntity
(
RDocument
*
document
,
const
RImageData
&
data
,
43
RObject::Id
objectId
=
RObject::INVALID_ID
);
44
virtual
~RImageEntity
();
45
46
static
void
init
();
47
48
virtual
RImageEntity
*
clone
()
const
;
49
50
virtual
RS::EntityType
getType
()
const
{
51
return
RS::EntityImage
;
52
}
53
54
bool
setProperty
(
RPropertyTypeId
propertyTypeId,
const
QVariant& value);
55
QPair<QVariant, RPropertyAttributes>
getProperty
(
56
RPropertyTypeId
propertyTypeId,
57
bool
humanReadable =
false
,
bool
noAttributes =
false
);
58
59
virtual
void
exportEntity
(
RExporter
& e,
bool
preview=
false
)
const
;
60
61
virtual
RImageData
&
getData
() {
62
return
data
;
63
}
64
65
virtual
const
RImageData
&
getData
()
const
{
66
return
data
;
67
}
68
69
void
setInsertionPoint
(
const
RVector
& ip) {
70
data
.
setInsertionPoint
(ip);
71
}
72
73
void
setWidth
(
double
w,
bool
keepRatio=
false
) {
74
data
.
setWidth
(w, keepRatio);
75
}
76
77
void
setHeight
(
double
h,
bool
keepRatio=
false
) {
78
data
.
setHeight
(h, keepRatio);
79
}
80
81
void
setAngle
(
double
a) {
82
data
.
setAngle
(a);
83
}
84
85
double
getWidth
()
const
{
86
return
data
.
getWidth
();
87
}
88
89
double
getHeight
()
const
{
90
return
data
.
getHeight
();
91
}
92
93
int
getPixelWidth
()
const
{
94
return
data
.
getPixelWidth
();
95
}
96
97
int
getPixelHeight
()
const
{
98
return
data
.
getPixelHeight
();
99
}
100
101
protected
:
102
virtual
void
print
(QDebug dbg)
const
;
103
104
protected
:
105
RImageData
data
;
106
};
107
108
Q_DECLARE_METATYPE
(
RImageEntity
*)
109
Q_DECLARE_METATYPE
(QSharedPointer<
RImageEntity
>)
110
Q_DECLARE_METATYPE
(QSharedPointer<
RImageEntity
>*)
111
112
#endif
src
entity
RImageEntity.h
Generated on Tue Jun 26 2012 18:41:08 for QCAD Application Framework by
1.8.1.1