Public Types | Public Member Functions | Protected Member Functions | List of all members
icmpstr::TShapeBase< GraphicsItemClass > Class Template Reference

#include <TShapeBase.h>

Inheritance diagram for icmpstr::TShapeBase< GraphicsItemClass >:
icmpstr::TObjectShapeBase< GraphicsItemClass, ObjectClass >

Public Types

enum  ColorSheme { SelectedColor, EditableColor, InactiveColor, DefaultColor = InactiveColor }
 
typedef GraphicsItemClass BaseClass
 

Public Member Functions

 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
 

Protected Member Functions

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 OnSelectionChanged (bool isSelected)
 
virtual void OnPositionChanged (const QPointF &position)
 
virtual QVariant itemChange (QGraphicsItem::GraphicsItemChange change, const QVariant &value)
 
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 *)
 

Detailed Description

template<class GraphicsItemClass>
class icmpstr::TShapeBase< GraphicsItemClass >

Definition at line 33 of file TShapeBase.h.

Member Typedef Documentation

template<class GraphicsItemClass>
typedef GraphicsItemClass icmpstr::TShapeBase< GraphicsItemClass >::BaseClass

Definition at line 36 of file TShapeBase.h.

Member Enumeration Documentation

template<class GraphicsItemClass>
enum icmpstr::TShapeBase::ColorSheme
Enumerator
SelectedColor 

Color for a selected shape.

EditableColor 

Color for a shape, that can be edited on the graphics view.

InactiveColor 

Color for a shape, that can not be edited on the graphics view.

DefaultColor 

Standard shape color.

Definition at line 38 of file TShapeBase.h.

Constructor & Destructor Documentation

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

Definition at line 109 of file TShapeBase.h.

Member Function Documentation

template<class GraphicsItemClass >
QBrush icmpstr::TShapeBase< GraphicsItemClass >::GetBrush ( int  colorSheme) const
virtual

Definition at line 161 of file TShapeBase.h.

template<class GraphicsItemClass >
QPointF icmpstr::TShapeBase< GraphicsItemClass >::GetLocalFromPos ( const i2d::CVector2d position) const
protected

Map position from local graphics item coordinates.

Definition at line 229 of file TShapeBase.h.

template<class GraphicsItemClass >
QPen icmpstr::TShapeBase< GraphicsItemClass >::GetPen ( int  colorSheme) const
virtual

Definition at line 136 of file TShapeBase.h.

template<class GraphicsItemClass >
i2d::CVector2d icmpstr::TShapeBase< GraphicsItemClass >::GetPosFromLocal ( const QPointF &  position) const
protected

Map position from local graphics item coordinates.

Definition at line 222 of file TShapeBase.h.

template<class GraphicsItemClass >
const ISceneProvider * icmpstr::TShapeBase< GraphicsItemClass >::GetSceneProvider ( ) const

Definition at line 213 of file TShapeBase.h.

template<class GraphicsItemClass >
void icmpstr::TShapeBase< GraphicsItemClass >::hoverEnterEvent ( QGraphicsSceneHoverEvent *  event)
protectedvirtual

Definition at line 301 of file TShapeBase.h.

template<class GraphicsItemClass >
void icmpstr::TShapeBase< GraphicsItemClass >::hoverLeaveEvent ( QGraphicsSceneHoverEvent *  event)
protectedvirtual

Definition at line 310 of file TShapeBase.h.

template<class GraphicsItemClass >
bool icmpstr::TShapeBase< GraphicsItemClass >::IsEditable ( ) const

Definition at line 193 of file TShapeBase.h.

template<class GraphicsItemClass >
QVariant icmpstr::TShapeBase< GraphicsItemClass >::itemChange ( QGraphicsItem::GraphicsItemChange  change,
const QVariant &  value 
)
protectedvirtual
template<class GraphicsItemClass >
void icmpstr::TShapeBase< GraphicsItemClass >::OnPositionChanged ( const QPointF &  position)
protectedvirtual
template<class GraphicsItemClass >
void icmpstr::TShapeBase< GraphicsItemClass >::OnSelectionChanged ( bool  isSelected)
protectedvirtual
template<class GraphicsItemClass >
void icmpstr::TShapeBase< GraphicsItemClass >::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget = NULL 
)
protectedvirtual

Reimplemented in icmpstr::CRegistryElementShape.

Definition at line 319 of file TShapeBase.h.

References NULL.

template<>
void icmpstr::TShapeBase< QGraphicsItem >::paint ( QPainter *  ,
const QStyleOptionGraphicsItem *  ,
QWidget *   
)
inlineprotected

Definition at line 339 of file TShapeBase.h.

template<>
void icmpstr::TShapeBase< QAbstractGraphicsShapeItem >::paint ( QPainter *  ,
const QStyleOptionGraphicsItem *  ,
QWidget *   
)
inlineprotected

Definition at line 345 of file TShapeBase.h.

template<class GraphicsItemClass >
void icmpstr::TShapeBase< GraphicsItemClass >::SetBrush ( int  colorSheme,
const QBrush &  pen 
)
virtual

Definition at line 147 of file TShapeBase.h.

template<class GraphicsItemClass >
void icmpstr::TShapeBase< GraphicsItemClass >::SetEditable ( bool  isEditable)

Definition at line 200 of file TShapeBase.h.

template<class GraphicsItemClass >
void icmpstr::TShapeBase< GraphicsItemClass >::SetPen ( int  colorSheme,
const QPen &  pen 
)
virtual
template<class GraphicsItemClass >
void icmpstr::TShapeBase< GraphicsItemClass >::SwitchColorSheme ( int  colorSheme)
virtual

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

© 2007-2017 Witold Gantzke and Kirill Lepskiy