QCAD
Open Source 2D CAD
RAttributeDefinitionData.h
Go to the documentation of this file.
1 
20 #ifndef RATTRIBUTEDEFINITIONDATA_H
21 #define RATTRIBUTEDEFINITIONDATA_H
22 
23 #include "entity_global.h"
24 
25 #include <QTextLayout>
26 
27 #include "RDocument.h"
28 #include "RTextData.h"
29 
41 
42 protected:
44 
45 public:
47  RAttributeDefinitionData(const RTextBasedData& textData, const QString& tag, const QString& prompt);
49 
50  virtual RS::EntityType getType() const {
52  }
53  QString getTag() const {
54  return tag;
55  }
56 
57  void setTag(const QString& t) {
58  tag = t;
59  }
60 
61  QString getPrompt() const {
62  return prompt;
63  }
64 
65  void setPrompt(const QString& p) {
66  prompt = p;
67  }
68 
69  virtual QString getRenderedText(bool escUnicode=false) const;
70 
74  friend QDebug operator<<(QDebug dbg, const RAttributeDefinitionData& t);
75 
76 private:
77  QString tag;
78  QString prompt;
79 };
80 
86 
87 #endif
virtual ~RAttributeDefinitionData()
Definition: RAttributeDefinitionData.h:48
virtual RS::EntityType getType() const
Definition: RAttributeDefinitionData.h:50
Block attribute definition entity.
Definition: RAttributeDefinitionEntity.h:38
EntityType
Entity types used for property handling / filtering.
Definition: RS.h:76
#define QCADENTITY_EXPORT
Definition: entity_global.h:10
void setTag(const QString &t)
Definition: RAttributeDefinitionData.h:57
virtual QString getRenderedText(bool escapeUnicode=false) const
Definition: RTextBasedData.cpp:430
QDebug operator<<(QDebug dbg, const RBox &b)
Stream operator for QDebug.
Definition: RBox.cpp:591
RAttributeDefinitionData data
Definition: RAttributeDefinitionEntity.h:127
Block attribute definition.
Definition: RS.h:91
RAttributeDefinitionData()
Definition: RAttributeDefinitionData.h:46
Copyright (c) 2011-2018 by Andrew Mustun.
Definition: RAttributeDefinitionData.h:39
Stores and manages all data that defines the geometry and appearance of a text based entity (text...
Definition: RTextBasedData.h:44
A graphics document contains and owns entities, layers, user coordinate systems, variables, block definitions, etc.
Definition: RDocument.h:67
Q_DECLARE_METATYPE(RMath *)
QString prompt
Definition: RAttributeDefinitionData.h:78
QString getPrompt() const
Definition: RAttributeDefinitionData.h:61
void setPrompt(const QString &p)
Definition: RAttributeDefinitionData.h:65
QString getTag() const
Definition: RAttributeDefinitionData.h:53
QString tag
Definition: RAttributeDefinitionData.h:77
RDocument * document
Definition: RObject.h:308