6#ifndef iview_CPolygonShape_included
7#define iview_CPolygonShape_included
11#include <QtCore/QVector>
12#include <QtGui/QPolygon>
57 virtual void Draw(QPainter& drawContext)
const;
74 virtual void DrawCurve(QPainter& drawContext)
const;
75 virtual void DrawArea(QPainter& drawContext)
const;
98 bool m_isFirstVisible;
99 bool m_isAlwaysDraggable;
105 return m_isFirstVisible;
111 m_isFirstVisible = state;
117 return m_isAlwaysDraggable;
123 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).
Base class of shape implementation with user interaction.
i2d::CAffine2d m_castTransform
virtual i2d::CRect CalcBoundingBox() const
Calculate bounding box.
virtual void EnsureValidNodes() const
virtual bool OnMouseMove(istd::CIndex2d position)
It is called, when mouse is moved.
virtual TouchState IsTouched(istd::CIndex2d position) const
Check, if any shape is touched.
virtual QString GetShapeDescriptionAt(istd::CIndex2d position) const
Get description to shape at specified position.
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.
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 IsFirstVisible() const
Check if first point is always visible as ticker.
virtual void SetLogDragPosition(const i2d::CVector2d &position)
static const istd::IChangeable::ChangeSet & GetMoveAllChangeSet()
virtual i2d::CVector2d GetSegmentMiddle(int index) const
CInteractiveShapeBase ShapeBaseClass
virtual void DrawArea(QPainter &drawContext) const
virtual void SetAlwaysMovable(bool state=true)
Set flag if in all edit modes is this shape draggable.
virtual bool IsCurveTouched(istd::CIndex2d position) const
virtual void SetFirstVisible(bool state=true)
virtual bool IsAlwaysMovable() const
Check if in all edit modes is this shape draggable.
virtual void DrawCurve(QPainter &drawContext) const
i2d::CVector2d m_castAxis
virtual void DrawSelectionElements(QPainter &drawContext) const
virtual void BeginLogDrag(const i2d::CVector2d &reference)
CRectControlledShapeBase BaseClass
static const istd::IChangeable::ChangeSet & GetMoveChangeSet()
virtual bool IsDraggable() const
Check if drag is enabled.
virtual void Draw(QPainter &drawContext) const
Draw this shape using draw context.
QVector< i2d::CVector2d > m_references
TouchState
Enumeration for possible shape touch states.
In this library is defined 2D view concept and standard visualisation objects.