Public Types | Public Member Functions | List of all members
iview::IShapeView Class Referenceabstract

Common interface for a general shape view implementations. More...

#include <IShapeView.h>

Inheritance diagram for iview::IShapeView:
iview::IDisplay iview::ISelectable iview::IShapeObserver iview::ITouchable istd::IPolymorphic istd::IPolymorphic iview::CViewBase iview::CCalibratedViewBase iview::CViewport

Public Types

typedef IShapeObserver BaseClass
 
- 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::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 Types inherited from iview::ITouchable
enum  TouchState {
  TS_NONE, TS_INACTIVE, TS_TICKER, TS_DRAGGABLE,
  TS_OTHER, TS_LAST = TS_OTHER
}
 Enumeration for possible shape touch states. More...
 

Public Member Functions

virtual void SetFitArea (const i2d::CRectangle &area)=0
 Set area used for fitting of the view contents. More...
 
virtual void SetTransform (const i2d::CAffine2d &transform)=0
 Set a screen transformation. More...
 
virtual void Update ()=0
 Updates all invalidates shapes. More...
 
virtual void SetEditMode (int mode)=0
 Changes the edit mode. More...
 
virtual bool IsViewDraggable () const =0
 Check if is draggable mode. More...
 
virtual bool IsMultiselectable () const =0
 Check, if it is possible to select more than one shape. More...
 
virtual void UpdateMousePointer ()=0
 Update mouse pointer. More...
 
virtual int InsertLayer (IViewLayer *layerPtr, int index=-1, int layerType=IViewLayer::LT_NONE)=0
 Insert layer to view. More...
 
virtual int GetLayerIndex (const IViewLayer &layer) const =0
 Get index of layer. More...
 
virtual int GetLayerIndex (int layerType) const =0
 Get index of layer by type. More...
 
virtual void RemoveLayer (int index)=0
 Remove layer from view. More...
 
virtual int GetLayersCount () const =0
 Get count of layer in this view. More...
 
virtual IViewLayerGetLayer (int index) const =0
 Get layer with the given index. More...
 
virtual bool ConnectShape (IShape *shapePtr)=0
 Connect shape object to view. More...
 
virtual ISelectableLayerGetFocusedLayerPtr () const =0
 Get focused layer. More...
 
virtual void OnLayerShapeFocused (IInteractiveShape *shapePtr, ISelectableLayer *layerPtr)=0
 Called when shape in layer get focus. More...
 
virtual void OnLayerShapeDefocused (IInteractiveShape *shapePtr, ISelectableLayer *layerPtr)=0
 Called when shape in layer loose focus. More...
 
virtual void OnLayerInvalidated (const IViewLayer &layer, const i2d::CRect &prevArea, const i2d::CRect &newArea)=0
 Inform that layer was invalidated. More...
 
- Public Member Functions inherited from iview::IDisplay
virtual IDisplayGetParentDisplayPtr () const =0
 Get parent object of this display. More...
 
virtual const
iview::CScreenTransform
GetTransform () const =0
 Return a screen transformation. More...
 
virtual i2d::CRect GetBoundingBox () const =0
 Get bounding box of all object in this display. More...
 
virtual i2d::CRect GetClientRect () const =0
 Get bounding box of client area. More...
 
virtual const IColorSchemaGetColorSchema () const =0
 Get color schema. More...
 
virtual void OnAreaInvalidated (const i2d::CRect &prevArea, const i2d::CRect &newArea)=0
 Invalidate display area. More...
 
- Public Member Functions inherited from iview::IShapeObserver
virtual void OnChangeShape (IShape *shapePtr)=0
 Invalidate a shape. More...
 
virtual bool DisconnectShape (IShape *shapePtr)=0
 Disconnect shape object from view. More...
 
- Public Member Functions inherited from istd::IPolymorphic
virtual ~IPolymorphic ()
 
- Public Member Functions inherited from iview::ISelectable
virtual int GetSelectedShapesCount () const =0
 Get count of selected shapes. More...
 
virtual void InsertSelectedShapes (SelectedShapes &result) const =0
 Get set of selected shapes. More...
 
virtual void DeselectAllShapes ()=0
 Set all shapes to be deselected. More...
 
virtual int GetKeysState () const =0
 Get state of system keys. More...
 
virtual int GetEditMode () const =0
 Get actual edit mode. More...
 
virtual void OnShapeFocused (IInteractiveShape *shapePtr)=0
 Called when shape get focus. More...
 
virtual void OnShapeDefocused (IInteractiveShape *shapePtr)=0
 Called when shape loose focus. More...
 
virtual void OnShapeSelected (IInteractiveShape &shape, bool state=true)=0
 It is called after change shape selection state. More...
 
- Public Member Functions inherited from iview::ITouchable
virtual TouchState IsTouched (istd::CIndex2d position) const =0
 Check, if any shape is touched. More...
 
virtual QString GetShapeDescriptionAt (istd::CIndex2d position) const =0
 Get description to shape at specified position. More...
 

Detailed Description

Common interface for a general shape view implementations.

Definition at line 24 of file IShapeView.h.

Member Typedef Documentation

Definition at line 29 of file IShapeView.h.

Member Function Documentation

virtual bool iview::IShapeView::ConnectShape ( IShape shapePtr)
pure virtual

Connect shape object to view.

Parameters
shapea shape object.
Returns
true, if it was possible to connect this shape.

Implemented in iview::CViewBase.

Referenced by iqt2d::TViewExtenderCompBase< Base >::AddItemsToScene().

virtual ISelectableLayer* iview::IShapeView::GetFocusedLayerPtr ( ) const
pure virtual

Get focused layer.

Implemented in iview::CViewBase.

virtual IViewLayer& iview::IShapeView::GetLayer ( int  index) const
pure virtual

Get layer with the given index.

Implemented in iview::CViewBase.

virtual int iview::IShapeView::GetLayerIndex ( const IViewLayer layer) const
pure virtual

Get index of layer.

Returns
layer index, or -1 if not found.

Implemented in iview::CViewBase.

virtual int iview::IShapeView::GetLayerIndex ( int  layerType) const
pure virtual

Get index of layer by type.

Returns
layer index, or -1 if not found.

Implemented in iview::CViewBase.

virtual int iview::IShapeView::GetLayersCount ( ) const
pure virtual

Get count of layer in this view.

Implemented in iview::CViewBase.

virtual int iview::IShapeView::InsertLayer ( IViewLayer layerPtr,
int  index = -1,
int  layerType = IViewLayer::LT_NONE 
)
pure virtual

Insert layer to view.

Parameters
layerPtrpointer to inserted layer.
indexindex of inserted layer. If equals -1, layer will be inserted after last existing layer.
layerTypeused to set standard layers.
See Also
iview::IShapeView::LayerType
Returns
index of this layer.

Implemented in iview::CViewBase, and iview::CCalibratedViewBase.

virtual bool iview::IShapeView::IsMultiselectable ( ) const
pure virtual

Check, if it is possible to select more than one shape.

Implemented in iview::CViewBase.

virtual bool iview::IShapeView::IsViewDraggable ( ) const
pure virtual

Check if is draggable mode.

If this function return true, user can move a view by dragging.

Implemented in iview::CViewBase.

virtual void iview::IShapeView::OnLayerInvalidated ( const IViewLayer layer,
const i2d::CRect prevArea,
const i2d::CRect newArea 
)
pure virtual

Inform that layer was invalidated.

Implemented in iview::CViewBase.

virtual void iview::IShapeView::OnLayerShapeDefocused ( IInteractiveShape shapePtr,
ISelectableLayer layerPtr 
)
pure virtual

Called when shape in layer loose focus.

Implemented in iview::CViewBase.

virtual void iview::IShapeView::OnLayerShapeFocused ( IInteractiveShape shapePtr,
ISelectableLayer layerPtr 
)
pure virtual

Called when shape in layer get focus.

Implemented in iview::CViewBase.

virtual void iview::IShapeView::RemoveLayer ( int  index)
pure virtual

Remove layer from view.

Implemented in iview::CViewBase, and iview::CCalibratedViewBase.

virtual void iview::IShapeView::SetEditMode ( int  mode)
pure virtual

Changes the edit mode.

Implemented in iview::CViewBase, and iview::CViewport.

virtual void iview::IShapeView::SetFitArea ( const i2d::CRectangle area)
pure virtual

Set area used for fitting of the view contents.

Implemented in iview::CViewBase, and iview::CViewport.

virtual void iview::IShapeView::SetTransform ( const i2d::CAffine2d transform)
pure virtual

Set a screen transformation.

See Also
GetTransform()

Implemented in iview::CViewBase.

virtual void iview::IShapeView::Update ( )
pure virtual

Updates all invalidates shapes.

Implemented in iview::CViewBase.

Referenced by iqt2d::TViewExtenderCompBase< Base >::UpdateAllViews().

virtual void iview::IShapeView::UpdateMousePointer ( )
pure virtual

Update mouse pointer.

Implemented in iview::CViewBase.


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

© 2007-2017 Witold Gantzke and Kirill Lepskiy