![]() |
ICF 3.0.5.47
Technical documentation of ICF Libraries
|
Visualization of geometrical registry elements. More...
#include <CRegistryElementShape.h>
Public Types | |
typedef icmpstr::TObjectShapeBase< QGraphicsRectItem, CVisualRegistryElement > | BaseClass |
![]() | |
typedef TShapeBase< QGraphicsRectItem > | BaseClass |
typedef imod::TSingleModelObserverBase< CVisualRegistryElement > | BaseClass2 |
![]() | |
enum | ColorSheme |
typedef QGraphicsRectItem | BaseClass |
![]() | |
typedef CSingleModelObserverBase | BaseClass |
typedef CVisualRegistryElement | ModelType |
![]() | |
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. | |
![]() | |
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 () | |
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. | |
![]() | |
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 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) |
![]() | |
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. | |
![]() | |
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 *) |
![]() | |
virtual CVisualRegistryElement * | 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. | |
Visualization of geometrical registry elements.
Definition at line 30 of file CRegistryElementShape.h.
icmpstr::TObjectShapeBase<QGraphicsRectItem, CVisualRegistryElement> icmpstr::CRegistryElementShape::BaseClass |
Definition at line 35 of file CRegistryElementShape.h.
|
protected |
Enumerator | |
---|---|
SIDE_OFFSET | |
SHADOW_OFFSET |
Definition at line 62 of file CRegistryElementShape.h.
icmpstr::CRegistryElementShape::CRegistryElementShape | ( | CVisualRegistryEditorComp * | registryViewPtr, |
const icmpstr::ISceneProvider * | providerPtr = nullptr ) |
|
virtual |
|
protected |
void icmpstr::CRegistryElementShape::CheckConsistency | ( | ) |
Check consistency, if it is changed do update.
QRectF icmpstr::CRegistryElementShape::GetViewRect | ( | ) | const |
|
virtual |
|
virtual |
|
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.
modelPtr | pointer to model object being attached. |
changeMask | output parameter returning set of change ID's will be accepted. returns a false . |
Implements imod::IObserver.
|
protectedvirtual |
Reimplemented from icmpstr::TShapeBase< QGraphicsRectItem >.
|
virtual |
Reimplemented from icmpstr::TShapeBase< QGraphicsRectItem >.
|
signal |
|
signal |
|
protectedvirtual |
© Witold Gantzke and Kirill Lepskiy