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

Interface for a logical layer in the console view. More...

#include <IViewLayer.h>

Inheritance diagram for iview::IViewLayer:
iview::IDisplay iview::ITouchable iview::IShapeObserver istd::IPolymorphic istd::IPolymorphic iview::CViewLayer iview::ISelectableLayer iview::CInteractiveViewLayer iview::CInteractiveViewLayer

Public Types

enum  LayerType {
  LT_NONE, LT_BACKGROUND, LT_INACTIVE, LT_ACTIVE,
  LT_CALIBRATION
}
 
- 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_INACTIVE, TS_TICKER, TS_DRAGGABLE,
  TS_OTHER, TS_LAST = TS_OTHER
}
 Enumeration for possible shape touch states. More...
 

Public Member Functions

virtual void OnConnectView (IShapeView *viewPtr)=0
 Called after layer is connected to view. More...
 
virtual void OnDisconnectView (IShapeView *viewPtr)=0
 Called before layer is disconnected from view. More...
 
virtual IShapeViewGetViewPtr () const =0
 Get parent view of this layer. More...
 
virtual bool IsShapeConnected (IShape *shapePtr)=0
 Check, if the shape is connected to the layer. More...
 
virtual bool ConnectShape (IShape *shapePtr)=0
 Connect shape object to view. More...
 
virtual int GetShapesCount () const =0
 Get count of all shapes on this layer. More...
 
virtual void UpdateAllShapes (const istd::IChangeable::ChangeSet &changeSet)=0
 Send update to all shapes after view changes. More...
 
virtual void DisconnectAllShapes ()=0
 Disconnect all shapes from this layer. More...
 
virtual void DrawShapes (QPainter &drawContext)=0
 Draw all shapes using specified draw context. More...
 
virtual bool IsVisible () const =0
 Check, if this layer is visible. More...
 
virtual void SetVisible (bool state=true)=0
 Make this layer visible. 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::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

Interface for a logical layer in the console view.

Definition at line 24 of file IViewLayer.h.

Member Enumeration Documentation

Enumerator
LT_NONE 

Layer type is not set.

LT_BACKGROUND 

Background layer.

LT_INACTIVE 

Layer with inactive shapes.

The user interaction with the shapes is impossible.

LT_ACTIVE 

Layer with active shapes.

LT_CALIBRATION 

Calibration layer.

Definition at line 29 of file IViewLayer.h.

Member Function Documentation

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

Connect shape object to view.

Parameters
shapea shape object.
activeif true, shape will be active, if false it will be only visible.
Returns
true, if it was possible to connect this shape.

Implemented in iview::CInteractiveViewLayer, and iview::CViewLayer.

virtual void iview::IViewLayer::DisconnectAllShapes ( )
pure virtual

Disconnect all shapes from this layer.

Implemented in iview::CInteractiveViewLayer, and iview::CViewLayer.

virtual void iview::IViewLayer::DrawShapes ( QPainter &  drawContext)
pure virtual

Draw all shapes using specified draw context.

Implemented in iview::CInteractiveViewLayer, and iview::CViewLayer.

virtual int iview::IViewLayer::GetShapesCount ( ) const
pure virtual

Get count of all shapes on this layer.

Implemented in iview::CInteractiveViewLayer, and iview::CViewLayer.

virtual IShapeView* iview::IViewLayer::GetViewPtr ( ) const
pure virtual

Get parent view of this layer.

It can be used only when view is connected.

Implemented in iview::CViewLayer.

virtual bool iview::IViewLayer::IsShapeConnected ( IShape shapePtr)
pure virtual

Check, if the shape is connected to the layer.

Implemented in iview::CInteractiveViewLayer, and iview::CViewLayer.

virtual bool iview::IViewLayer::IsVisible ( ) const
pure virtual

Check, if this layer is visible.

Implemented in iview::CViewLayer.

virtual void iview::IViewLayer::OnConnectView ( IShapeView viewPtr)
pure virtual

Called after layer is connected to view.

Implemented in iview::CViewLayer.

virtual void iview::IViewLayer::OnDisconnectView ( IShapeView viewPtr)
pure virtual

Called before layer is disconnected from view.

Implemented in iview::CViewLayer.

virtual void iview::IViewLayer::SetVisible ( bool  state = true)
pure virtual

Make this layer visible.

Implemented in iview::CViewLayer.

virtual void iview::IViewLayer::UpdateAllShapes ( const istd::IChangeable::ChangeSet changeSet)
pure virtual

Send update to all shapes after view changes.

Implemented in iview::CViewLayer.


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

© 2007-2017 Witold Gantzke and Kirill Lepskiy