QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
RAttributeData.h
Go to the documentation of this file.
1
20#ifndef RATTRIBUTEDATA_H
21#define RATTRIBUTEDATA_H
22
23#include "entity_global.h"
24
25#include "RTextBasedData.h"
26
28class REntity;
29class RLine;
30class RDocument;
31class RRefPoint;
32
43 friend class RAttributeEntity;
44
45protected:
46 RAttributeData(RDocument* document, const RAttributeData& data);
47
48public:
50 RAttributeData(const RTextBasedData& textData, RObject::Id blockReferenceId, const QString& tag);
51 virtual ~RAttributeData() {}
52
53 virtual RS::EntityType getType() const {
55 }
56 virtual QString getRenderedText(bool escUnicode=false) const;
57
58 QString getTag() const {
59 return tag;
60 }
61
62 void setTag(const QString& t) {
63 tag = t;
64 }
65
66 bool isInvisible() const {
67 return invisible;
68 }
69
70 void setInvisible(bool i) {
71 invisible = i;
72 }
73
74 virtual RObject::Id getLinetypeId() const {
76 }
77
78 virtual RObject::Id getLinetypeId(bool resolve, const QStack<QSharedPointer<REntity> >& blockRefStack) const;
82 virtual RLineweight::Lineweight getLineweight(bool resolve, const QStack<QSharedPointer<REntity> >& blockRefStack) const;
83 virtual RColor getColor(bool resolve, const QStack<QSharedPointer<REntity> >& blockRefStack) const;
84 virtual RColor getColor() const {
86 }
87
88 virtual QList<RRefPoint> getReferencePoints(RS::ProjectionRenderingHint hint) const;
89
93 friend QDebug operator<<(QDebug dbg, const RAttributeData& t);
94
95private:
96 QString tag;
98};
99
103Q_DECLARE_METATYPE(QSharedPointer<RAttributeData>)
104Q_DECLARE_METATYPE(QSharedPointer<RAttributeData>*)
105
106#endif
Q_DECLARE_METATYPE(RMath *)
QCADCORE_EXPORT QDebug operator<<(QDebug dbg, const RTextBasedData &t)
Definition RTextBasedData.cpp:1098
int i
Copyright (c) 2011-2018 by Andrew Mustun.
Definition autostart.js:32
Stores and manages all data that defines the geometry and appearance of a block attribute entity.
Definition RAttributeData.h:42
QString tag
Definition RAttributeData.h:96
bool isInvisible() const
Definition RAttributeData.h:66
void setInvisible(bool i)
Definition RAttributeData.h:70
QString getTag() const
Definition RAttributeData.h:58
bool invisible
Definition RAttributeData.h:97
RAttributeData()
Definition RAttributeData.h:49
virtual RS::EntityType getType() const
Definition RAttributeData.h:53
void setTag(const QString &t)
Definition RAttributeData.h:62
virtual RLineweight::Lineweight getLineweight() const
Definition RAttributeData.h:79
virtual RObject::Id getLinetypeId() const
Definition RAttributeData.h:74
virtual RColor getColor() const
Definition RAttributeData.h:84
virtual ~RAttributeData()
Definition RAttributeData.h:51
Stores and manages all data that defines the geometry and appearance of a block attribute definition ...
Definition RAttributeDefinitionData.h:38
Attribute entity.
Definition RAttributeEntity.h:38
Color.
Definition RColor.h:43
A graphics document contains and owns entities, layers, user coordinate systems, variables,...
Definition RDocument.h:78
virtual RObject::Id getLinetypeId() const
Definition REntityData.h:274
virtual RLineweight::Lineweight getLineweight() const
Definition REntityData.h:292
virtual RColor getColor() const
Definition REntityData.h:312
Base class for all entity classes.
Definition REntity.h:63
Low-level mathematical representation of a line.
Definition RLine.h:41
Lineweight
Definition RLineweight.h:44
int Id
Definition RObject.h:69
Represents a reference point of an entity.
Definition RRefPoint.h:18
EntityType
Entity types used for property handling / filtering.
Definition RS.h:227
@ EntityAttribute
Block attribute.
Definition RS.h:244
ProjectionRenderingHint
Sets the current rendering hint for exports.
Definition RS.h:293
Stores and manages all data that defines the geometry and appearance of a text based entity (text,...
Definition RTextBasedData.h:68
virtual QList< RRefPoint > getReferencePoints(RS::ProjectionRenderingHint hint=RS::RenderTop) const
Definition RTextBasedData.cpp:271
virtual QString getRenderedText(bool escapeUnicode=false) const
Definition RTextBasedData.cpp:520
#define QCADENTITY_EXPORT
Definition entity_global.h:10