10#include <QtCore/QObject>
11#include <QtCore/QTimer>
31#include <GeneratedFiles/icmpstr/ui_CVisualRegistryEditorComp.h>
37class CRegistryElementShape;
38class CVisualRegistryElement;
53 I_ASSIGN(m_sceneProviderCompPtr,
"SceneProvider",
"Display view where graphical objects will be shown",
true,
"SceneProvider");
54 I_ASSIGN_TO(m_sceneProviderGuiCompPtr, m_sceneProviderCompPtr,
true);
55 I_ASSIGN(m_registryCodeSaverCompPtr,
"RegistryCodeSaver",
"Export registry to C++ code file",
false,
"RegistryCodeSaver");
56 I_ASSIGN(m_registryPreviewCompPtr,
"RegistryPreview",
"Executes preview of the registry",
false,
"RegistryPreview");
57 I_ASSIGN(m_metaInfoManagerCompPtr,
"MetaInfoManager",
"Allows access to component meta information",
true,
"MetaInfoManager");
58 I_ASSIGN_TO(m_metaInfoManagerModelCompPtr, m_metaInfoManagerCompPtr,
false);
59 I_ASSIGN(m_packagesManagerCompPtr,
"PackagesManager",
"Access to information about package files",
false,
"PackagesManager");
60 I_ASSIGN(m_quickHelpViewerCompPtr,
"QuickHelpGui",
"Show help of selected component using its address",
false,
"QuickHelpGui");
61 I_ASSIGN(m_documentManagerCompPtr,
"DocumentManager",
"Document manager allowing to load files on double click",
false,
"DocumentManager");
62 I_ASSIGN(m_consistencyInfoCompPtr,
"ConsistencyInfo",
"Allows to check consistency of registries and attributes",
false,
"ConsistencyInfo");
63 I_ASSIGN(m_registryTopologyGuiCompPtr,
"RegistryTopologyGui",
"GUI for showing the registry component topology",
false,
"RegistryTopologyGui");
64 I_ASSIGN_TO(m_registryObserverCompPtr, m_registryTopologyGuiCompPtr,
false);
65 I_ASSIGN(m_registryValidationStatusCompPtr,
"RegistryValidationStatus",
"Visual status of registry validation",
false,
"RegistryValidationStatus");
66 I_ASSIGN_TO(m_registryValidationStatusModelCompPtr, m_registryValidationStatusCompPtr,
false);
81 I_REF(
imod::IModel, m_registryValidationStatusModelCompPtr);
101 I_REGISTER_SUBELEMENT(SelectionInfo);
103 I_REGISTER_SUBELEMENT_INTERFACE(SelectionInfo,
imod::IModel, ExtractSelectionInfo);
104 I_REGISTER_SUBELEMENT_INTERFACE(SelectionInfo,
istd::IChangeable, ExtractSelectionInfo);
177 const QByteArray& referenceComponentId,
178 const QByteArray& attributeId,
179 bool isFactory =
false);
185 const QByteArray& elementId,
212 virtual bool OnDropObject(
const QMimeData& data, QGraphicsSceneDragDropEvent* eventPtr);
266 virtual Elements GetSelectedElements()
const;
275 template <
class InterfaceType>
278 return &component.m_selectionInfo;
297 QTimer m_executionObserverTimer;
299 QFont m_elementNameFont;
300 QFont m_elementDetailFont;
302 typedef QSet<QByteArray> ElementIds;
303 ElementIds m_selectedElementIds;
305 EnvironmentObserver m_environmentObserver;
309 QByteArray m_embeddedRegistryId;
310 QGraphicsScene* m_scenePtr;
311 QStringList m_acceptedMimeTypes;
314 QSpacerItem* m_buttonSpacerPtr;
322 return m_metaInfoManagerCompPtr.get();
328 return m_consistencyInfoCompPtr.get();
Definition of position or mathematical vector on 2D plane.
Interface for a provider of the heriarchical commands.
Visualization of geometrical registry elements.
EnvironmentObserver(CVisualRegistryEditorComp *parentPtr)
virtual void OnUpdate(const istd::IChangeable::ChangeSet &changeSet)
Called on update of observed model.
istdgui::TDesignerGuiObserverCompBase< Ui::CVisualRegistryEditorComp, icomp::IRegistry > BaseClass
const icomp::IMetaInfoManager * GetMetaInfoManager() const
icomp::IRegistryElement * TryCreateComponent(const QByteArray &elementId, const icomp::CComponentAddress &address, const i2d::CVector2d &position)
Used on drop/paste action.
const QFont & GetElementNameFont() const
const ibase::IHierarchicalCommand * GetCommands() const override
Get list of menu commands.
void AddConnector(CRegistryElementShape &sourceShape, const QByteArray &referenceComponentId, const QByteArray &attributeId, bool isFactory=false)
void OnEmbeddedComponentButtonClicked()
Selects (checks) a button representing an embedded composition.
void OnDropFinished(const QMimeData &mimeData, QEvent *eventPtr) override
Notification about drop action finish.
bool OnModelAttached(imod::IModel *modelPtr, istd::IChangeable::ChangeSet &changeMask) override
This call back function will be called, if an observable object is about to be attached.
bool OnModelDetached(imod::IModel *modelPtr) override
This call back function will be called, if an observable object is about to be detached.
void NewEmbeddedComponent()
virtual bool OnDropObject(const QMimeData &data, QGraphicsSceneDragDropEvent *eventPtr)
CVisualRegistryEditorCompBase BaseClass
void OnRetranslate() override
Called when non-GUI elements (like commands) should be retranslated.
void OnComponentDestroyed() override
void ToEmbeddedComponent()
void OnGuiDestroyed() override
Called just before GUI is released.
void AddConnectorsToScene()
void RemoveEmbeddedComponent()
void OnShowRegistryTopology()
const QFont & GetElementDetailFont() const
void OnGuiCreated() override
Called just after GUI is initialized.
QGraphicsItem * AddShapeToScene(iser::ISerializable *elementPtr) const
Create instance of shape representing some element.
void UpdateEmbeddedRegistryView(const QByteArray &id)
Update the scene to display currently selected embedded composition.
void UpdateGui(const istd::IChangeable::ChangeSet &changeSet) override
void OnSelectionChanged()
void ConnectReferences(const QByteArray &componentRole)
Used by TryCreateComponent() when an existing component is pasted (?) to update attributes referencin...
void UpdateEmbeddedRegistryButtons()
Clear and fill the embedded registry button box (used when the number of registry elements changes)
QStringList GetAcceptedMimeIds() const override
Get the list of the possible mime IDs, which are accepted by the consumer.
void OnComponentCreated() override
void SetAcceptedMimeTypes(const QStringList &mimeTypes)
Set accepted mime types.
void OnExecutionTimerTick()
icomp::IRegistry * GetSelectedRegistry() const
Get root or embedded registry that is currently selected in the editor.
void UpdateComponentSelection()
Update component selection and related menu actions.
bool TryOpenComponent(const CVisualRegistryElement ®istryElement)
Try to open the composite component's registry in a new window.
void OnModelChanged(int modelId, const istd::IChangeable::ChangeSet &changeSet) override
Called when some model observed by dispatcher will be changed.
virtual void UpdateScene()
const IRegistryConsistInfo * GetRegistryConsistInfo() const
CVisualRegistryEditorComp()
Interface containing all information about registry selected element.
QMap< QByteArray, const icomp::IRegistry::ElementInfo * > Elements
Interface for GUI objects managing scene.
Represents global address of component.
Represents element of registry describing component parameters.
Interface representing information stored in component registry.
Provide set of user actions needed to manage documents in MVC (Model View Controller) concept.
Allow to show help document to specified object or text.
Interface providing loading and saving of data objects.
Generic implementation of a data model changes notifier.
Common interface for model objects, that supports Model/Observer design pattern.
Common interface for all classes implementing the Observer functionality in the Model/Observer design...
This model wrapper provides a simple connection between a concrete istd::IChangeable implementation a...
Basic implementation for a single model observer with binding to concrete data object interface.
Common class for all classes which objects can be archived or restored from archive.
Set of change flags (its IDs).
Common interface for data model objects, which can be changed.
Common interface to define the hierarchical graph structures.
Implementation of a pointer container, which controls the live cycle of the pointer object.
Implementation of hierarchical command based on QAction from Qt.
Interface for objects which can receive dragged objects.
Common interface for GUI objects using in component context.
Extends standard information provider to provide additional visual informations.
Base class for all Qt GUI components.
This package contains (Qt based) implementations of compositor components.