6#ifndef iview_CParallelogramShape_included
7#define iview_CParallelogramShape_included
76 virtual void Draw(QPainter& drawContext)
const;
119 bool m_isEditableRotation;
120 bool m_isEditableWidth;
121 bool m_isEditableHeight;
122 bool m_isEditableAngle;
123 bool m_isProportionalScaled;
125 bool m_areAxesOrthogonal;
128 mutable bool m_areNodesValid;
136 return m_isEditableRotation;
142 m_isEditableRotation = state;
148 return m_isEditableWidth;
154 m_isEditableWidth = state;
160 return m_isEditableHeight;
166 m_isEditableHeight = state;
172 return m_isEditableAngle;
178 m_isEditableAngle = state;
184 return m_isProportionalScaled;
190 m_isProportionalScaled = state;
196 return m_areAxesEqual;
202 m_areAxesEqual = state;
208 return m_areAxesOrthogonal;
214 m_areAxesOrthogonal = state;
222 return m_areNodesValid;
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.
virtual TouchState IsTouched(istd::CIndex2d position) const
Check, if any shape is touched.
virtual bool IsProportionalScaled() const
Check, if both axis will be scaled proportional.
virtual bool IsTickerTouched(istd::CIndex2d position) const
virtual bool AreAxesEqual() const
Check, if it is forced to keep length of both axes equal.
virtual bool OnMouseMove(istd::CIndex2d position)
It is called, when mouse is moved.
virtual void SetEditableWidth(bool state=true)
virtual bool IsEditableRotation()
Check, if rotation is editable.
virtual bool AreAxesOrthogonal() const
Check, if it is forced to keep both axes orthogonal.
CInteractiveShapeBase BaseClass
const i2d::CVector2d * GetNodes() const
virtual void SetProportionalScaled(bool state=true)
virtual void BeginLogDrag(const i2d::CVector2d &reference)
virtual void SetEditableAngle(bool state=true)
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 IsCurveTouched(istd::CIndex2d position) const
i2d::CVector2d m_referencePosition
virtual void SetAxesOrthogonal(bool state=true)
void CalcNodes(const i2d::CAffine2d ¶llTransform) const
virtual void EnsureValidNodes() const
virtual void SetAxesEqual(bool state=true)
virtual void Draw(QPainter &drawContext) const
Draw this shape using draw context.
virtual void SetEditableHeight(bool state=true)
virtual void InvalidateBoundingBox()
Invalidate bounding box.
virtual i2d::CRect CalcBoundingBox() const
Calculate bounding box.
virtual bool IsEditableWidth()
Check, if width is editable.
virtual void DrawTickers(QPainter &drawContext) const
bool AreNodesValid() const
virtual bool IsEditableAngle()
Check, if internal angle is editable.
virtual bool IsEditableHeight()
Check, if size is editable.
virtual void SetLogDragPosition(const i2d::CVector2d &position)
virtual void SetEditableRotation(bool state=true)
virtual void DrawFigure(QPainter &drawContext) const
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.
TouchState
Enumeration for possible shape touch states.
In this library is defined 2D view concept and standard visualisation objects.