6#ifndef iview_CLabelShape_included
7#define iview_CLabelShape_included
47 virtual void Draw(QPainter& drawContext)
const;
72 bool m_isPositionVisible;
73 bool m_isBackgroundTransparent;
74 bool m_isEditableOffset;
83 return m_isPositionVisible;
89 m_isPositionVisible = visible;
95 return m_isBackgroundTransparent;
101 m_isBackgroundTransparent = state;
107 return m_isEditableOffset;
113 m_isEditableOffset = editable;
139 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).
Base class of shape implementation with user interaction.
virtual void SetBackgroundTransparent(bool state=true)
virtual void SetPositionVisible(bool visible=true)
virtual void SetDrawOffset(const istd::CIndex2d &offset)
Set the drawing offset for the label.
virtual bool IsPositionVisible() const
virtual void Draw(QPainter &drawContext) const
Draw this shape using draw context.
void CalculateTextOriginSize(i2d::CRect &textBox) const
virtual const istd::CIndex2d & GetDrawOffset() const
Get the drawing offset for the label.
virtual TextAlign GetTextAlign() const
Get text alignment modein label shape.
virtual TouchState IsTouched(istd::CIndex2d position) const
Check, if any shape is touched.
virtual i2d::CRect CalcBoundingBox() const
Calculate bounding box.
virtual bool IsEditableOffset() const
virtual void SetTextAlign(TextAlign align)
Set text alignment mode.
CInteractiveShapeBase ShapeBaseClass
virtual void SetEditableOffset(bool editable=true)
virtual bool IsBackgroundTransparent() const
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.
virtual bool OnMouseMove(istd::CIndex2d position)
It is called, when mouse is moved.
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)
It is called, when mouse button is pushed down or up on this object.
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.