6#ifndef iview_CInteractiveShapeBase_included
7#define iview_CInteractiveShapeBase_included
95 bool m_isEditablePosition;
97 std::unique_ptr<istd::CChangeGroup> m_dragNotifierPtr;
105 return m_isEditablePosition;
111 m_isEditablePosition = state;
120 if (selectablePtr !=
nullptr){
132 if (selectablePtr !=
nullptr){
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).
bool Contains(int changeId) const
Check if there is specific change flag in the set.
Base class of shape implementation with user interaction.
virtual void BeginDrag(const istd::CIndex2d &position)
Called before dragging is begin.
void UpdateModelChanges()
virtual bool IsDisplayChangeImportant(const istd::IChangeable::ChangeSet &changeSet)
Get display changes mask.
virtual void BeginLogDrag(const i2d::CVector2d &reference)=0
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.
virtual void SetLogDragPosition(const i2d::CVector2d &position)=0
virtual bool OnModelDetached(imod::IModel *modelPtr)
This call back function will be called, if an observable object is about to be detached.
int GetEditMode() const
Get actual edit mode.
void DrawText(QPainter &drawContext, istd::CIndex2d point, const QString &text) const
Draw text on a given position.
virtual bool IsDraggable() const
Check if drag is enabled.
virtual void SetEditablePosition(bool state=true)
virtual bool IsEditablePosition() const
virtual ~CInteractiveShapeBase()
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.
int GetKeysState() const
Get actual keys state.
virtual bool IsSelected() const
Check, if this shape is selected.
virtual void EndDrag()
Called after dragging.
virtual void SetSelected(bool selectFlag=true)
Inform that this object was selected or deselected.
virtual void SetDragPosition(const istd::CIndex2d &position)
Set new drag position.
CInteractiveShapeBase(const CInteractiveShapeBase &shape)
Base class of standard shape implementation.
iview::IDisplay * GetDisplay() const
Get access to currently connected display.
virtual bool IsDisplayChangeImportant(const istd::IChangeable::ChangeSet &changeSet)
Get display changes mask.
@ CF_EDIT_MODE
Edit mode is changed.
Common interface for all, you can drag.
Common interface for all display console shapes which can interacts with user.
virtual int GetKeysState() const =0
Get state of system keys.
virtual int GetEditMode() const =0
Get actual edit mode.
In this library is defined 2D view concept and standard visualisation objects.