6#ifndef iview_CShapeBase_included
7#define iview_CShapeBase_included
178 explicit CalibrationObserver(
CShapeBase* parentPtr);
190 CalibrationObserver m_calibrationObserver;
196 mutable bool m_isBoundingBoxValid;
199 mutable bool m_hasPendingChanges;
208 QString m_defaultDescription;
Simple rectangle with integer bounds.
Definition of position or mathematical vector on 2D plane.
Basic implementation for a single model observer.
Common interface for model objects, that supports Model/Observer design pattern.
Basic implementation for a single model observer with binding to concrete data object interface.
Index implementation for addressing elements in 2D-space.
Call some function in main application thread.
Set of change flags (its IDs).
Base class of standard shape implementation.
ShapeTransformMode GetTransformMode() const
Get shape transformation mode.
bool OnModelDetached(imod::IModel *modelPtr) override
This call back function will be called, if an observable object is about to be detached.
CShapeBase(const CShapeBase &shape)
virtual const iview::CScreenTransform & GetViewToScreenTransform() const
bool OnDisplayChanged(const istd::IChangeable::ChangeSet &changeSet) override
It informs about changes in display.
void OnDisplayConnected(IDisplay *displayPtr) override
Called after display is connected.
virtual void Invalidate()
void SetDefaultDescription(const QString &description) override
Set default description will be used to display on console.
const IColorSchema & GetColorSchema() const
Get color schema for this shape.
void SetVisible(bool state=true) override
Make shape to be visible or not.
ITouchable::TouchState IsTouched(istd::CIndex2d position) const override
Check, if any shape is touched.
bool IsDisplayConnected() const
Check if display is connected.
i2d::CRect GetBoundingBox() const override
Return bounding box in client window coordinates.
QString GetShapeDescriptionAt(istd::CIndex2d position) const override
Get description to shape at specified position.
bool IsDisplayAccepted(const IDisplay &display) const override
Check if this object can be connected to this display.
imod::CSingleModelObserverBase BaseClass
virtual void InvalidateBoundingBox()
Invalidate bounding box.
i2d::CVector2d GetLogPosition(const i2d::CVector2d &screenPosition) const
Get logical position based on screen position.
double GetLocalLineWidth(const i2d::CVector2d &screenPosition) const
Get line with (in logical coordinates) for single screen position.
virtual i2d::CRect CalcBoundingBox() const =0
Calculate bounding box.
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 IsBoundingBoxValid() const
iview::IDisplay * GetDisplay() const
Get access to currently connected display.
bool IsVisible() const override
Check, if this object is visible.
i2d::CRect GetClientRect() const
Get display client rectangle.
i2d::CVector2d GetScreenPosition(const i2d::CVector2d &logPosition) const
Get screen position based on logical position.
void SetTransformMode(ShapeTransformMode mode)
Set shape transformation mode.
const IColorSchema * GetUserColorSchema() const override
Get color schema from view or user defined.
void OnDisplayDisconnected(IDisplay *displayPtr) override
Called after display is disconnected.
int GetLayerType() const override
Get layer type of this shape object.
virtual bool IsDisplayChangeImportant(const istd::IChangeable::ChangeSet &changeSet)
Get display changes mask.
ShapeTransformMode
Describe how shape tranformation is interpreted.
@ STM_SHAPE
View transformation will be ignored, shape transformation will be used.
@ STM_VIEW
Shape transformation will be ignored, view transformation will be used.
@ STM_COMBINE
Both transformation will be used, shape transformation will be used as local transformation.
void OnUpdate(const istd::IChangeable::ChangeSet &changeSet) override
Called on update of observed model.
virtual bool AssignToLayer(int layerType)
Assign this shape to same layer.
void SetUserColorSchema(const IColorSchema *schemaPtr) override
Set color schema to draw shape.
Defines set of standard pens, brushes and simple management of unions.
Common interface for all display console shapes.
TouchState
Enumeration for possible shape touch states.
In this library is defined 2D view concept and standard visualisation objects.