Public Types | Public Member Functions | Protected Member Functions | List of all members
icmpstr::TObjectShapeBase< GraphicsItemClass, ObjectClass > Class Template Referenceabstract

#include <TObjectShapeBase.h>

Inheritance diagram for icmpstr::TObjectShapeBase< GraphicsItemClass, ObjectClass >:
icmpstr::TShapeBase< GraphicsItemClass > imod::TSingleModelObserverBase< ObjectClass > imod::CSingleModelObserverBase imod::IObserver istd::IPolymorphic

Public Types

typedef TShapeBase
< GraphicsItemClass > 
BaseClass
 
typedef
imod::TSingleModelObserverBase
< ObjectClass > 
BaseClass2
 
- Public Types inherited from icmpstr::TShapeBase< GraphicsItemClass >
enum  ColorSheme { SelectedColor, EditableColor, InactiveColor, DefaultColor = InactiveColor }
 
typedef GraphicsItemClass BaseClass
 
- Public Types inherited from imod::TSingleModelObserverBase< ObjectClass >
typedef CSingleModelObserverBase BaseClass
 
typedef ObjectClass ModelType
 

Public Member Functions

 TObjectShapeBase (bool isEditable=false, const ISceneProvider *providerPtr=NULL)
 
- Public Member Functions inherited from icmpstr::TShapeBase< GraphicsItemClass >
 TShapeBase (bool isEditable=false, const ISceneProvider *providerPtr=NULL)
 
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< ObjectClass >
 TSingleModelObserverBase ()
 
ObjectClass * GetObservedObject () const
 
ObjectClass * GetObjectPtr () const
 
bool AttachOrSetObject (ObjectClass *objectPtr)
 
virtual bool OnModelAttached (imod::IModel *modelPtr, istd::IChangeable::ChangeSet &changeMask)
 
virtual bool OnModelDetached (imod::IModel *modelPtr)
 
- Public Member Functions inherited from imod::IObserver
virtual bool IsModelAttached (const IModel *modelPtr=NULL) const =0
 
virtual void BeforeUpdate (IModel *modelPtr)=0
 

Protected Member Functions

virtual void OnSelectionChanged (bool isSelected)
 
virtual void OnPositionChanged (const QPointF &position)
 
virtual QVariant itemChange (QGraphicsItem::GraphicsItemChange change, const QVariant &value)
 
virtual void mousePressEvent (QGraphicsSceneMouseEvent *eventPtr)
 
virtual void mouseReleaseEvent (QGraphicsSceneMouseEvent *eventPtr)
 
virtual void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *eventPtr)
 
virtual void AfterUpdate (imod::IModel *modelPtr, const istd::IChangeable::ChangeSet &changeSet)
 
virtual void UpdateGraphicsItem (const ObjectClass &object)=0
 
- Protected Member Functions inherited from icmpstr::TShapeBase< GraphicsItemClass >
i2d::CVector2d GetPosFromLocal (const QPointF &position) const
 Map position from local graphics item coordinates. More...
 
QPointF GetLocalFromPos (const i2d::CVector2d &position) const
 Map position from local graphics item coordinates. More...
 
virtual void hoverEnterEvent (QGraphicsSceneHoverEvent *event)
 
virtual void hoverLeaveEvent (QGraphicsSceneHoverEvent *event)
 
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=NULL)
 
template<>
void paint (QPainter *, const QStyleOptionGraphicsItem *, QWidget *)
 
template<>
void paint (QPainter *, const QStyleOptionGraphicsItem *, QWidget *)
 
- Protected Member Functions inherited from imod::TSingleModelObserverBase< ObjectClass >
virtual ObjectClass * CastFromModel (imod::IModel *modelPtr) const
 

Detailed Description

template<class GraphicsItemClass, class ObjectClass>
class icmpstr::TObjectShapeBase< GraphicsItemClass, ObjectClass >

Definition at line 28 of file TObjectShapeBase.h.

Member Typedef Documentation

template<class GraphicsItemClass, class ObjectClass>
typedef TShapeBase<GraphicsItemClass> icmpstr::TObjectShapeBase< GraphicsItemClass, ObjectClass >::BaseClass

Definition at line 33 of file TObjectShapeBase.h.

template<class GraphicsItemClass, class ObjectClass>
typedef imod::TSingleModelObserverBase<ObjectClass> icmpstr::TObjectShapeBase< GraphicsItemClass, ObjectClass >::BaseClass2

Definition at line 34 of file TObjectShapeBase.h.

Constructor & Destructor Documentation

template<class GraphicsItemClass , class ObjectClass >
icmpstr::TObjectShapeBase< GraphicsItemClass, ObjectClass >::TObjectShapeBase ( bool  isEditable = false,
const ISceneProvider providerPtr = NULL 
)

Member Function Documentation

template<class GraphicsItemClass , class ObjectClass >
void icmpstr::TObjectShapeBase< GraphicsItemClass, ObjectClass >::AfterUpdate ( imod::IModel modelPtr,
const istd::IChangeable::ChangeSet changeSet 
)
protectedvirtual

Implements imod::IObserver.

Definition at line 171 of file TObjectShapeBase.h.

References istd::IChangeable::ChangeSet::ContainsExplicit(), and NULL.

template<class GraphicsItemClass , class ObjectClass >
QVariant icmpstr::TObjectShapeBase< GraphicsItemClass, ObjectClass >::itemChange ( QGraphicsItem::GraphicsItemChange  change,
const QVariant &  value 
)
protectedvirtual

Reimplemented from icmpstr::TShapeBase< GraphicsItemClass >.

Definition at line 127 of file TObjectShapeBase.h.

template<class GraphicsItemClass , class ObjectClass >
void icmpstr::TObjectShapeBase< GraphicsItemClass, ObjectClass >::mouseDoubleClickEvent ( QGraphicsSceneMouseEvent *  eventPtr)
protectedvirtual

Reimplemented in icmpstr::CRegistryElementShape.

Definition at line 160 of file TObjectShapeBase.h.

template<class GraphicsItemClass , class ObjectClass >
void icmpstr::TObjectShapeBase< GraphicsItemClass, ObjectClass >::mousePressEvent ( QGraphicsSceneMouseEvent *  eventPtr)
protectedvirtual

Definition at line 138 of file TObjectShapeBase.h.

template<class GraphicsItemClass , class ObjectClass >
void icmpstr::TObjectShapeBase< GraphicsItemClass, ObjectClass >::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  eventPtr)
protectedvirtual

Definition at line 151 of file TObjectShapeBase.h.

template<class GraphicsItemClass , class ObjectClass >
void icmpstr::TObjectShapeBase< GraphicsItemClass, ObjectClass >::OnPositionChanged ( const QPointF &  position)
protectedvirtual

Reimplemented from icmpstr::TShapeBase< GraphicsItemClass >.

Definition at line 111 of file TObjectShapeBase.h.

References NULL.

template<class GraphicsItemClass , class ObjectClass >
void icmpstr::TObjectShapeBase< GraphicsItemClass, ObjectClass >::OnSelectionChanged ( bool  isSelected)
protectedvirtual

Reimplemented from icmpstr::TShapeBase< GraphicsItemClass >.

Reimplemented in icmpstr::CRegistryElementShape.

Definition at line 94 of file TObjectShapeBase.h.

template<class GraphicsItemClass, class ObjectClass>
virtual void icmpstr::TObjectShapeBase< GraphicsItemClass, ObjectClass >::UpdateGraphicsItem ( const ObjectClass &  object)
protectedpure virtual

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

© 2007-2017 Witold Gantzke and Kirill Lepskiy