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
RBlock.h
Go to the documentation of this file.
1
#ifndef RBLOCK_H
2
#define RBLOCK_H
3
4
#include <QString>
5
#include <QDebug>
6
7
#include "
RGlobal.h
"
8
#include "
RObject.h
"
9
#include "
RVector.h
"
10
#include "
RPropertyTypeId.h
"
11
12
class
RDocument
;
13
21
class
RBlock
:
public
RObject
{
22
public
:
23
static
RPropertyTypeId
PropertyName
;
24
static
RPropertyTypeId
PropertyFrozen
;
25
26
public
:
27
RBlock
();
28
29
RBlock
(
RDocument
*
document
,
const
QString&
name
,
const
RVector
&
origin
);
30
31
virtual
~RBlock
();
32
33
static
void
init
();
34
35
virtual
RBlock
*
clone
()
const
;
36
37
QString
getName
()
const
{
38
return
name
;
39
}
40
41
void
setName
(
const
QString& n);
42
43
bool
isFrozen
()
const
{
44
return
frozen
;
45
}
46
47
void
setFrozen
(
bool
on) {
48
if
(QString::compare(
name
,
modelSpaceName
, Qt::CaseInsensitive)!=0) {
49
frozen
= on;
50
}
51
}
52
53
void
setOrigin
(
const
RVector
&
origin
) {
54
this->origin =
origin
;
55
}
56
57
RVector
getOrigin
()
const
{
58
return
origin
;
59
}
60
61
virtual
QPair<QVariant, RPropertyAttributes>
getProperty
(
62
RPropertyTypeId
propertyTypeId,
63
bool
humanReadable =
false
,
bool
noAttributes =
false
);
64
virtual
bool
setProperty
(
RPropertyTypeId
propertyTypeId,
65
const
QVariant& value);
66
67
virtual
bool
isSelectedForPropertyEditing
();
68
69
public
:
70
static
const
QString
modelSpaceName
;
71
72
protected
:
76
virtual
void
print
(QDebug dbg)
const
;
77
78
private
:
79
QString
name
;
80
bool
frozen
;
81
RVector
origin
;
82
};
83
84
85
Q_DECLARE_METATYPE
(QSharedPointer<RBlock>)
86
Q_DECLARE_METATYPE
(QSharedPointer<
RBlock
>*)
87
Q_DECLARE_METATYPE
(
RBlock
)
88
Q_DECLARE_METATYPE
(
RBlock
*)
89
90
#endif
src
core
RBlock.h
Generated on Tue Jun 26 2012 18:41:07 for QCAD Application Framework by
1.8.1.1