23class IViewEventObserver;
24class ISelectableLayer;
25class IInteractiveShape;
153 virtual void DrawLayers(QPainter& drawContext,
int firstLayer,
int lastLayer);
379 Q_ASSERT((index >= 0) && (index <
int(
m_layers.size())));
382 Q_ASSERT(layerPtr !=
NULL);
This class defines an affine 2D-transformation.
Simple rectangle with integer bounds.
void Union(const CRect &rect)
Calculate union of this and second rectangle and stores result in this object.
void Reset()
Set all members to 0.
Definition of rectangle area orthogonal to axis of coordination system.
Definition of position or mathematical vector on 2D plane.
Index implementation for addressing elements in 2D-space.
Set of change flags (its IDs).
const Type * GetPtr() const
Get access to pointed object.
virtual int GetLayersCount() const override
Get count of layer in this view.
virtual int GetLayerIndex(int layerType) const override
Get index of layer by type.
virtual bool ConnectShape(IShape *shapePtr) override
Connect shape object to view.
virtual bool IsViewDraggable() const override
Check if is draggable mode.
int m_backgroundLayerIndex
virtual MousePointerMode CalcMousePointer(istd::CIndex2d position) const
Calc mouse pointer for the given position.
virtual const IColorSchema & GetDefaultColorSchema() const =0
void InvalidateBox(const i2d::CRect &rect)
Invalidate rectangle screen area.
virtual QString GetShapeDescriptionAt(istd::CIndex2d position) const override
Get description to shape at specified position.
virtual void SetEditMode(int mode) override
Changes the edit mode.
virtual void InvalidateBoundingBox()
Invalidate bounding box.
virtual void SetMousePointer(MousePointerMode mode)=0
Set mouse pointer.
virtual int GetKeysState() const override
Get state of system keys.
virtual TouchState IsTouched(istd::CIndex2d position) const override
Check, if any shape is touched.
i2d::CVector2d m_moveReference
virtual void EndDrag() override
Called after dragging.
bool m_isBoundingBoxValid
virtual void DeselectAllShapes() override
Set all shapes to be deselected.
virtual IViewLayer & GetLayer(int index) const override
Get layer with the given index.
void SetExternalScreenTransform(const istd::TSmartPtr< iview::CScreenTransform > &screenTransformPtr)
virtual bool IsBackgroundBufferValid() const
Check if background buffer is valid.
virtual bool OnMouseMove(istd::CIndex2d position) override
It is called, when mouse is moved.
virtual i2d::CRect CalcBoundingBox() const
Calculate bounding box of all shapes.
virtual i2d::CRect GetBoundingBox() const override
Get bounding box of all object in this display.
int m_lastBackgroundLayerIndex
virtual bool CanBeMoved() const
This method is internal used to check, if drag mode is allowed.
virtual void OnLayerInvalidated(const IViewLayer &layer, const i2d::CRect &prevArea, const i2d::CRect &newArea) override
Inform that layer was invalidated.
virtual void SetBackgroundBufferValid(bool state=true)
Set validate flag of background buffer.
virtual void SetScreenPosition(const i2d::CVector2d &client, istd::CIndex2d screen)
iview::CInteractiveViewLayer m_activeLayer
virtual void OnShapeFocused(IInteractiveShape *) override
Called when shape get focus.
virtual IDisplay * GetParentDisplayPtr() const override
Get parent object of this display.
virtual const IColorSchema & GetColorSchema() const override
Get color schema.
const i2d::CRect & GetInvalidatedBox() const
Get bounding box of all invalidated rectangles.
bool m_isLastMouseButtonDown
int GetBackgroundLayerIndex() const
Get index of default background layer.
void DisconnectAllShapes()
Disconnect all shapes from this view.
virtual void OnAreaInvalidated(const i2d::CRect &prevArea, const i2d::CRect &newArea) override
Invalidate display area.
virtual bool IsDraggable() const override
Check if drag is enabled.
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.
iview::IMouseActionObserver * m_mouseActionObserverPtr
int GetLastBackgroundLayerIndex() const
Get last background layer index.
virtual int InsertLayer(IViewLayer *layerPtr, int index=-1, int layerType=IViewLayer::LT_NONE) override
Insert layer to view.
virtual void OnLayerShapeDefocused(IInteractiveShape *shapePtr, ISelectableLayer *layerPtr) override
Called when shape in layer loose focus.
iview::CViewLayer m_backgroundLayer
virtual void SetDragPosition(const istd::CIndex2d &position) override
Set new drag position.
virtual void OnBoundingBoxChanged()
Called when bounding box has been changed.
virtual ISelectableLayer * GetFocusedLayerPtr() const override
Get focused layer.
int GetActiveLayerIndex() const
Get index of default active layer.
virtual int GetDisplayMode() const override
Get actual display mode.
virtual void SetViewDraggable(bool state=true)
virtual void SetTransform(const i2d::CAffine2d &transform) override
Set a screen transformation.
virtual bool IsMultiselectable() const override
Check, if it is possible to select more than one shape.
virtual void SetDisplayMode(int mode) override
Changes the display mode.
virtual void InvalidateBackground()
Invalidate whole background buffer.
void CenterTo(const iview::IShape &shape)
Zooms the view to the given shape.
bool m_isBackgroundBufferValid
virtual void AddViewEventObserver(iview::IViewEventObserver *listenerPtr) override
Add/remove external event observers.
virtual void SetFitArea(const i2d::CRectangle &area) override
Set area used for fitting of the view contents.
virtual void Update() override
Updates all invalidates shapes.
virtual int GetSelectedShapesCount() const override
Get count of selected shapes.
virtual bool DisconnectShape(IShape *shapePtr) override
Disconnect shape object from view.
bool m_isSelectEventActive
ISelectableLayer * m_focusedLayerPtr
virtual void UpdateAllShapes(const istd::IChangeable::ChangeSet &changeSet)
virtual int GetEditMode() const override
Get actual edit mode.
virtual void UpdateMousePointer() override
Update mouse pointer.
virtual void BeginDrag(const istd::CIndex2d &reference) override
Called before dragging is begin.
virtual int GetLayerIndex(const IViewLayer &layer) const override
Get index of layer.
virtual void OnShapeDefocused(IInteractiveShape *) override
Called when shape loose focus.
virtual const i2d::CRectangle & GetFitArea() const
i2d::CRectangle m_fitArea
virtual void InsertDefaultLayers()
const Layers & GetLayers() const
virtual QString GetToolTipAt(istd::CIndex2d) const override
Get tooltip at specified position.
virtual void SetZoom(ZoomMode zoom)
void SetLastBackgroundLayerIndex(int index)
virtual void UpdateRectArea(const i2d::CRect &rect)=0
Start updating specified rectangle area.
void ResetInvalidatedBox()
Reset invalidated box.
istd::CIndex2d m_lastMousePosition
virtual void InsertSelectedShapes(SelectedShapes &result) const override
Get set of selected shapes.
virtual void OnShapeSelected(IInteractiveShape &shape, bool state=true) override
It is called after change shape selection state.
QVector< iview::IViewEventObserver * > m_viewListeners
virtual void OnChangeShape(IShape *shapePtr) override
Invalidate a shape.
istd::TSmartPtr< iview::CScreenTransform > m_transformPtr
int GetInactiveLayerIndex() const
Get index of default inactive layer.
iview::CViewLayer m_inactiveLayer
virtual const iview::CScreenTransform & GetTransform() const override
Return a screen transformation.
virtual void SetDraggable(bool state=true)
virtual void OnLayerShapeFocused(IInteractiveShape *shapePtr, ISelectableLayer *layerPtr) override
Called when shape in layer get focus.
i2d::CRect m_invalidatedBox
virtual void RemoveViewEventObserver(iview::IViewEventObserver *listenerPtr) override
virtual void SetMultiselectable(bool state=true)
virtual void RemoveLayer(int index) override
Remove layer from view.
bool EnsureBoundingBoxValid()
Calculate bounding box if it was invalid.
void SetKeysState(int state)
Set state of keys.
QVector< IViewLayer * > Layers
virtual void DrawLayers(QPainter &drawContext, int firstLayer, int lastLayer)
Draw Background layer.
Standard implementation of view layer.
Defines set of standard pens, brushes and simple management of unions.
virtual i2d::CRect GetClientRect() const =0
Get bounding box of client area.
Common interface for all, you can drag.
Common interface for all display console shapes which can interacts with user.
Common interface for all shapes which are mouse events receiver.
QSet< IInteractiveShape * > SelectedShapes
MousePointerMode
Defines possible states of mouse pointer.
Common interface for all display console shapes.
Common interface for a general shape view implementations.
TouchState
Enumeration for possible shape touch states.
Interface for external view event observer.
Interface for a logical layer in the console view.
@ LT_NONE
Layer type is not set.
In this library is defined 2D view concept and standard visualisation objects.