ACF $AcfVersion:0$
Public Types | Public Member Functions | List of all members
iview::CToolsViewLayer Class Reference

#include <CToolsViewLayer.h>

Inheritance diagram for iview::CToolsViewLayer:
iview::CViewLayer iview::ISelectableLayer iview::IViewLayer iview::IViewLayer iview::ISelectable iview::IDraggable iview::IDisplay iview::ITouchable iview::IDisplay iview::ITouchable iview::ITouchable istd::IPolymorphic iview::IShapeObserver istd::IPolymorphic iview::IShapeObserver istd::IPolymorphic istd::IPolymorphic istd::IPolymorphic istd::IPolymorphic

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 ,
  CF_DISPLAY_MODE , CS_CONSOLE
}
 Define possible display change flags. More...
 
- Public Types inherited from iview::ITouchable
enum  TouchState {
  TS_NONE , TS_INACTIVE , TS_TICKER , TS_DRAGGABLE ,
  TS_AREA , 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_ADD , MPM_LAST
}
 Defines possible states of mouse pointer. More...
 
enum  EditMode {
  EM_NONE = 0 , EM_MOVE = 1 , EM_ADD = 2 , EM_REMOVE = 3 ,
  EM_LAST = 100
}
 Describes standard edit modes. More...
 
enum  DisplayMode { DM_DEFAULT = 0 }
 Describes standard display modes. More...
 
typedef QSet< IInteractiveShape * > SelectedShapes
 

Public Member Functions

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

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 14 of file CToolsViewLayer.h.

Member Typedef Documentation

◆ BaseClass

Definition at line 19 of file CToolsViewLayer.h.

Member Function Documentation

◆ BeginDrag()

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

Called before dragging is begin.

It set also reference value for dragging position.

Implements iview::IDraggable.

◆ ConnectInteractiveShape()

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

Connect active shape object.

Implements iview::ISelectableLayer.

◆ DeselectAllShapes()

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

Set all shapes to be deselected.

Implements iview::ISelectable.

◆ DrawFocusedShape()

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

Draw only focused shape.

Implements iview::ISelectableLayer.

◆ EndDrag()

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

Called after dragging.

Implements iview::IDraggable.

◆ GetDisplayMode()

virtual int iview::CToolsViewLayer::GetDisplayMode ( ) const
overridevirtual

Get actual display mode.

Implements iview::ISelectable.

◆ GetEditMode()

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

Get actual edit mode.

Implements iview::ISelectable.

◆ GetKeysState()

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

Get state of system keys.

Implements iview::ISelectable.

◆ GetSelectedShapesCount()

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

Get count of selected shapes.

Implements iview::ISelectable.

◆ GetUnselectedShapesCount()

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

Get number of unselected shapes.

Implements iview::ISelectableLayer.

◆ InsertSelectedShapes()

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

Get set of selected shapes.

Implements iview::ISelectable.

◆ IsDraggable()

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

Check if drag is enabled.

Implements iview::IDraggable.

◆ IsTouched() [1/2]

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

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 = NULL 
) const
overridevirtual

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 NULL.
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 
)
overridevirtual

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)
overridevirtual

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

Returns
true, if this event was consumed.

Implements iview::ISelectableLayer.

◆ OnKeyPress()

virtual bool iview::CToolsViewLayer::OnKeyPress ( int  key,
Qt::KeyboardModifiers  modifiers 
)
overridevirtual

Called, when key has been pressed.

Returns
true, if this event was consumed.

Implements iview::ISelectableLayer.

◆ OnMouseButton()

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

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)
overridevirtual

Called when shape loose focus.

Implements iview::ISelectable.

◆ OnShapeFocused()

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

Called when shape get focus.

Implements iview::ISelectable.

◆ OnShapeSelected()

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

It is called after change shape selection state.

Implements iview::ISelectable.

◆ SetDragPosition()

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

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: