CVisualRegistry.h
Go to the documentation of this file.
1 #ifndef icmpstr_CVisualRegistryComp_included
2 #define icmpstr_CVisualRegistryComp_included
3 
4 
5 // Qt includes
6 #include <QtCore/QObject>
7 
8 
9 // ACF includes
10 #include "icomp/CRegistry.h"
11 
14 
15 
16 namespace icmpstr
17 {
18 
19 
21  public QObject,
22  public icomp::CRegistry,
23  virtual public IComponentNoteController
24 {
25 public:
27 
28  enum MessageId
29  {
31  };
32 
34 
35  virtual bool SerializeComponentsLayout(iser::IArchive& archive);
36  virtual bool SerializeRegistry(iser::IArchive& archive);
37  virtual bool SerializeUserData(iser::IArchive& archive);
38 
39  // reimplemented (IComponentNoteController)
40  virtual QString GetComponentNote(const QByteArray& componentName);
41  virtual void SetComponentNote(const QByteArray& componentName, const QString& componentNote);
42 
43  // reimplemented (icomp::IRegistry)
44  virtual ElementInfo* InsertElementInfo(
45  const QByteArray& elementId,
46  const icomp::CComponentAddress& address,
47  bool ensureElementCreated = true);
48  virtual bool RenameElement(const QByteArray& oldElementId, const QByteArray& newElementId);
49 
50  // reimplemented (iser::ISerializable)
51  virtual bool Serialize(iser::IArchive& archive);
52 
53 protected:
56  typedef QMap<icomp::CComponentAddress, IconPtr> IconMap;
57 
59  iser::IArchive& archive,
60  QByteArray& componentName,
61  i2d::CVector2d& position,
62  QString& note);
63 
64  // reimplemented (icomp::CRegistry)
66  const QByteArray& elementId,
67  const icomp::CComponentAddress& address) const;
68  virtual icomp::IRegistry* InsertEmbeddedRegistry(const QByteArray& registryId);
69 
70 private:
71  bool m_serializeUserData;
72 };
73 
74 
75 } // namespace icmpstr
76 
77 
78 #endif // !icmpstr_CVisualRegistryComp_included
79 
80 
bool SerializeComponentInfo(iser::IArchive &archive, QByteArray &componentName, i2d::CVector2d &position, QString &note)
virtual bool SerializeUserData(iser::IArchive &archive)
virtual void SetComponentNote(const QByteArray &componentName, const QString &componentNote)
Add a note componentNote to the component with the given name componentName.
virtual bool RenameElement(const QByteArray &oldElementId, const QByteArray &newElementId)
virtual icomp::IRegistry * InsertEmbeddedRegistry(const QByteArray &registryId)
virtual bool SerializeComponentsLayout(iser::IArchive &archive)
virtual QString GetComponentNote(const QByteArray &componentName)
Get the note text to the component with the given name componentName.
virtual icomp::IRegistryElement * CreateRegistryElement(const QByteArray &elementId, const icomp::CComponentAddress &address) const
QMap< icomp::CComponentAddress, IconPtr > IconMap
istd::TDelPtr< QIcon > IconPtr
Interface for management of notes in the component registry.
virtual bool Serialize(iser::IArchive &archive)
virtual bool SerializeRegistry(iser::IArchive &archive)
virtual ElementInfo * InsertElementInfo(const QByteArray &elementId, const icomp::CComponentAddress &address, bool ensureElementCreated=true)
icomp::CRegistry BaseClass
imod::TModelWrap< istd::TChangeDelegator< CVisualRegistryElement > > Element

© 2007-2011 Witold Gantzke and Kirill Lepskiy