6#include <QtCore/QVector>
7#include <QtGui/QPolygon>
59 virtual void Draw(QPainter& drawContext)
const override;
76 virtual void DrawCurve(QPainter& drawContext)
const;
77 virtual void DrawArea(QPainter& drawContext)
const;
103 bool m_isFirstVisible =
false;
104 bool m_isAlwaysDraggable =
false;
105 bool m_areaTouchAllowed =
false;
106 bool m_editableNodes =
true;
112 return m_isFirstVisible;
118 m_isFirstVisible = state;
124 return m_isAlwaysDraggable;
130 m_isAlwaysDraggable = state;
This class defines an affine 2D-transformation.
Simple rectangle with integer bounds.
Definition of position or mathematical vector on 2D plane.
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).
i2d::CAffine2d m_castTransform
virtual bool IsEditableNodes() const
virtual QString GetShapeDescriptionAt(istd::CIndex2d position) const override
Get description to shape at specified position.
virtual void Draw(QPainter &drawContext) const override
Draw this shape using draw context.
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 void SetLogDragPosition(const i2d::CVector2d &position) override
virtual void BeginLogDrag(const i2d::CVector2d &reference) override
virtual void SetEditableNodes(bool state=true)
virtual i2d::CRect CalcBoundingBox() const override
Calculate bounding box.
CInteractiveShapeBase ShapeBaseClass
virtual bool IsFirstVisible() const
Check if first point is always visible as ticker.
virtual bool IsAreaTouchAllowed() const
static const istd::IChangeable::ChangeSet & GetMoveAllChangeSet()
virtual bool IsAreaTouched(istd::CIndex2d position) const
virtual void EnsureValidNodes() const override
virtual i2d::CVector2d GetSegmentMiddle(int index) const
virtual bool IsDraggable() const override
Check if drag is enabled.
virtual void DrawArea(QPainter &drawContext) const
virtual void SetAlwaysMovable(bool state=true)
Set flag if in all edit modes is this shape draggable.
virtual TouchState IsTouched(istd::CIndex2d position) const override
Check, if any shape is touched.
virtual void SetFirstVisible(bool state=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 IsAlwaysMovable() const
Check if in all edit modes is this shape draggable.
virtual bool IsCurveTouched(istd::CIndex2d position) const override
virtual void DrawCurve(QPainter &drawContext) const
i2d::CVector2d m_castAxis
virtual void DrawSelectionElements(QPainter &drawContext) const
virtual bool OnMouseMove(istd::CIndex2d position) override
It is called, when mouse is moved.
virtual void SetAreaTouchAllowed(bool state=true)
virtual bool IsInside(const istd::CIndex2d &screenPosition) const override
static const istd::IChangeable::ChangeSet & GetMoveChangeSet()
CRectControlledShapeBase BaseClass
QVector< i2d::CVector2d > m_references
TouchState
Enumeration for possible shape touch states.
In this library is defined 2D view concept and standard visualisation objects.