71 virtual void Draw(QPainter& drawContext)
const override;
114 bool m_isEditableRotation;
115 bool m_isEditableWidth;
116 bool m_isEditableHeight;
117 bool m_isEditableAngle;
118 bool m_isProportionalScaled;
120 bool m_areAxesOrthogonal;
123 mutable bool m_areNodesValid;
131 return m_isEditableRotation;
137 m_isEditableRotation = state;
143 return m_isEditableWidth;
149 m_isEditableWidth = state;
155 return m_isEditableHeight;
161 m_isEditableHeight = state;
167 return m_isEditableAngle;
173 m_isEditableAngle = state;
179 return m_isProportionalScaled;
185 m_isProportionalScaled = state;
191 return m_areAxesEqual;
197 m_areAxesEqual = state;
203 return m_areAxesOrthogonal;
209 m_areAxesOrthogonal = state;
217 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).
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 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 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.
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 void Draw(QPainter &drawContext) const override
Draw this shape using draw context.
const i2d::CVector2d * GetNodes() const
virtual void SetProportionalScaled(bool state=true)
virtual bool OnMouseMove(istd::CIndex2d position) override
It is called, when mouse is moved.
virtual void InvalidateBoundingBox() override
Invalidate bounding box.
virtual void SetEditableAngle(bool state=true)
virtual TouchState IsTouched(istd::CIndex2d position) const override
Check, if any shape is touched.
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 SetLogDragPosition(const i2d::CVector2d &position) override
CInteractiveShapeBase BaseClass
virtual void BeginLogDrag(const i2d::CVector2d &reference) override
virtual void EnsureValidNodes() const
virtual void SetAxesEqual(bool state=true)
virtual i2d::CRect CalcBoundingBox() const override
Calculate bounding box.
virtual void SetEditableHeight(bool state=true)
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 SetEditableRotation(bool state=true)
virtual void DrawFigure(QPainter &drawContext) const
TouchState
Enumeration for possible shape touch states.
In this library is defined 2D view concept and standard visualisation objects.