|
ACF $AcfVersion:0$
|
Standard implementation of view layer. More...
#include <CViewLayer.h>
Classes | |
| struct | ShapeWithBoundingBox |
Public Member Functions | |
| 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 IShapeView * | GetViewPtr () 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 IDisplay * | GetParentDisplayPtr () const override |
| Get parent object of this display. | |
| virtual const CScreenTransform & | GetTransform () 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 IColorSchema & | GetColorSchema () 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 TouchState | IsTouched (istd::CIndex2d position) const override |
| Check, if any shape is touched. | |
| 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 () |
Protected Types | |
| typedef QVector< ShapeWithBoundingBox > | ShapeList |
Protected Member Functions | |
| bool | OnChangeShapeElement (ShapeList::Iterator elementIter) |
| void | DisconnectShapeElement (ShapeList &map, ShapeList::iterator iter) |
| void | InvalidateBoundingBox () |
| i2d::CRect & | GetBoundingBoxRef () 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 | |
| ShapeList | m_shapes |
Additional Inherited Members | |
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... | |
Standard implementation of view layer.
It contains non interactive shapes only.
Definition at line 21 of file CViewLayer.h.
|
protected |
Definition at line 67 of file CViewLayer.h.
| iview::CViewLayer::CViewLayer | ( | ) |
|
virtual |
|
protectedvirtual |
Calculate bounding box for all shapes.
Reimplemented in iview::CInteractiveViewLayer.
|
overridevirtual |
Connect shape object to view.
| shape | a shape object. |
| active | if true, shape will be active, if false it will be only visible. |
Implements iview::IViewLayer.
Reimplemented in iview::CInteractiveViewLayer.
|
overridevirtual |
Disconnect all shapes from this layer.
Implements iview::IViewLayer.
Reimplemented in iview::CInteractiveViewLayer.
|
overridevirtual |
Disconnect shape object from view.
This shape had to be connected using ConnectShape.
Implements iview::IShapeObserver.
Reimplemented in iview::CInteractiveViewLayer.
|
protected |
|
overridevirtual |
Draw all shapes using specified draw context.
Implements iview::IViewLayer.
Reimplemented in iview::CInteractiveViewLayer.
|
overridevirtual |
Get bounding box of all object in this display.
Implements iview::IDisplay.
|
protected |
|
overridevirtual |
Get bounding box of client area.
Implements iview::IDisplay.
|
overridevirtual |
Get color schema.
Implements iview::IDisplay.
|
overridevirtual |
Get parent object of this display.
If this display is root, it returns NULL.
Implements iview::IDisplay.
|
overridevirtual |
Get description to shape at specified position.
Implements iview::ITouchable.
Reimplemented in iview::CInteractiveViewLayer.
|
overridevirtual |
Get all shapes on this layer.
Implements iview::IViewLayer.
|
overridevirtual |
Get count of all shapes on this layer.
Implements iview::IViewLayer.
Reimplemented in iview::CInteractiveViewLayer.
|
overridevirtual |
Get tooltip at specified position.
Implements iview::ITouchable.
Reimplemented in iview::CInteractiveViewLayer.
|
overridevirtual |
Return a screen transformation.
This transformation converts view units to screen units.
Implements iview::IDisplay.
|
overridevirtual |
Get parent view of this layer.
It can be used only when view is connected.
Implements iview::IViewLayer.
Referenced by iview::CInteractiveViewLayer::GetDisplayMode(), iview::CInteractiveViewLayer::GetEditMode(), and iview::CInteractiveViewLayer::GetKeysState().
|
protected |
|
overridevirtual |
Check, if the shape is connected to the layer.
Implements iview::IViewLayer.
Reimplemented in iview::CInteractiveViewLayer.
|
overridevirtual |
Check, if any shape is touched.
When shape is touched, it return also pointer to this shape.
Implements iview::ITouchable.
Reimplemented in iview::CInteractiveViewLayer, and iview::CToolsViewLayer.
|
inlineoverridevirtual |
Check, if this layer is visible.
Implements iview::IViewLayer.
Definition at line 107 of file CViewLayer.h.
|
overridevirtual |
Invalidate display area.
| prevArea | previous area used to display object. |
| newArea | new area used to display object. |
Implements iview::IDisplay.
|
overridevirtual |
Invalidate a shape.
When you call Update, all invalidated shapes will be repainted.
Implements iview::IShapeObserver.
Reimplemented in iview::CInteractiveViewLayer.
|
protected |
|
overridevirtual |
Called after layer is connected to view.
Implements iview::IViewLayer.
|
overridevirtual |
Called before layer is disconnected from view.
Implements iview::IViewLayer.
|
protectedvirtual |
Recalculate all shapes after view changes.
Reimplemented in iview::CInteractiveViewLayer.
|
protected |
|
overridevirtual |
Make this layer visible.
Implements iview::IViewLayer.
|
overridevirtual |
Send update to all shapes after view changes.
Implements iview::IViewLayer.
|
protected |
Definition at line 94 of file CViewLayer.h.