ICF 3.0.5.47
Technical documentation of ICF Libraries
iview::CToolsViewLayer Class Reference

#include <CToolsViewLayer.h>

Inheritance diagram for iview::CToolsViewLayer:
Collaboration diagram for iview::CToolsViewLayer:

Public Types

typedef CViewLayer BaseClass
 
- Public Types inherited from iview::IViewLayer
enum  LayerType {
  LT_NONE , LT_BACKGROUND , LT_INACTIVE , LT_ACTIVE ,
  LT_CALIBRATION , LT_TOOLS
}
 
typedef QList< IShape * > Shapes
 
- Public Types inherited from iview::IDisplay
enum  ChangeFlags {
  CF_TRANSFORM = 0x3f67360 , CF_COLORS , CF_SIZE , CF_EDIT_MODE ,
  CS_CONSOLE
}
 Define possible display change flags. More...
 
- Public Types inherited from iview::ITouchable
enum  TouchState {
  TS_NONE , TS_TRANSPARENT , TS_INACTIVE , TS_TICKER ,
  TS_DRAGGABLE , TS_OTHER , TS_LAST = TS_OTHER
}
 Enumeration for possible shape touch states. More...
 
- Public Types inherited from iview::ISelectable
enum  MousePointerMode {
  MPM_NONE , MPM_DEFAULT , MPM_DESELECT , MPM_POINTER ,
  MPM_WAIT , MPM_CROSS , MPM_HAND , MPM_DRAG ,
  MPM_SCREEN_MOVE , MPM_LAST = MPM_SCREEN_MOVE
}
 Defines possible states of mouse pointer. More...
 
enum  EditMode { EM_NONE = 0 , EM_MOVE = 1 , EM_ADD = 2 , EM_REMOVE = 3 }
 Describes standard edit modes. More...
 
typedef QSet< IInteractiveShape * > SelectedShapes
 

Public Member Functions

virtual bool ConnectInteractiveShape (IInteractiveShape *shapePtr)
 Connect active shape object.
 
virtual int GetUnselectedShapesCount () const
 Get number of unselected shapes.
 
virtual void DrawFocusedShape (QPainter &drawContext)
 Draw only focused shape.
 
virtual bool OnMouseButton (istd::CIndex2d position, Qt::MouseButton buttonType, bool downFlag)
 Called, when mouse button was pushed down or up.
 
virtual bool OnFocusedMouseButton (istd::CIndex2d position, Qt::MouseButton buttonType, bool downFlag)
 Called, when this layer has focus, and mouse button was pushed down or up on this object.
 
virtual bool OnFocusedMouseMove (istd::CIndex2d position)
 Called, when this layer has focus, and mouse was moved.
 
virtual TouchState IsTouched (istd::CIndex2d position, IInteractiveShape **shapePtrPtr=nullptr) const
 Check, if any shape is touched.
 
virtual int GetSelectedShapesCount () const
 Get count of selected shapes.
 
virtual void InsertSelectedShapes (SelectedShapes &result) const
 Get set of selected shapes.
 
virtual void DeselectAllShapes ()
 Set all shapes to be deselected.
 
virtual int GetKeysState () const
 Get state of system keys.
 
virtual int GetEditMode () const
 Get actual edit mode.
 
virtual void OnShapeFocused (IInteractiveShape *shapePtr)
 Called when shape get focus.
 
virtual void OnShapeDefocused (IInteractiveShape *shapePtr)
 Called when shape loose focus.
 
virtual void OnShapeSelected (IInteractiveShape &shape, bool state=true)
 It is called after change shape selection state.
 
virtual TouchState IsTouched (istd::CIndex2d position) const
 Check, if any shape is touched.
 
virtual void BeginDrag (const istd::CIndex2d &reference)
 Called before dragging is begin.
 
virtual void SetDragPosition (const istd::CIndex2d &position)
 Set new drag position.
 
virtual void EndDrag ()
 Called after dragging.
 
virtual bool IsDraggable () const
 Check if drag is enabled.
 
- Public Member Functions inherited from iview::CViewLayer
 CViewLayer ()
 
virtual ~CViewLayer ()
 
virtual void OnConnectView (IShapeView *viewPtr)
 Called after layer is connected to view.
 
virtual void OnDisconnectView (IShapeView *viewPtr)
 Called before layer is disconnected from view.
 
virtual IShapeViewGetViewPtr () const
 Get parent view of this layer.
 
virtual bool IsShapeConnected (IShape *shapePtr)
 Check, if the shape is connected to the layer.
 
virtual bool ConnectShape (IShape *shapePtr)
 Connect shape object to view.
 
virtual int GetShapesCount () const
 Get count of all shapes on this layer.
 
virtual Shapes GetShapes () const
 Get all shapes on this layer.
 
virtual void UpdateAllShapes (const istd::IChangeable::ChangeSet &changeSet)
 Send update to all shapes after view changes.
 
virtual void DisconnectAllShapes ()
 Disconnect all shapes from this layer.
 
virtual void DrawShapes (QPainter &drawContext)
 Draw all shapes using specified draw context.
 
virtual bool IsVisible () const
 Check, if this layer is visible.
 
virtual void SetVisible (bool state=true)
 Make this layer visible.
 
virtual IDisplayGetParentDisplayPtr () const
 Get parent object of this display.
 
virtual const CScreenTransformGetTransform () const
 Return a screen transformation.
 
virtual i2d::CRect GetBoundingBox () const
 Get bounding box of all object in this display.
 
virtual i2d::CRect GetClientRect () const
 Get bounding box of client area.
 
virtual const IColorSchemaGetColorSchema () const
 Get color schema.
 
virtual void OnAreaInvalidated (const i2d::CRect &prevArea, const i2d::CRect &newArea)
 Invalidate display area.
 
virtual void OnChangeShape (IShape *shapePtr)
 Invalidate a shape.
 
virtual bool DisconnectShape (IShape *shapePtr)
 Disconnect shape object from view.
 
virtual QString GetShapeDescriptionAt (istd::CIndex2d position) const
 Get description to shape at specified position.
 
- Public Member Functions inherited from iview::IViewLayer
- Public Member Functions inherited from iview::IDisplay
- Public Member Functions inherited from iview::IShapeObserver
- Public Member Functions inherited from iview::ITouchable
- Public Member Functions inherited from iview::ISelectableLayer
- Public Member Functions inherited from iview::ISelectable
- Public Member Functions inherited from iview::IDraggable

Additional Inherited Members

- Protected Types inherited from iview::CViewLayer
typedef QVector< ShapeWithBoundingBoxShapeList
 
- Protected Member Functions inherited from iview::CViewLayer
bool OnChangeShapeElement (ShapeList::iterator elementIter)
 
void DisconnectShapeElement (ShapeList &map, ShapeList::iterator iter)
 
void InvalidateBoundingBox ()
 
i2d::CRectGetBoundingBoxRef () const
 
void SetBoundingBoxValid () const
 
virtual i2d::CRect RecalcAllShapes (const istd::IChangeable::ChangeSet &changeSet)
 Recalculate all shapes after view changes.
 
virtual i2d::CRect CalcBoundingBox () const
 Calculate bounding box for all shapes.
 
- Protected Attributes inherited from iview::CViewLayer
ShapeList m_shapes
 

Detailed Description

Definition at line 19 of file CToolsViewLayer.h.

Member Typedef Documentation

◆ BaseClass

Member Function Documentation

◆ BeginDrag()

virtual void iview::CToolsViewLayer::BeginDrag ( const istd::CIndex2d & reference)
virtual

Called before dragging is begin.

It set also reference value for dragging position.

Implements iview::IDraggable.

◆ ConnectInteractiveShape()

virtual bool iview::CToolsViewLayer::ConnectInteractiveShape ( IInteractiveShape * shapePtr)
virtual

Connect active shape object.

Implements iview::ISelectableLayer.

◆ DeselectAllShapes()

virtual void iview::CToolsViewLayer::DeselectAllShapes ( )
virtual

Set all shapes to be deselected.

Implements iview::ISelectable.

◆ DrawFocusedShape()

virtual void iview::CToolsViewLayer::DrawFocusedShape ( QPainter & drawContext)
virtual

Draw only focused shape.

Implements iview::ISelectableLayer.

◆ EndDrag()

virtual void iview::CToolsViewLayer::EndDrag ( )
virtual

Called after dragging.

Implements iview::IDraggable.

◆ GetEditMode()

virtual int iview::CToolsViewLayer::GetEditMode ( ) const
virtual

Get actual edit mode.

Implements iview::ISelectable.

◆ GetKeysState()

virtual int iview::CToolsViewLayer::GetKeysState ( ) const
virtual

Get state of system keys.

Implements iview::ISelectable.

◆ GetSelectedShapesCount()

virtual int iview::CToolsViewLayer::GetSelectedShapesCount ( ) const
virtual

Get count of selected shapes.

Implements iview::ISelectable.

◆ GetUnselectedShapesCount()

virtual int iview::CToolsViewLayer::GetUnselectedShapesCount ( ) const
virtual

Get number of unselected shapes.

Implements iview::ISelectableLayer.

◆ InsertSelectedShapes()

virtual void iview::CToolsViewLayer::InsertSelectedShapes ( SelectedShapes & result) const
virtual

Get set of selected shapes.

Implements iview::ISelectable.

◆ IsDraggable()

virtual bool iview::CToolsViewLayer::IsDraggable ( ) const
virtual

Check if drag is enabled.

Implements iview::IDraggable.

◆ IsTouched() [1/2]

virtual TouchState iview::CToolsViewLayer::IsTouched ( istd::CIndex2d position) const
virtual

Check, if any shape is touched.

When shape is touched, it return also pointer to this shape.

Returns
touch state for the shape, or iview::IInteractiveShape::TS_NONE, when nothing found.

Reimplemented from iview::CViewLayer.

◆ IsTouched() [2/2]

virtual TouchState iview::CToolsViewLayer::IsTouched ( istd::CIndex2d position,
IInteractiveShape ** shapePtrPtr = nullptr ) const
virtual

Check, if any shape is touched.

When shape is touched, it return also pointer to this shape.

Parameters
shapePtrPtrpointer to shape pointer will be filled if shape is found. It can be equal nullptr.
Returns
touch state for the shape, or iview::IInteractiveShape::TS_NONE, when nothing found.

Implements iview::ISelectableLayer.

◆ OnFocusedMouseButton()

virtual bool iview::CToolsViewLayer::OnFocusedMouseButton ( istd::CIndex2d position,
Qt::MouseButton buttonType,
bool downFlag )
virtual

Called, when this layer has focus, and mouse button was pushed down or up on this object.

Returns
true, if this event was consumed.

Implements iview::ISelectableLayer.

◆ OnFocusedMouseMove()

virtual bool iview::CToolsViewLayer::OnFocusedMouseMove ( istd::CIndex2d position)
virtual

Called, when this layer has focus, and mouse was moved.

Returns
true, if this event was consumed.

Implements iview::ISelectableLayer.

◆ OnMouseButton()

virtual bool iview::CToolsViewLayer::OnMouseButton ( istd::CIndex2d position,
Qt::MouseButton buttonType,
bool downFlag )
virtual

Called, when mouse button was pushed down or up.

Returns
true, if this event was consumed.

Implements iview::ISelectableLayer.

◆ OnShapeDefocused()

virtual void iview::CToolsViewLayer::OnShapeDefocused ( IInteractiveShape * shapePtr)
virtual

Called when shape loose focus.

Implements iview::ISelectable.

◆ OnShapeFocused()

virtual void iview::CToolsViewLayer::OnShapeFocused ( IInteractiveShape * shapePtr)
virtual

Called when shape get focus.

Implements iview::ISelectable.

◆ OnShapeSelected()

virtual void iview::CToolsViewLayer::OnShapeSelected ( IInteractiveShape & shape,
bool state = true )
virtual

It is called after change shape selection state.

Implements iview::ISelectable.

◆ SetDragPosition()

virtual void iview::CToolsViewLayer::SetDragPosition ( const istd::CIndex2d & position)
virtual

Set new drag position.

It must be enclosed using BeginDrag() and EndDrag() methods.

Implements iview::IDraggable.


The documentation for this class was generated from the following file:

© Witold Gantzke and Kirill Lepskiy