ICF 3.1.1.10
Technical documentation of ICF Libraries
icmpstr::CVisualRegistryEditorComp Class Reference

#include <CVisualRegistryEditorComp.h>

Inheritance diagram for icmpstr::CVisualRegistryEditorComp:
Collaboration diagram for icmpstr::CVisualRegistryEditorComp:

Classes

class  EnvironmentObserver
 

Public Types

typedef CVisualRegistryEditorCompBase BaseClass
 
- Public Types inherited from icmpstr::CVisualRegistryEditorCompBase
typedef istdgui::TDesignerGuiObserverCompBase< Ui::CVisualRegistryEditorComp, icomp::IRegistryBaseClass
 
- Public Types inherited from istdgui::TGuiComponentBase< QWidget >
typedef CGuiComponentBase BaseClass
 
- Public Types inherited from istdgui::CGuiComponentBase
typedef ibase::TVisualChangesHandlerWrap< icomp::CComponentBaseBaseClass
 
- Public Types inherited from ibase::TVisualChangesHandlerWrap< icomp::CComponentBase >
typedef icomp::CComponentBase BaseClass
 
- Public Types inherited from imod::TSingleModelObserverBase< icomp::IRegistry >
typedef CSingleModelObserverBase BaseClass
 
typedef icomp::IRegistry ModelType
 
- Public Types inherited from imod::CSingleModelObserverBase
typedef imod::IModel ModelType
 
- Public Types inherited from imod::IModelEditor
enum  ChangeFlags { CF_INIT_EDITOR = 0x3720694 }
 Data model change notification flags. More...
 
- Public Types inherited from ibase::ICommandsProvider
enum  ChangeFlags { CF_COMMANDS = 0x62b7e8 }
 
- Public Types inherited from istd::IChangeable
enum  ChangeFlags {
  CF_ICF_INTERNAL = 0 , CF_ALL_DATA , CF_ANY , CF_DESTROYING ,
  CF_DELEGATED , CF_NO_UNDO
}
 Data model change notification flags. More...
 
enum  SupportedOperations {
  SO_NONE = 0 , SO_OBSERVE = 1 << 0 , SO_COPY = 1 << 1 , SO_CLONE = 1 << 2 ,
  SO_COMPARE = 1 << 3 , SO_RESET = 1 << 4 , SO_CHANGE_LOCK = 1 << 5
}
 Flags for supported operations. More...
 
enum  CompatibilityMode { CM_STRICT , CM_WITHOUT_REFS , CM_WITH_REFS , CM_CONVERT }
 Control how relationship betweeen objects are interpreted. More...
 

Public Member Functions

 CVisualRegistryEditorComp ()
 
const QFont & GetElementNameFont () const
 
const QFont & GetElementDetailFont () const
 
const icomp::IMetaInfoManagerGetMetaInfoManager () const
 
const IRegistryConsistInfoGetRegistryConsistInfo () const
 
bool TryOpenComponent (const CVisualRegistryElement &registryElement)
 Try to open the composite component's registry in a new window.
 
void SetAcceptedMimeTypes (const QStringList &mimeTypes)
 Set accepted mime types.
 
const ibase::IHierarchicalCommandGetCommands () const override
 Get list of menu commands.
 
QStringList GetAcceptedMimeIds () const override
 Get the list of the possible mime IDs, which are accepted by the consumer.
 
void OnDropFinished (const QMimeData &mimeData, QEvent *eventPtr) override
 Notification about drop action finish.
 
- Public Member Functions inherited from istdgui::TGuiComponentBase< QWidget >
 TGuiComponentBase ()
 
virtual QWidget * GetQtWidget () const
 
- Public Member Functions inherited from istdgui::CGuiComponentBase
 CGuiComponentBase ()
 
bool IsGuiShown () const
 
bool IsGuiCreated () const override
 Inform if GUI was initilized.
 
bool CreateGui (QWidget *parentPtr) override
 Initialize GUI and connect it to the parent.
 
bool DestroyGui () override
 Release GUI and disconnect it from parent.
 
QWidget * GetWidget () const override
 Get access to internal QWidget object.
 
void OnTryClose (bool *ignoredPtr=nullptr) override
 Called on trying to close application.
 
- Public Member Functions inherited from ibase::TVisualChangesHandlerWrap< icomp::CComponentBase >
 TVisualChangesHandlerWrap (Args &&... args)
 
virtual void EnableVisualChangesHandler (bool enableLocalization=true)
 If enabled, listen to the language change event from the application context.
 
- Public Member Functions inherited from icomp::CComponentBase
 CComponentBase ()
 Create component and assign it to specific context.
 
 CComponentBase (const CComponentBase &)=delete
 
CComponentBaseoperator= (const CComponentBase &)=delete
 
virtual const ICompositeComponentGetParentComponent (bool ownerOnly=false) const
 Get parent of this component.
 
virtual void * GetInterface (const istd::CClassInfo &interfaceType, const QByteArray &subId="")
 Get access to specified component interface.
 
virtual const IComponentContextGetComponentContext () const
 Get access to component context describing all application-specified component information loaded from components registry.
 
virtual void SetComponentContext (const IComponentContext *contextPtr, const ICompositeComponent *parentPtr, bool isParentOwner)
 Set component context of this component.
 
- Public Member Functions inherited from icomp::IComponent
- Public Member Functions inherited from istdgui::IGuiObject
- Public Member Functions inherited from imod::TSingleModelObserverBase< icomp::IRegistry >
 TSingleModelObserverBase ()
 
icomp::IRegistryGetObservedObject () const
 Get instance of observed object.
 
icomp::IRegistryGetObjectPtr () const
 Get instance of observed object.
 
bool AttachOrSetObject (icomp::IRegistry *objectPtr)
 Attach to model of object or set object pointer, if no connection is possible.
 
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.
 
- Public Member Functions inherited from imod::CSingleModelObserverBase
 CSingleModelObserverBase ()
 
virtual ~CSingleModelObserverBase ()
 
imod::IModelGetObservedModel () const
 Get access to observed model.
 
imod::IModelGetModelPtr () const
 Get access to observed model.
 
void EnsureModelDetached ()
 Make sure this observer is detached.
 
void SetObservedIds (const istd::IChangeable::ChangeSet &changeMask)
 Set list of ID's beeing observed.
 
bool IsModelAttached (const imod::IModel *modelPtr=nullptr) const override
 Check if specified model is attached.
 
void BeforeModelChange (imod::IModel *modelPtr) override
 This function will be called before update of the observer contents occures.
 
void AfterModelChange (imod::IModel *modelPtr, const istd::IChangeable::ChangeSet &changeSet) override
 This function will be called after update of the observer contents occures.
 
- Public Member Functions inherited from imod::IObserver
- Public Member Functions inherited from imod::IModelEditor
virtual void UpdateEditor (const istd::IChangeable::ChangeSet &changeSet)=0
 Updates editor with model data.
 
virtual void UpdateModelFromEditor () const =0
 Updates model from editor.
 
virtual bool IsReadOnly () const =0
 Returns true if the model data can be changed.
 
virtual void SetReadOnly (bool state)=0
 Set flag that the model data can be changed.
 
- Public Member Functions inherited from istdgui::IDropConsumer
- Public Member Functions inherited from ibase::ICommandsProvider
- Public Member Functions inherited from istd::IChangeable
virtual int GetSupportedOperations () const
 Get set of flags for supported operations.
 
virtual bool CopyFrom (const IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS)
 Copy this object from another one.
 
virtual bool IsEqual (const IChangeable &object) const
 Compare this object with another object.
 
virtual std::unique_ptr< IChangeableCloneMe (CompatibilityMode mode=CM_WITHOUT_REFS) const
 Make a copy of this object.
 
virtual bool ResetData (CompatibilityMode mode=CM_WITHOUT_REFS)
 Reset data to its default state.
 
virtual QMutex * GetChangesLock () const
 Get mutex beeing locked during changes, if available.
 
virtual void BeginChanges (const ChangeSet &changeSet)
 Starts the change transaction.
 
virtual void EndChanges (const ChangeSet &changeSet)
 Ends the change transaction.
 
virtual void BeginChangeGroup (const ChangeSet &changeSet)
 Starts group of changes.
 
virtual void EndChangeGroup (const ChangeSet &changeSet)
 Ends group of changes.
 

Protected Types

enum  GroupId {
  GI_COMPONENT = 0x5430 , GI_EMBEDDED_REGISTRY , GI_CODEGEN , GI_PREVIEW ,
  GI_EDIT , GI_TOOLS
}
 

Protected Slots

void OnSelectionChanged ()
 
void OnCutCommand ()
 
void OnCopyCommand ()
 
void OnPasteCommand ()
 
void OnRemoveComponent ()
 
void OnRenameComponent ()
 
void NewEmbeddedComponent ()
 
void ToEmbeddedComponent ()
 
void RemoveEmbeddedComponent ()
 
void OnExportToCode ()
 
void OnExecute ()
 
void OnAbort ()
 
void OnExecutionTimerTick ()
 
void OnShowRegistryTopology ()
 
void OnEmbeddedComponentButtonClicked ()
 Selects (checks) a button representing an embedded composition.
 

Protected Member Functions

icomp::IRegistryGetSelectedRegistry () const
 Get root or embedded registry that is currently selected in the editor.
 
QGraphicsItem * AddShapeToScene (iser::ISerializable *elementPtr) const
 Create instance of shape representing some element.
 
void AddConnectorsToScene ()
 
void AddConnector (CRegistryElementShape &sourceShape, const QByteArray &referenceComponentId, const QByteArray &attributeId, bool isFactory=false)
 
icomp::IRegistryElementTryCreateComponent (const QByteArray &elementId, const icomp::CComponentAddress &address, const i2d::CVector2d &position)
 Used on drop/paste action.
 
void ConnectReferences (const QByteArray &componentRole)
 Used by TryCreateComponent() when an existing component is pasted (?) to update attributes referencing it, in all registry elements.
 
void UpdateComponentSelection ()
 Update component selection and related menu actions.
 
void DoRetranslate ()
 
void UpdateEmbeddedRegistryButtons ()
 Clear and fill the embedded registry button box (used when the number of registry elements changes)
 
void UpdateEmbeddedRegistryView (const QByteArray &id)
 Update the scene to display currently selected embedded composition.
 
virtual bool OnDropObject (const QMimeData &data, QGraphicsSceneDragDropEvent *eventPtr)
 
virtual void UpdateScene ()
 
void OnModelChanged (int modelId, const istd::IChangeable::ChangeSet &changeSet) override
 Called when some model observed by dispatcher will be changed.
 
void UpdateGui (const istd::IChangeable::ChangeSet &changeSet) override
 
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 OnRetranslate () override
 Called when non-GUI elements (like commands) should be retranslated.
 
void OnComponentCreated () override
 
void OnComponentDestroyed () override
 
void OnGuiCreated () override
 Called just after GUI is initialized.
 
void OnGuiDestroyed () override
 Called just before GUI is released.
 
- Protected Member Functions inherited from istdgui::TGuiComponentBase< QWidget >
virtual QWidget * CreateQtWidget (QWidget *parentPtr)
 Create slave widget object.
 
- Protected Member Functions inherited from istdgui::CGuiComponentBase
virtual void OnGuiShown ()
 Called from widget event filter when slave widget is shown.
 
virtual void OnGuiHidden ()
 Called from widget event filter when slave widget is hidden.
 
virtual bool OnKeyPressed (QKeyEvent *event)
 Called from widget event filter when key is pressed.
 
virtual void OnGuiRetranslate ()
 Called from widget event filter when GUI should be retranslated.
 
void SetStatusIcon (const QIcon &icon)
 Set status icon;.
 
void SetStatusText (const QString &text)
 Set status text;.
 
void OnLanguageChanged () override
 
void OnDesignSchemaChanged () override
 
bool eventFilter (QObject *sourcePtr, QEvent *eventPtr) override
 
- Protected Member Functions inherited from ibase::TVisualChangesHandlerWrap< icomp::CComponentBase >
- Protected Member Functions inherited from icomp::CComponentBase
bool IsComponentActive () const
 Check if component is active.
 
virtual const IRealComponentStaticInfoGetComponentStaticInfo () const =0
 Get access to static info of this component.
 
- Protected Member Functions inherited from imod::TSingleModelObserverBase< icomp::IRegistry >
virtual icomp::IRegistryCastFromModel (imod::IModel *modelPtr) const
 
- Protected Member Functions inherited from imod::CSingleModelObserverBase
void SetModelPtr (imod::IModel *modelPtr)
 Set internal model pointer to specified value.
 
virtual void OnUpdate (const istd::IChangeable::ChangeSet &changeSet)
 Called on update of observed model.
 
- Protected Member Functions inherited from istd::IChangeable
virtual void OnBeginChanges ()
 Callback function for begin change event.
 
virtual void OnEndChanges (const ChangeSet &changeSet)
 Callback function for end change event.
 
- Protected Member Functions inherited from imod::CMultiModelDispatcherBase
bool RegisterModel (IModel *modelPtr, int modelId=0, const istd::IChangeable::ChangeSet &relevantFlags=istd::IChangeable::GetAllChanges())
 Register the data model to be observed.
 
void UnregisterModel (int modelId=0)
 Unregister the data model object.
 
void UnregisterAllModels ()
 Unregister all observed data objects.
 
template<class Object >
Object * GetObjectAt (int modelId) const
 Get concrete object instance of the obsered model.
 

Additional Inherited Members

- Static Public Member Functions inherited from istdgui::CGuiComponentBase
static void MakeAutoSlotConnection (const QWidget &widget, QObject &object)
 
- Static Public Member Functions inherited from istd::IChangeable
static const ChangeSetGetNoChanges ()
 Get empty set of changes.
 
static const ChangeSetGetAnyChange ()
 Get anonymous change set.
 
static const ChangeSetGetAllChanges ()
 Get anonymous change set.
 
static const ChangeSetGetDelegatedChanges ()
 Get delegated change set.
 
- Static Protected Member Functions inherited from icomp::CComponentBase
static const IRealComponentStaticInfoInitStaticInfo (IComponent *componentPtr)
 
static QByteArray GetComponentId (const IComponentContext *componentContextPtr, const QByteArray &contextId=QByteArray())
 
- Protected Attributes inherited from istdgui::CGuiComponentBase
istd::CMainThreadCaller m_updateGuiCaller
 
imod::TModelWrap< VisualStatusm_visualStatus
 

Detailed Description

Definition at line 87 of file CVisualRegistryEditorComp.h.

Member Typedef Documentation

◆ BaseClass

Member Enumeration Documentation

◆ GroupId

Enumerator
GI_COMPONENT 
GI_EMBEDDED_REGISTRY 
GI_CODEGEN 
GI_PREVIEW 
GI_EDIT 
GI_TOOLS 

Definition at line 136 of file CVisualRegistryEditorComp.h.

Constructor & Destructor Documentation

◆ CVisualRegistryEditorComp()

icmpstr::CVisualRegistryEditorComp::CVisualRegistryEditorComp ( )

Member Function Documentation

◆ AddConnector()

void icmpstr::CVisualRegistryEditorComp::AddConnector ( CRegistryElementShape & sourceShape,
const QByteArray & referenceComponentId,
const QByteArray & attributeId,
bool isFactory = false )
protected

◆ AddConnectorsToScene()

void icmpstr::CVisualRegistryEditorComp::AddConnectorsToScene ( )
protected

◆ AddShapeToScene()

QGraphicsItem * icmpstr::CVisualRegistryEditorComp::AddShapeToScene ( iser::ISerializable * elementPtr) const
protected

Create instance of shape representing some element.

The shape will be automatically connected to element using model/observer pattern.

See also
imod.

◆ ConnectReferences()

void icmpstr::CVisualRegistryEditorComp::ConnectReferences ( const QByteArray & componentRole)
protected

Used by TryCreateComponent() when an existing component is pasted (?) to update attributes referencing it, in all registry elements.

Parameters
componentRoleregistry element id

◆ DoRetranslate()

void icmpstr::CVisualRegistryEditorComp::DoRetranslate ( )
protected

◆ GetAcceptedMimeIds()

QStringList icmpstr::CVisualRegistryEditorComp::GetAcceptedMimeIds ( ) const
overridevirtual

Get the list of the possible mime IDs, which are accepted by the consumer.

Implements istdgui::IDropConsumer.

◆ GetCommands()

const ibase::IHierarchicalCommand * icmpstr::CVisualRegistryEditorComp::GetCommands ( ) const
overridevirtual

Get list of menu commands.

These commands will be integrated in global menu system, independent from actual selected view. For support of normal pull down menu, depth of this tree structure should be at least 3.

Reimplemented from ibase::ICommandsProvider.

◆ GetElementDetailFont()

const QFont & icmpstr::CVisualRegistryEditorComp::GetElementDetailFont ( ) const

◆ GetElementNameFont()

const QFont & icmpstr::CVisualRegistryEditorComp::GetElementNameFont ( ) const

◆ GetMetaInfoManager()

const icomp::IMetaInfoManager * icmpstr::CVisualRegistryEditorComp::GetMetaInfoManager ( ) const
inline

Definition at line 320 of file CVisualRegistryEditorComp.h.

◆ GetRegistryConsistInfo()

const IRegistryConsistInfo * icmpstr::CVisualRegistryEditorComp::GetRegistryConsistInfo ( ) const
inline

Definition at line 326 of file CVisualRegistryEditorComp.h.

◆ GetSelectedRegistry()

icomp::IRegistry * icmpstr::CVisualRegistryEditorComp::GetSelectedRegistry ( ) const
protected

Get root or embedded registry that is currently selected in the editor.

◆ NewEmbeddedComponent

void icmpstr::CVisualRegistryEditorComp::NewEmbeddedComponent ( )
protectedslot

◆ OnAbort

void icmpstr::CVisualRegistryEditorComp::OnAbort ( )
protectedslot

◆ OnComponentCreated()

void icmpstr::CVisualRegistryEditorComp::OnComponentCreated ( )
overrideprotectedvirtual

Reimplemented from istdgui::CGuiComponentBase.

◆ OnComponentDestroyed()

void icmpstr::CVisualRegistryEditorComp::OnComponentDestroyed ( )
overrideprotectedvirtual

Reimplemented from istdgui::CGuiComponentBase.

◆ OnCopyCommand

void icmpstr::CVisualRegistryEditorComp::OnCopyCommand ( )
protectedslot

◆ OnCutCommand

void icmpstr::CVisualRegistryEditorComp::OnCutCommand ( )
protectedslot

◆ OnDropFinished()

void icmpstr::CVisualRegistryEditorComp::OnDropFinished ( const QMimeData & mimeData,
QEvent * eventPtr )
overridevirtual

Notification about drop action finish.

Implements istdgui::IDropConsumer.

◆ OnDropObject()

virtual bool icmpstr::CVisualRegistryEditorComp::OnDropObject ( const QMimeData & data,
QGraphicsSceneDragDropEvent * eventPtr )
protectedvirtual

◆ OnEmbeddedComponentButtonClicked

void icmpstr::CVisualRegistryEditorComp::OnEmbeddedComponentButtonClicked ( )
protectedslot

Selects (checks) a button representing an embedded composition.

◆ OnExecute

void icmpstr::CVisualRegistryEditorComp::OnExecute ( )
protectedslot

◆ OnExecutionTimerTick

void icmpstr::CVisualRegistryEditorComp::OnExecutionTimerTick ( )
protectedslot

◆ OnExportToCode

void icmpstr::CVisualRegistryEditorComp::OnExportToCode ( )
protectedslot

◆ OnGuiCreated()

void icmpstr::CVisualRegistryEditorComp::OnGuiCreated ( )
overrideprotectedvirtual

Called just after GUI is initialized.

Reimplemented from istdgui::CGuiComponentBase.

◆ OnGuiDestroyed()

void icmpstr::CVisualRegistryEditorComp::OnGuiDestroyed ( )
overrideprotectedvirtual

Called just before GUI is released.

Reimplemented from istdgui::CGuiComponentBase.

◆ OnModelAttached()

bool icmpstr::CVisualRegistryEditorComp::OnModelAttached ( imod::IModel * modelPtr,
istd::IChangeable::ChangeSet & changeMask )
overrideprotectedvirtual

This call back function will be called, if an observable object is about to be attached.

This function returns a true, if observable object is accepted by the implementation logic of the observer, otherwise returns false.

Parameters
modelPtrpointer to model object being attached.
changeMaskoutput parameter returning set of change ID's will be accepted. returns a false.

Reimplemented from imod::CSingleModelObserverBase.

◆ OnModelChanged()

void icmpstr::CVisualRegistryEditorComp::OnModelChanged ( int modelId,
const istd::IChangeable::ChangeSet & changeSet )
overrideprotectedvirtual

Called when some model observed by dispatcher will be changed.

Implements imod::CMultiModelDispatcherBase.

◆ OnModelDetached()

bool icmpstr::CVisualRegistryEditorComp::OnModelDetached ( imod::IModel * modelPtr)
overrideprotectedvirtual

This call back function will be called, if an observable object is about to be detached.

Reimplemented from imod::CSingleModelObserverBase.

◆ OnPasteCommand

void icmpstr::CVisualRegistryEditorComp::OnPasteCommand ( )
protectedslot

◆ OnRemoveComponent

void icmpstr::CVisualRegistryEditorComp::OnRemoveComponent ( )
protectedslot

◆ OnRenameComponent

void icmpstr::CVisualRegistryEditorComp::OnRenameComponent ( )
protectedslot

◆ OnRetranslate()

void icmpstr::CVisualRegistryEditorComp::OnRetranslate ( )
overrideprotectedvirtual

Called when non-GUI elements (like commands) should be retranslated.

Reimplemented from istdgui::CGuiComponentBase.

◆ OnSelectionChanged

void icmpstr::CVisualRegistryEditorComp::OnSelectionChanged ( )
protectedslot

◆ OnShowRegistryTopology

void icmpstr::CVisualRegistryEditorComp::OnShowRegistryTopology ( )
protectedslot

◆ RemoveEmbeddedComponent

void icmpstr::CVisualRegistryEditorComp::RemoveEmbeddedComponent ( )
protectedslot

◆ SetAcceptedMimeTypes()

void icmpstr::CVisualRegistryEditorComp::SetAcceptedMimeTypes ( const QStringList & mimeTypes)

Set accepted mime types.

For this types drag'n'drop functionality is enabled.

◆ ToEmbeddedComponent

void icmpstr::CVisualRegistryEditorComp::ToEmbeddedComponent ( )
protectedslot

◆ TryCreateComponent()

icomp::IRegistryElement * icmpstr::CVisualRegistryEditorComp::TryCreateComponent ( const QByteArray & elementId,
const icomp::CComponentAddress & address,
const i2d::CVector2d & position )
protected

Used on drop/paste action.

◆ TryOpenComponent()

bool icmpstr::CVisualRegistryEditorComp::TryOpenComponent ( const CVisualRegistryElement & registryElement)

Try to open the composite component's registry in a new window.

If the element is a composite component the function returns true, otherwise a false.

◆ UpdateComponentSelection()

void icmpstr::CVisualRegistryEditorComp::UpdateComponentSelection ( )
protected

Update component selection and related menu actions.

◆ UpdateEmbeddedRegistryButtons()

void icmpstr::CVisualRegistryEditorComp::UpdateEmbeddedRegistryButtons ( )
protected

Clear and fill the embedded registry button box (used when the number of registry elements changes)

◆ UpdateEmbeddedRegistryView()

void icmpstr::CVisualRegistryEditorComp::UpdateEmbeddedRegistryView ( const QByteArray & id)
protected

Update the scene to display currently selected embedded composition.

◆ UpdateGui()

void icmpstr::CVisualRegistryEditorComp::UpdateGui ( const istd::IChangeable::ChangeSet & changeSet)
overrideprotected

◆ UpdateScene()

virtual void icmpstr::CVisualRegistryEditorComp::UpdateScene ( )
protectedvirtual

The documentation for this class was generated from the following file:

© Witold Gantzke and Kirill Lepskiy