ICF 3.1.1.10
Technical documentation of ICF Libraries
CVisualRegistry.h
Go to the documentation of this file.
1/********************************************************************************
2** This file is part of the ICF Framework. Copyright (C) Witold Gantzke & Kirill Lepskiy
3** ICF Framework may be used under the terms of the LGPL License v. 2.1 by the Free Software Foundation.
4********************************************************************************/
5
6#pragma once
7
8
9// Qt includes
10#include <QtCore/QObject>
11
12
13// ICF includes
14#include <icomp/CRegistry.h>
15
18
19
20namespace icmpstr
21{
22
23
25 public QObject,
26 public icomp::CRegistry,
27 virtual public IComponentNoteController
28{
29public:
31
36
38
40 virtual bool SerializeRegistry(iser::IArchive& archive);
41 virtual bool SerializeUserData(iser::IArchive& archive);
42
43 // reimplemented (icmpstr::IComponentNoteController)
44 virtual QString GetComponentNote(const QByteArray& componentName);
45 virtual void SetComponentNote(const QByteArray& componentName, const QString& componentNote);
46
47 // reimplemented (icomp::IRegistry)
49 const QByteArray& elementId,
50 const icomp::CComponentAddress& address,
51 bool ensureElementCreated = true);
52 virtual bool RenameElement(const QByteArray& oldElementId, const QByteArray& newElementId);
53
54 // reimplemented (iser::ISerializable)
55 virtual bool Serialize(iser::IArchive& archive);
56
57protected:
59 typedef std::unique_ptr<QIcon> IconPtr;
60 typedef QMap<icomp::CComponentAddress, IconPtr> IconMap;
61
63 iser::IArchive& archive,
64 QByteArray& componentName,
65 i2d::CVector2d& position,
66 QString& note);
67
68 // reimplemented (icomp::CRegistry)
69 virtual std::unique_ptr<icomp::IRegistryElement> CreateRegistryElement(
70 const QByteArray& elementId,
71 const icomp::CComponentAddress& address) const;
72 virtual icomp::IRegistry* InsertEmbeddedRegistry(const QByteArray& registryId);
73
74private:
75 bool m_serializeUserData;
76};
77
78
79} // namespace icmpstr
80
81
Definition of position or mathematical vector on 2D plane.
Definition CVector2d.h:29
QMap< icomp::CComponentAddress, IconPtr > IconMap
virtual void SetComponentNote(const QByteArray &componentName, const QString &componentNote)
Add a note componentNote to the component with the given name componentName.
virtual std::unique_ptr< icomp::IRegistryElement > CreateRegistryElement(const QByteArray &elementId, const icomp::CComponentAddress &address) const
Called to create instance of registry element.
virtual bool RenameElement(const QByteArray &oldElementId, const QByteArray &newElementId)
Rename an registry element.
bool SerializeComponentInfo(iser::IArchive &archive, QByteArray &componentName, i2d::CVector2d &position, QString &note)
virtual icomp::IRegistry * InsertEmbeddedRegistry(const QByteArray &registryId)
Insert embedded registry with specified ID.
virtual bool SerializeComponentsLayout(iser::IArchive &archive)
icomp::CRegistry BaseClass
virtual bool SerializeRegistry(iser::IArchive &archive)
virtual bool Serialize(iser::IArchive &archive)
Load or store state of this object as a archive stream.
std::unique_ptr< QIcon > IconPtr
imod::TModelWrap< istd::TChangeDelegator< CVisualRegistryElement > > Element
virtual ElementInfo * InsertElementInfo(const QByteArray &elementId, const icomp::CComponentAddress &address, bool ensureElementCreated=true)
Insert new attribute info object to collection of attributes.
virtual QString GetComponentNote(const QByteArray &componentName)
Get the note text to the component with the given name componentName.
virtual bool SerializeUserData(iser::IArchive &archive)
Interface for management of notes in the component registry.
Represents global address of component.
Standard implementation of registry.
Definition CRegistry.h:25
Interface representing information stored in component registry.
Definition IRegistry.h:30
This model wrapper provides a simple connection between a concrete istd::IChangeable implementation a...
Definition TModelWrap.h:28
Represent input/output persistence archive.
Definition IArchive.h:34
This package contains (Qt based) implementations of compositor components.
Describe information stored with each element.
Definition IRegistry.h:51

© Witold Gantzke and Kirill Lepskiy