ICF 3.0.5.47
Technical documentation of ICF Libraries
icmpstr::TShapeBase< GraphicsItemClass > Class Template Reference

#include <TShapeBase.h>

Inheritance diagram for icmpstr::TShapeBase< GraphicsItemClass >:
Collaboration diagram for icmpstr::TShapeBase< GraphicsItemClass >:

Public Types

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

Public Member Functions

 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
 

Protected Member Functions

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 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=nullptr)
 
void paint (QPainter *, const QStyleOptionGraphicsItem *, QWidget *)
 
void paint (QPainter *, const QStyleOptionGraphicsItem *, QWidget *)
 

Detailed Description

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

Definition at line 30 of file TShapeBase.h.

Member Typedef Documentation

◆ BaseClass

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

Definition at line 33 of file TShapeBase.h.

Member Enumeration Documentation

◆ ColorSheme

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 35 of file TShapeBase.h.

Constructor & Destructor Documentation

◆ TShapeBase()

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

Definition at line 106 of file TShapeBase.h.

Member Function Documentation

◆ GetBrush()

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

Definition at line 154 of file TShapeBase.h.

◆ GetLocalFromPos()

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

Map position from local graphics item coordinates.

Definition at line 222 of file TShapeBase.h.

◆ GetPen()

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

Definition at line 129 of file TShapeBase.h.

◆ GetPosFromLocal()

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

Map position from local graphics item coordinates.

Definition at line 215 of file TShapeBase.h.

◆ GetSceneProvider()

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

Definition at line 206 of file TShapeBase.h.

◆ hoverEnterEvent()

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

Definition at line 294 of file TShapeBase.h.

◆ hoverLeaveEvent()

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

Definition at line 303 of file TShapeBase.h.

◆ IsEditable()

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

Definition at line 186 of file TShapeBase.h.

◆ itemChange()

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

◆ OnPositionChanged()

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

◆ OnSelectionChanged()

template<class GraphicsItemClass >
void icmpstr::TShapeBase< GraphicsItemClass >::OnSelectionChanged ( bool isSelected)
protectedvirtual

◆ paint() [1/3]

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

Definition at line 332 of file TShapeBase.h.

◆ paint() [2/3]

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

Definition at line 338 of file TShapeBase.h.

◆ paint() [3/3]

template<class GraphicsItemClass >
void icmpstr::TShapeBase< GraphicsItemClass >::paint ( QPainter * painter,
const QStyleOptionGraphicsItem * option,
QWidget * widget = nullptr )
protectedvirtual

Reimplemented in icmpstr::CRegistryElementShape.

Definition at line 312 of file TShapeBase.h.

◆ SetBrush()

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

Definition at line 140 of file TShapeBase.h.

◆ SetEditable()

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

Definition at line 193 of file TShapeBase.h.

◆ SetPen()

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

◆ SwitchColorSheme()

template<class GraphicsItemClass >
void icmpstr::TShapeBase< GraphicsItemClass >::SwitchColorSheme ( int colorSheme)
virtual

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

© Witold Gantzke and Kirill Lepskiy