94 virtual void SetToolTip(
const QString& toolTip)
override;
172 explicit CalibrationObserver(
CShapeBase* parentPtr);
184 CalibrationObserver m_calibrationObserver;
190 mutable bool m_isBoundingBoxValid =
false;
194 bool m_isVisible =
true;
198 QString m_defaultDescription;
199 QString m_defaultToolTip;
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.
Set of change flags (its IDs).
ShapeTransformMode GetTransformMode() const
Get shape transformation mode.
CShapeBase(const CShapeBase &shape)
virtual void OnDisconnectDisplay(IDisplay *displayPtr) override
Called after display is disconnected.
virtual const iview::CScreenTransform & GetViewToScreenTransform() const
virtual bool IsDisplayAccepted(const IDisplay &display) const override
Check if this object can be connected to this display.
virtual void Invalidate()
const IColorSchema & GetColorSchema() const
Get color schema for this shape.
virtual void OnUpdate(const istd::IChangeable::ChangeSet &changeSet) override
Called on update of observed model.
bool IsDisplayConnected() const
Check if display is connected.
virtual void SetToolTip(const QString &toolTip) override
virtual bool OnModelDetached(imod::IModel *modelPtr) override
Callback invoked when an observable model is about to be detached from this observer.
virtual void SetVisible(bool state=true) override
Make shape to be visible or not.
virtual QString GetShapeDescriptionAt(istd::CIndex2d position) const override
Get description to shape at specified position.
virtual void SetUserColorSchema(const IColorSchema *schemaPtr) override
Set color schema to draw shape.
virtual void InvalidateBoundingBox()
Invalidate bounding box.
i2d::CVector2d GetLogPosition(const i2d::CVector2d &screenPosition) const
Get logical position based on screen position.
virtual void SetDefaultDescription(const QString &description) override
Set default description will be used to display on console.
double GetLocalLineWidth(const i2d::CVector2d &screenPosition) const
Get line with (in logical coordinates) for single screen position.
virtual QString GetToolTipAt(istd::CIndex2d position) const override
Get tooltip at specified position.
virtual bool IsVisible() const override
Check, if this object is visible.
imod::CSingleModelObserverBase BaseClass
virtual i2d::CRect CalcBoundingBox() const =0
Calculate bounding box.
bool IsBoundingBoxValid() const
virtual ITouchable::TouchState IsTouched(istd::CIndex2d position) const override
Check, if any shape is touched.
virtual void OnConnectDisplay(IDisplay *displayPtr) override
Called after display is connected.
iview::IDisplay * GetDisplayPtr() const
Get access to currently connected display.
virtual bool OnModelAttached(imod::IModel *modelPtr, istd::IChangeable::ChangeSet &changeMask) override
Callback invoked when an observable model is about to be attached to this observer.
i2d::CRect GetClientRect() const
Get display client rectangle.
virtual i2d::CRect GetBoundingBox() const override
Return bounding box in client window coordinates.
virtual int GetLayerType() const override
Get layer type of this shape object.
i2d::CVector2d GetScreenPosition(const i2d::CVector2d &logPosition) const
Get screen position based on logical position.
void SetTransformMode(ShapeTransformMode mode)
Set shape transformation mode.
virtual bool IsDisplayChangeImportant(const istd::IChangeable::ChangeSet &changeSet)
Get display changes mask.
virtual const IColorSchema * GetUserColorSchema() const override
Get color schema from view or user defined.
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.
virtual bool IsInside(const istd::CIndex2d &screenPosition) const override
virtual bool AssignToLayer(int layerType)
Assign this shape to same layer.
virtual bool OnDisplayChange(const istd::IChangeable::ChangeSet &changeSet) override
It informs about changes in display.
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.