#include <MeasureGUI_DimensionInteractor.h>
Public Types | |
enum | Operation { Operation_MoveFlyoutFree, Operation_MoveFlyoutInPlane, Operation_MoveText, Operation_None } |
Signals | |
void | InteractionStarted (Handle_AIS_InteractiveObject theIO) |
void | InteractionFinished (Handle_AIS_InteractiveObject theIO) |
Public Member Functions | |
MeasureGUI_DimensionInteractor (GeometryGUI *, QObject *) | |
~MeasureGUI_DimensionInteractor () | |
void | Enable () |
void | Disable () |
Protected Slots | |
void | OnViewCreated (SUIT_ViewWindow *) |
void | OnViewRemoved (SUIT_ViewWindow *) |
Protected Member Functions | |
Operation | GetOperation (const Handle(SelectMgr_EntityOwner)&theEntity, const Qt::MouseButtons theButtons, const Qt::KeyboardModifiers theKeys) |
Identify interactive operation by picked entity and pressed buttons with modifiers. More... | |
bool | StartOperation (const Operation theOperation, const Handle(V3d_View)&theView, const int theX, const int theY) |
Prepare for interactive operation. More... | |
void | MoveFlyoutFree (const Handle(V3d_View)&theView, const int theX, const int theY) |
Perform "Operation_MoveFlyoutFree". Modify flyout of interactive dimension so as the flyout follows the mouse by its length and orientation. More... | |
void | MoveFlyoutInPlane (const Handle(V3d_View)&theView, const int theX, const int theY) |
Perform "Operation_MoveFlyoutInPlane". Modify flyout of interactive dimension so as the flyout is extended to the mouse point location in the presentation plane. More... | |
void | MoveText (const Handle(V3d_View)&theView, const int theX, const int theY) |
Perform "Operation_MoveText". Modify text of interactive dimension so as the text is moved to its fixed positions. More... | |
void | ConnectView (SUIT_ViewWindow *) |
void | DisconnectView (SUIT_ViewWindow *) |
gp_Lin | Projection (const Handle(V3d_View)&, const int, const int) |
gp_Pnt | ProjectPlane (const Handle(V3d_View)&, const int, const int, const gp_Pln &, bool &) |
Standard_Real | SensitivityTolerance (const Handle(V3d_View)&) |
virtual bool | eventFilter (QObject *, QEvent *) |
Process events from OCC viewer prior to their coming into the base viewer class. More... | |
Private Types | |
typedef NCollection_Sequence < Handle(SelectMgr_EntityOwner)> | SeqOfOwners |
Private Member Functions | |
Handle (AIS_Dimension) myInteractedIO | |
Private Attributes | |
GeometryGUI * | myGeomGUI |
bool | myIsEnabled |
OCCViewer_ViewManager * | myVM |
OCCViewer_Viewer * | myViewer |
Operation | myOperation |
bool | myOperationStarted |
gp_Pln | myFreeMovePlane |
SeqOfOwners | mySelection |
|
private |
MeasureGUI_DimensionInteractor::MeasureGUI_DimensionInteractor | ( | GeometryGUI * | theGUI, |
QObject * | theParent | ||
) |
MeasureGUI_DimensionInteractor::~MeasureGUI_DimensionInteractor | ( | ) |
References Disable().
|
protected |
void MeasureGUI_DimensionInteractor::Disable | ( | ) |
References DisconnectView(), myIsEnabled, and myVM.
|
protected |
void MeasureGUI_DimensionInteractor::Enable | ( | ) |
References ConnectView(), myGeomGUI, myIsEnabled, myViewer, myVM, OnViewCreated(), and OnViewRemoved().
|
protectedvirtual |
It handles the events coming to viewport and identifies whether the events correspond to interactive operation on dimension. If yes, the operation is performed within the interactor class and events are "accepted". Otherwise, the events are passed to viewer subroutines.
The method manages internal workflow related to starting and stopping interactive operations to modify the presentations which were passed for this interactor class.
References GetOperation(), Handle(), InteractionFinished(), InteractionStarted(), MoveFlyoutFree(), MoveFlyoutInPlane(), MoveText(), myOperation, mySelection, myViewer, Operation_MoveFlyoutFree, Operation_MoveFlyoutInPlane, Operation_MoveText, Operation_None, and StartOperation().
|
protected |
theEntity | [in] the picked entity. |
theButtons | [in] the mouse buttons. |
theKeys | [in] the keyboard modifiers. |
References Handle(), Operation_MoveFlyoutFree, Operation_MoveFlyoutInPlane, Operation_MoveText, and Operation_None.
|
private |
|
signal |
|
signal |
|
protected |
theView | [in] the interacted view. |
theX | [in] the mouse position x. |
theY | [in] the mouse position y. |
References aFirstPoint, aSecondPoint, Handle(), myFreeMovePlane, myViewer, and ProjectPlane().
|
protected |
theView | [in] the interacted view. |
theX | [in] the mouse position x. |
theY | [in] the mouse position y. |
References aCenterPoint, aFirstPoint, aFlyout, anAngle, aSecondPoint, Handle(), myViewer, and ProjectPlane().
|
protected |
theView | [in] the interacted view. |
theX | [in] the mouse position x. |
theY | [in] the mouse position y. |
References aCenterPoint, aFirstPoint, aFlyout, aHeight, anAngle, aSecondPoint, Handle(), myViewer, and ProjectPlane().
|
protectedslot |
References ConnectView().
|
protectedslot |
References DisconnectView().
|
protected |
|
protected |
References Handle(), and Projection().
|
protected |
|
protected |
theOp | [in] the operation. |
theView | [in] the interacted view. |
theX | [in] the mouse position x. |
theY | [in] the mouse position y. |
References aFirstPoint, aSecondPoint, Handle(), myFreeMovePlane, Operation_MoveFlyoutFree, Operation_MoveFlyoutInPlane, Operation_MoveText, Projection(), and ProjectPlane().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |