|
ACF $AcfVersion:0$
|
#include <CInteractiveViewLayer.h>
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 | |
| CInteractiveViewLayer () | |
| virtual | ~CInteractiveViewLayer () |
| virtual i2d::CRect | RecalcAllShapes (const istd::IChangeable::ChangeSet &changeSet) override |
| Recalculate all shapes after view changes. | |
| virtual i2d::CRect | CalcBoundingBox () const override |
| Calculate bounding box for all shapes. | |
| 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 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 void | DisconnectAllShapes () override |
| Disconnect all shapes from this layer. | |
| virtual void | DrawShapes (QPainter &drawContext) override |
| Draw all shapes using specified draw context. | |
| 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. | |
| 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 IShapeView * | GetViewPtr () const override |
| Get parent view of 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 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. | |
Public Member Functions inherited from istd::IPolymorphic | |
| virtual | ~IPolymorphic () |
Protected Attributes | |
| ShapeList | m_activeShapes |
Protected Attributes inherited from iview::CViewLayer | |
| ShapeList | m_shapes |
Additional Inherited Members | |
Protected Types inherited from iview::CViewLayer | |
| typedef QVector< ShapeWithBoundingBox > | ShapeList |
Protected Member Functions inherited from iview::CViewLayer | |
| bool | OnChangeShapeElement (ShapeList::Iterator elementIter) |
| void | DisconnectShapeElement (ShapeList &map, ShapeList::iterator iter) |
| void | InvalidateBoundingBox () |
| i2d::CRect & | GetBoundingBoxRef () const |
| void | SetBoundingBoxValid () const |
Definition at line 14 of file CInteractiveViewLayer.h.
Definition at line 19 of file CInteractiveViewLayer.h.
| iview::CInteractiveViewLayer::CInteractiveViewLayer | ( | ) |
|
virtual |
|
overridevirtual |
Called before dragging is begin.
It set also reference value for dragging position.
Implements iview::IDraggable.
|
overridevirtual |
Calculate bounding box for all shapes.
Reimplemented from iview::CViewLayer.
|
overridevirtual |
Connect active shape object.
Implements iview::ISelectableLayer.
|
overridevirtual |
Connect shape object to view.
| shape | a shape object. |
| active | if true, shape will be active, if false it will be only visible. |
Reimplemented from iview::CViewLayer.
|
overridevirtual |
Set all shapes to be deselected.
Implements iview::ISelectable.
|
overridevirtual |
Disconnect all shapes from this layer.
Reimplemented from iview::CViewLayer.
|
overridevirtual |
Disconnect shape object from view.
This shape had to be connected using ConnectShape.
Reimplemented from iview::CViewLayer.
|
overridevirtual |
Draw only focused shape.
Implements iview::ISelectableLayer.
|
overridevirtual |
Draw all shapes using specified draw context.
Reimplemented from iview::CViewLayer.
|
overridevirtual |
Called after dragging.
Implements iview::IDraggable.
|
inlineoverridevirtual |
Get actual display mode.
Implements iview::ISelectable.
Definition at line 101 of file CInteractiveViewLayer.h.
References iview::ISelectable::GetDisplayMode(), iview::CViewLayer::GetViewPtr(), and NULL.
|
inlineoverridevirtual |
Get actual edit mode.
Implements iview::ISelectable.
Definition at line 92 of file CInteractiveViewLayer.h.
References iview::ISelectable::GetEditMode(), iview::CViewLayer::GetViewPtr(), and NULL.
|
inlineoverridevirtual |
Get state of system keys.
Implements iview::ISelectable.
Definition at line 83 of file CInteractiveViewLayer.h.
References iview::ISelectable::GetKeysState(), iview::CViewLayer::GetViewPtr(), and NULL.
|
overridevirtual |
Get count of selected shapes.
Implements iview::ISelectable.
|
overridevirtual |
Get description to shape at specified position.
Reimplemented from iview::CViewLayer.
|
overridevirtual |
Get count of all shapes on this layer.
Reimplemented from iview::CViewLayer.
|
overridevirtual |
Get tooltip at specified position.
Reimplemented from iview::CViewLayer.
|
overridevirtual |
Get number of unselected shapes.
Implements iview::ISelectableLayer.
|
overridevirtual |
Get set of selected shapes.
Implements iview::ISelectable.
|
overridevirtual |
Check if drag is enabled.
Implements iview::IDraggable.
|
overridevirtual |
Check, if the shape is connected to the layer.
Reimplemented from iview::CViewLayer.
|
overridevirtual |
Check, if any shape is touched.
When shape is touched, it return also pointer to this shape.
Reimplemented from iview::CViewLayer.
|
overridevirtual |
Check, if any shape is touched.
When shape is touched, it return also pointer to this shape.
| shapePtrPtr | pointer to shape pointer will be filled if shape is found. It can be equal NULL. |
Implements iview::ISelectableLayer.
|
overridevirtual |
Invalidate a shape.
When you call Update, all invalidated shapes will be repainted.
Reimplemented from iview::CViewLayer.
|
overridevirtual |
Called, when this layer has focus, and mouse button was pushed down or up on this object.
Implements iview::ISelectableLayer.
|
overridevirtual |
Called, when this layer has focus, and mouse was moved.
Implements iview::ISelectableLayer.
|
overridevirtual |
Called, when key has been pressed.
Implements iview::ISelectableLayer.
|
overridevirtual |
Called, when mouse button was pushed down or up.
Implements iview::ISelectableLayer.
|
overridevirtual |
Called when shape loose focus.
Implements iview::ISelectable.
|
overridevirtual |
Called when shape get focus.
Implements iview::ISelectable.
|
overridevirtual |
It is called after change shape selection state.
Implements iview::ISelectable.
|
overridevirtual |
Recalculate all shapes after view changes.
Reimplemented from iview::CViewLayer.
|
overridevirtual |
Set new drag position.
It must be enclosed using BeginDrag() and EndDrag() methods.
Implements iview::IDraggable.
|
protected |
Definition at line 72 of file CInteractiveViewLayer.h.