![]() |
ICF 3.0.5.47
Technical documentation of ICF Libraries
|
#include <TObjectShapeBase.h>
Public Types | |
typedef TShapeBase< GraphicsItemClass > | BaseClass |
typedef imod::TSingleModelObserverBase< ObjectClass > | BaseClass2 |
![]() | |
enum | ColorSheme { SelectedColor , EditableColor , InactiveColor , DefaultColor = InactiveColor } |
typedef GraphicsItemClass | BaseClass |
![]() | |
typedef CSingleModelObserverBase | BaseClass |
typedef ObjectClass | ModelType |
![]() | |
typedef imod::IModel | ModelType |
Public Member Functions | |
TObjectShapeBase (bool isEditable=false, const ISceneProvider *providerPtr=nullptr) | |
![]() | |
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 ISceneProvider * | GetSceneProvider () const |
![]() | |
TSingleModelObserverBase () | |
ObjectClass * | GetObservedObject () const |
Get instance of observed object. | |
ObjectClass * | GetObjectPtr () const |
Get instance of observed object. | |
bool | AttachOrSetObject (ObjectClass *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. | |
![]() | |
CSingleModelObserverBase () | |
virtual | ~CSingleModelObserverBase () |
imod::IModel * | GetObservedModel () const |
Get access to observed model. | |
imod::IModel * | GetModelPtr () 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. | |
![]() |
Protected Member Functions | |
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. | |
virtual void | UpdateGraphicsItem (const ObjectClass &object)=0 |
![]() | |
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) |
virtual void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=nullptr) |
void | paint (QPainter *, const QStyleOptionGraphicsItem *, QWidget *) |
void | paint (QPainter *, const QStyleOptionGraphicsItem *, QWidget *) |
![]() | |
virtual ObjectClass * | CastFromModel (imod::IModel *modelPtr) const |
![]() | |
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. | |
Definition at line 25 of file TObjectShapeBase.h.
TShapeBase<GraphicsItemClass> icmpstr::TObjectShapeBase< GraphicsItemClass, ObjectClass >::BaseClass |
Definition at line 30 of file TObjectShapeBase.h.
imod::TSingleModelObserverBase<ObjectClass> icmpstr::TObjectShapeBase< GraphicsItemClass, ObjectClass >::BaseClass2 |
Definition at line 31 of file TObjectShapeBase.h.
icmpstr::TObjectShapeBase< GraphicsItemClass, ObjectClass >::TObjectShapeBase | ( | bool | isEditable = false, |
const ISceneProvider * | providerPtr = nullptr ) |
Definition at line 69 of file TObjectShapeBase.h.
References icmpstr::TShapeBase< GraphicsItemClass >::EditableColor, icmpstr::TShapeBase< GraphicsItemClass >::InactiveColor, icmpstr::TShapeBase< GraphicsItemClass >::SelectedColor, icmpstr::TShapeBase< GraphicsItemClass >::SetPen(), and icmpstr::TShapeBase< GraphicsItemClass >::SwitchColorSheme().
|
overrideprotectedvirtual |
This function will be called after update of the observer contents occures.
Reimplemented from imod::CSingleModelObserverBase.
Definition at line 199 of file TObjectShapeBase.h.
References istd::IChangeable::CF_DESTROYING, and istd::IChangeable::ChangeSet::ContainsExplicit().
|
protected |
Definition at line 92 of file TObjectShapeBase.h.
|
overrideprotectedvirtual |
Reimplemented from icmpstr::TShapeBase< GraphicsItemClass >.
Definition at line 142 of file TObjectShapeBase.h.
|
overrideprotected |
Definition at line 175 of file TObjectShapeBase.h.
|
overrideprotected |
Definition at line 153 of file TObjectShapeBase.h.
|
overrideprotected |
Definition at line 166 of file TObjectShapeBase.h.
|
overrideprotectedvirtual |
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.
modelPtr | pointer to model object being attached. |
changeMask | output parameter returning set of change ID's will be accepted. returns a false . |
Reimplemented from imod::CSingleModelObserverBase.
Definition at line 186 of file TObjectShapeBase.h.
|
overrideprotectedvirtual |
Reimplemented from icmpstr::TShapeBase< GraphicsItemClass >.
Definition at line 126 of file TObjectShapeBase.h.
References i2d::IObject2d::GetCenter(), and i2d::IObject2d::MoveCenterTo().
|
overrideprotectedvirtual |
Reimplemented from icmpstr::TShapeBase< GraphicsItemClass >.
Definition at line 109 of file TObjectShapeBase.h.
|
protectedpure virtual |
Implemented in icmpstr::CRegistryElementShape.
© Witold Gantzke and Kirill Lepskiy