Classes | Public Types | Public Member Functions | Protected Types | Protected Slots | Protected Member Functions | Friends | List of all members
icmpstr::CVisualRegistryEditorComp Class Reference

#include <CVisualRegistryEditorComp.h>

Inheritance diagram for icmpstr::CVisualRegistryEditorComp:
icmpstr::CVisualRegistryEditorCompBase iqtgui::TDesignerGuiObserverCompBase< Ui::CVisualRegistryEditorComp, icomp::IRegistry > iqtgui::IDropConsumer ibase::ICommandsProvider imod::CMultiModelDispatcherBase istd::IPolymorphic istd::IChangeable istd::IPolymorphic istd::IPolymorphic

Classes

class  EnvironmentObserver
 

Public Types

typedef
CVisualRegistryEditorCompBase 
BaseClass
 
- Public Types inherited from icmpstr::CVisualRegistryEditorCompBase
typedef
iqtgui::TDesignerGuiObserverCompBase
< Ui::CVisualRegistryEditorComp,
icomp::IRegistry
BaseClass
 
- Public Types inherited from ibase::ICommandsProvider
enum  ChangeFlags
 

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. More...
 
void SetAcceptedMimeTypes (const QStringList &mimeTypes)
 Set accepted mime types. More...
 
virtual const
ibase::IHierarchicalCommand
GetCommands () const
 
virtual QStringList GetAcceptedMimeIds () const
 
virtual void OnDropFinished (const QMimeData &mimeData, QEvent *eventPtr)
 

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. More...
 
void UpdateEmbeddedRegistryButtons ()
 Clear and fill the embedded registry button box (used when the number of registry elements changes) More...
 
void UpdateEmbeddedRegistryView (const QByteArray &id)
 Update the scene to display currently selected embedded composition. More...
 
virtual void OnGuiCreated ()
 
virtual void OnGuiDestroyed ()
 

Protected Member Functions

icomp::IRegistryGetSelectedRegistry () const
 Get root or embedded registry that is currently selected in the editor. More...
 
QGraphicsItem * AddShapeToScene (iser::ISerializable *elementPtr) const
 Create instance of shape representing some element. More...
 
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. More...
 
void ConnectReferences (const QByteArray &componentRole)
 Used by TryCreateComponent() when an existing component is pasted (?) to update attributes referencing it, in all registry elements. More...
 
void UpdateComponentSelection ()
 Update component selection and related menu actions. More...
 
void DoRetranslate ()
 
virtual bool OnDropObject (const QMimeData &data, QGraphicsSceneDragDropEvent *eventPtr)
 
virtual void UpdateScene ()
 
virtual void OnModelChanged (int modelId, const istd::IChangeable::ChangeSet &changeSet)
 
virtual void UpdateGui (const istd::IChangeable::ChangeSet &changeSet)
 
virtual bool OnModelAttached (imod::IModel *modelPtr, istd::IChangeable::ChangeSet &changeMask)
 
virtual bool OnModelDetached (imod::IModel *modelPtr)
 
virtual void OnRetranslate ()
 
virtual void OnComponentCreated ()
 
virtual void OnComponentDestroyed ()
 

Friends

class imod::TModelWrap< SelectionInfoImpl >
 

Detailed Description

Definition at line 84 of file CVisualRegistryEditorComp.h.

Member Typedef Documentation

Definition at line 89 of file CVisualRegistryEditorComp.h.

Member Enumeration Documentation

Enumerator
GI_COMPONENT 
GI_EMBEDDED_REGISTRY 
GI_CODEGEN 
GI_PREVIEW 
GI_EDIT 
GI_TOOLS 

Definition at line 131 of file CVisualRegistryEditorComp.h.

Constructor & Destructor Documentation

icmpstr::CVisualRegistryEditorComp::CVisualRegistryEditorComp ( )

Member Function Documentation

void icmpstr::CVisualRegistryEditorComp::AddConnector ( CRegistryElementShape sourceShape,
const QByteArray &  referenceComponentId,
const QByteArray &  attributeId,
bool  isFactory = false 
)
protected
void icmpstr::CVisualRegistryEditorComp::AddConnectorsToScene ( )
protected
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.
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
void icmpstr::CVisualRegistryEditorComp::DoRetranslate ( )
protected
virtual QStringList icmpstr::CVisualRegistryEditorComp::GetAcceptedMimeIds ( ) const
virtual

Implements iqtgui::IDropConsumer.

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

Reimplemented from ibase::ICommandsProvider.

const QFont& icmpstr::CVisualRegistryEditorComp::GetElementDetailFont ( ) const
const QFont& icmpstr::CVisualRegistryEditorComp::GetElementNameFont ( ) const
const icomp::IMetaInfoManager * icmpstr::CVisualRegistryEditorComp::GetMetaInfoManager ( ) const
inline

Definition at line 314 of file CVisualRegistryEditorComp.h.

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

Definition at line 320 of file CVisualRegistryEditorComp.h.

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

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

void icmpstr::CVisualRegistryEditorComp::NewEmbeddedComponent ( )
protectedslot
void icmpstr::CVisualRegistryEditorComp::OnAbort ( )
protectedslot
virtual void icmpstr::CVisualRegistryEditorComp::OnComponentCreated ( )
protectedvirtual
virtual void icmpstr::CVisualRegistryEditorComp::OnComponentDestroyed ( )
protectedvirtual
void icmpstr::CVisualRegistryEditorComp::OnCopyCommand ( )
protectedslot
void icmpstr::CVisualRegistryEditorComp::OnCutCommand ( )
protectedslot
virtual void icmpstr::CVisualRegistryEditorComp::OnDropFinished ( const QMimeData &  mimeData,
QEvent *  eventPtr 
)
virtual

Implements iqtgui::IDropConsumer.

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

Selects (checks) a button representing an embedded composition.

void icmpstr::CVisualRegistryEditorComp::OnExecute ( )
protectedslot
void icmpstr::CVisualRegistryEditorComp::OnExecutionTimerTick ( )
protectedslot
void icmpstr::CVisualRegistryEditorComp::OnExportToCode ( )
protectedslot
virtual void icmpstr::CVisualRegistryEditorComp::OnGuiCreated ( )
protectedvirtualslot
virtual void icmpstr::CVisualRegistryEditorComp::OnGuiDestroyed ( )
protectedvirtualslot
virtual bool icmpstr::CVisualRegistryEditorComp::OnModelAttached ( imod::IModel modelPtr,
istd::IChangeable::ChangeSet changeMask 
)
protectedvirtual
virtual void icmpstr::CVisualRegistryEditorComp::OnModelChanged ( int  modelId,
const istd::IChangeable::ChangeSet changeSet 
)
protectedvirtual
virtual bool icmpstr::CVisualRegistryEditorComp::OnModelDetached ( imod::IModel modelPtr)
protectedvirtual
void icmpstr::CVisualRegistryEditorComp::OnPasteCommand ( )
protectedslot
void icmpstr::CVisualRegistryEditorComp::OnRemoveComponent ( )
protectedslot
void icmpstr::CVisualRegistryEditorComp::OnRenameComponent ( )
protectedslot
virtual void icmpstr::CVisualRegistryEditorComp::OnRetranslate ( )
protectedvirtual
void icmpstr::CVisualRegistryEditorComp::OnSelectionChanged ( )
protectedslot
void icmpstr::CVisualRegistryEditorComp::OnShowRegistryTopology ( )
protectedslot
void icmpstr::CVisualRegistryEditorComp::RemoveEmbeddedComponent ( )
protectedslot
void icmpstr::CVisualRegistryEditorComp::SetAcceptedMimeTypes ( const QStringList &  mimeTypes)

Set accepted mime types.

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

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

Used on drop/paste action.

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.

void icmpstr::CVisualRegistryEditorComp::UpdateComponentSelection ( )
protected

Update component selection and related menu actions.

void icmpstr::CVisualRegistryEditorComp::UpdateEmbeddedRegistryButtons ( )
protectedslot

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

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

Update the scene to display currently selected embedded composition.

virtual void icmpstr::CVisualRegistryEditorComp::UpdateGui ( const istd::IChangeable::ChangeSet changeSet)
protectedvirtual
virtual void icmpstr::CVisualRegistryEditorComp::UpdateScene ( )
protectedvirtual

Friends And Related Function Documentation

friend class imod::TModelWrap< SelectionInfoImpl >
friend

Definition at line 266 of file CVisualRegistryEditorComp.h.


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

© 2007-2017 Witold Gantzke and Kirill Lepskiy