ICF 3.0.5.47
Technical documentation of ICF Libraries
icmpstr::CRegistryElementShape Class Reference

Visualization of geometrical registry elements. More...

#include <CRegistryElementShape.h>

Inheritance diagram for icmpstr::CRegistryElementShape:
Collaboration diagram for icmpstr::CRegistryElementShape:

Public Types

typedef icmpstr::TObjectShapeBase< QGraphicsRectItem, CVisualRegistryElementBaseClass
 
- Public Types inherited from icmpstr::TObjectShapeBase< QGraphicsRectItem, CVisualRegistryElement >
typedef TShapeBase< QGraphicsRectItem > BaseClass
 
typedef imod::TSingleModelObserverBase< CVisualRegistryElementBaseClass2
 
- Public Types inherited from icmpstr::TShapeBase< QGraphicsRectItem >
enum  ColorSheme
 
typedef QGraphicsRectItem BaseClass
 
- Public Types inherited from imod::TSingleModelObserverBase< CVisualRegistryElement >
typedef CSingleModelObserverBase BaseClass
 
typedef CVisualRegistryElement ModelType
 
- Public Types inherited from imod::CSingleModelObserverBase
typedef imod::IModel ModelType
 

Signals

void RectChanged (QRectF rect)
 
void SelectionChanged (bool state)
 

Public Member Functions

 CRegistryElementShape (CVisualRegistryEditorComp *registryViewPtr, const icmpstr::ISceneProvider *providerPtr=nullptr)
 
QRectF GetViewRect () const
 
void CheckConsistency ()
 Check consistency, if it is changed do update.
 
virtual QRectF boundingRect () const
 
virtual void paint (QPainter *painterPtr, const QStyleOptionGraphicsItem *stylePtr, QWidget *widgetPtr)
 
virtual void mouseMoveEvent (QGraphicsSceneMouseEvent *eventPtr)
 
virtual void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *eventPtr)
 
virtual bool OnModelAttached (imod::IModel *modelPtr, istd::IChangeable::ChangeSet &changeMask)
 This call back function will be called, if an observable object is about to be attached.
 
- Public Member Functions inherited from icmpstr::TObjectShapeBase< QGraphicsRectItem, CVisualRegistryElement >
 TObjectShapeBase (bool isEditable=false, const ISceneProvider *providerPtr=nullptr)
 
- Public Member Functions inherited from icmpstr::TShapeBase< QGraphicsRectItem >
 TShapeBase (bool isEditable=false, const ISceneProvider *providerPtr=nullptr)
 
virtual void SetPen (int colorSheme, const QPen &pen)
 
virtual QPen GetPen (int colorSheme) const
 
virtual void SetBrush (int colorSheme, const QBrush &pen)
 
virtual QBrush GetBrush (int colorSheme) const
 
virtual void SwitchColorSheme (int colorSheme)
 
bool IsEditable () const
 
void SetEditable (bool isEditable)
 
const ISceneProviderGetSceneProvider () const
 
- Public Member Functions inherited from imod::TSingleModelObserverBase< CVisualRegistryElement >
 TSingleModelObserverBase ()
 
CVisualRegistryElement * GetObservedObject () const
 Get instance of observed object.
 
CVisualRegistryElement * GetObjectPtr () const
 Get instance of observed object.
 
bool AttachOrSetObject (CVisualRegistryElement *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.
 
- Public Member Functions inherited from imod::IObserver

Protected Types

enum  { SIDE_OFFSET = 4 , SHADOW_OFFSET = 10 }
 

Protected Member Functions

void CalcExportedInteraces (const CVisualRegistryElement &element)
 
void UpdateGraphicsItem (const CVisualRegistryElement &element)
 
virtual void OnSelectionChanged (bool isSelected)
 
- Protected Member Functions inherited from icmpstr::TObjectShapeBase< QGraphicsRectItem, CVisualRegistryElement >
void DoShapeUpdate ()
 
void OnSelectionChanged (bool isSelected) override
 
void OnPositionChanged (const QPointF &position) override
 
QVariant itemChange (QGraphicsItem::GraphicsItemChange change, const QVariant &value) override
 
void mousePressEvent (QGraphicsSceneMouseEvent *eventPtr) override
 
void mouseReleaseEvent (QGraphicsSceneMouseEvent *eventPtr) override
 
void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *eventPtr) 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.
 
void AfterModelChange (imod::IModel *modelPtr, const istd::IChangeable::ChangeSet &changeSet) override
 This function will be called after update of the observer contents occures.
 
- Protected Member Functions inherited from icmpstr::TShapeBase< QGraphicsRectItem >
i2d::CVector2d GetPosFromLocal (const QPointF &position) const
 Map position from local graphics item coordinates.
 
QPointF GetLocalFromPos (const i2d::CVector2d &position) const
 Map position from local graphics item coordinates.
 
virtual void hoverEnterEvent (QGraphicsSceneHoverEvent *event)
 
virtual void hoverLeaveEvent (QGraphicsSceneHoverEvent *event)
 
void paint (QPainter *, const QStyleOptionGraphicsItem *, QWidget *)
 
void paint (QPainter *, const QStyleOptionGraphicsItem *, QWidget *)
 
- Protected Member Functions inherited from imod::TSingleModelObserverBase< CVisualRegistryElement >
virtual CVisualRegistryElement * CastFromModel (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.
 

Detailed Description

Visualization of geometrical registry elements.

Definition at line 30 of file CRegistryElementShape.h.

Member Typedef Documentation

◆ BaseClass

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
SIDE_OFFSET 
SHADOW_OFFSET 

Definition at line 62 of file CRegistryElementShape.h.

Constructor & Destructor Documentation

◆ CRegistryElementShape()

icmpstr::CRegistryElementShape::CRegistryElementShape ( CVisualRegistryEditorComp * registryViewPtr,
const icmpstr::ISceneProvider * providerPtr = nullptr )

Member Function Documentation

◆ boundingRect()

virtual QRectF icmpstr::CRegistryElementShape::boundingRect ( ) const
virtual

◆ CalcExportedInteraces()

void icmpstr::CRegistryElementShape::CalcExportedInteraces ( const CVisualRegistryElement & element)
protected

◆ CheckConsistency()

void icmpstr::CRegistryElementShape::CheckConsistency ( )

Check consistency, if it is changed do update.

◆ GetViewRect()

QRectF icmpstr::CRegistryElementShape::GetViewRect ( ) const

◆ mouseDoubleClickEvent()

virtual void icmpstr::CRegistryElementShape::mouseDoubleClickEvent ( QGraphicsSceneMouseEvent * eventPtr)
virtual

◆ mouseMoveEvent()

virtual void icmpstr::CRegistryElementShape::mouseMoveEvent ( QGraphicsSceneMouseEvent * eventPtr)
virtual

◆ OnModelAttached()

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

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.

Implements imod::IObserver.

◆ OnSelectionChanged()

virtual void icmpstr::CRegistryElementShape::OnSelectionChanged ( bool isSelected)
protectedvirtual

◆ paint()

virtual void icmpstr::CRegistryElementShape::paint ( QPainter * painterPtr,
const QStyleOptionGraphicsItem * stylePtr,
QWidget * widgetPtr )
virtual

◆ RectChanged

void icmpstr::CRegistryElementShape::RectChanged ( QRectF rect)
signal

◆ SelectionChanged

void icmpstr::CRegistryElementShape::SelectionChanged ( bool state)
signal

◆ UpdateGraphicsItem()

void icmpstr::CRegistryElementShape::UpdateGraphicsItem ( const CVisualRegistryElement & element)
protectedvirtual

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

© Witold Gantzke and Kirill Lepskiy