CLabel.h
Go to the documentation of this file.
1 #ifndef i2d_CLabel_included
2 #define i2d_CLabel_included
3 
4 
5 // ACF includes
6 #include <istd/CIndex2d.h>
7 
8 #include <i2d/CPosition2d.h>
9 
10 
11 namespace i2d
12 {
13 
14 
18 class CLabel: public i2d::CPosition2d
19 {
20 public:
22 
23  static QByteArray GetTypeName();
24 
30  CLabel(const i2d::CVector2d& position = i2d::CVector2d(0, 0), const QString& labelText = "Label");
31 
35  virtual const QString& GetText() const;
36 
40  virtual void SetText(const QString& labelText);
41 
42  // reimplemented (iser::ISerializable)
43  virtual bool Serialize(iser::IArchive& archive);
44 
45  // reimplemented (iser::IObject)
46  virtual QByteArray GetFactoryId() const;
47 
48  // reimplemented istd::IChangeable
49  virtual int GetSupportedOperations() const;
50  virtual bool CopyFrom(const IChangeable& object, CompatibilityMode mode = CM_WITHOUT_REFS);
52 
53 private:
54  QString m_text;
55 };
56 
57 
58 // public inline methods
59 
60 inline const QString& CLabel::GetText() const
61 {
62  return m_text;
63 }
64 
65 
66 } // namespace i2d
67 
68 
69 #endif // !i2d_CLabel_included
70 
71 
virtual istd::IChangeable * CloneMe(CompatibilityMode mode=CM_WITHOUT_REFS) const
Make a copy of this object.
virtual void SetText(const QString &labelText)
Set label text.
External references are simple ignored.
Definition: IChangeable.h:197
CompatibilityMode
Control how relationship betweeen objects are interpreted.
Definition: IChangeable.h:186
virtual bool Serialize(iser::IArchive &archive)
Load or store state of this object as a archive stream.
Data model for the label shape.
Definition: CLabel.h:18
virtual int GetSupportedOperations() const
Get set of flags for supported operations.
i2d::CPosition2d BaseClass
Definition: CLabel.h:21
Represent input/output persistence archive.
Definition: IArchive.h:30
Common interface for data model objects, which can be changed.
Definition: IChangeable.h:24
Definition of position or mathematical vector on 2D plane.
Definition: CVector2d.h:28
virtual QByteArray GetFactoryId() const
CLabel(const i2d::CVector2d &position=i2d::CVector2d(0, 0), const QString &labelText="Label")
Construct the label object with predefined parameters.
virtual const QString & GetText() const
Get label text.
Definition: CLabel.h:60
static QByteArray GetTypeName()
virtual bool CopyFrom(const IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS)
Definition of graphical point object.
Definition: CPosition2d.h:17

© 2007-2017 Witold Gantzke and Kirill Lepskiy