42 virtual void Draw(QPainter& drawContext)
const override;
67 bool m_isPositionVisible;
68 bool m_isBackgroundTransparent;
69 bool m_isEditableOffset;
78 return m_isPositionVisible;
84 m_isPositionVisible = visible;
90 return m_isBackgroundTransparent;
96 m_isBackgroundTransparent = state;
102 return m_isEditableOffset;
108 m_isEditableOffset = editable;
134 m_drawOffset = offset;
Simple rectangle with integer bounds.
Common interface for model objects, that supports Model/Observer design pattern.
Index implementation for addressing elements in 2D-space.
Set of change flags (its IDs).
virtual void SetBackgroundTransparent(bool state=true)
virtual void SetPositionVisible(bool visible=true)
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.
virtual bool IsPositionVisible() const
void CalculateTextOriginSize(i2d::CRect &textBox) const
virtual void Draw(QPainter &drawContext) const override
Draw this shape using draw context.
virtual TextAlign GetTextAlign() const override
Get text alignment modein label shape.
virtual void SetTextAlign(TextAlign align) override
Set text alignment mode.
virtual bool IsEditableOffset() const
virtual i2d::CRect CalcBoundingBox() const override
Calculate bounding box.
virtual void SetEditableOffset(bool editable=true)
virtual bool IsBackgroundTransparent() const
CLabelShape(TextAlign align=TAL_RIGHT_TOP, const istd::CIndex2d &offset=istd::CIndex2d(20, -20))
virtual bool OnMouseButton(istd::CIndex2d position, Qt::MouseButton buttonType, bool downFlag) override
It is called, when mouse button is pushed down or up on this object.
virtual const istd::CIndex2d & GetDrawOffset() const override
Get the drawing offset for the label.
virtual TouchState IsTouched(istd::CIndex2d position) const override
Check, if any shape is touched.
virtual void SetDrawOffset(const istd::CIndex2d &offset) override
Set the drawing offset for the label.
CInteractiveShapeBase ShapeBaseClass
virtual bool OnMouseMove(istd::CIndex2d position) override
It is called, when mouse is moved.
Interface for text label drawing parameters.
TextAlign
Text alignment mode.
TouchState
Enumeration for possible shape touch states.
In this library is defined 2D view concept and standard visualisation objects.