Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
MeasureGUI_DimensionInteractor Class Reference

#include <MeasureGUI_DimensionInteractor.h>

Inheritance diagram for MeasureGUI_DimensionInteractor:
Inheritance graph

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

GeometryGUImyGeomGUI
 
bool myIsEnabled
 
OCCViewer_ViewManager * myVM
 
OCCViewer_Viewer * myViewer
 
Operation myOperation
 
bool myOperationStarted
 
gp_Pln myFreeMovePlane
 
SeqOfOwners mySelection
 

Member Typedef Documentation

Member Enumeration Documentation

Enumerator
Operation_MoveFlyoutFree 
Operation_MoveFlyoutInPlane 
Operation_MoveText 
Operation_None 

Constructor & Destructor Documentation

MeasureGUI_DimensionInteractor::MeasureGUI_DimensionInteractor ( GeometryGUI theGUI,
QObject theParent 
)
MeasureGUI_DimensionInteractor::~MeasureGUI_DimensionInteractor ( )

References Disable().

Member Function Documentation

void MeasureGUI_DimensionInteractor::ConnectView ( SUIT_ViewWindow *  theView)
protected
void MeasureGUI_DimensionInteractor::Disable ( )

References DisconnectView(), myIsEnabled, and myVM.

void MeasureGUI_DimensionInteractor::DisconnectView ( SUIT_ViewWindow *  theView)
protected
void MeasureGUI_DimensionInteractor::Enable ( )
bool MeasureGUI_DimensionInteractor::eventFilter ( QObject theObject,
QEvent *  theEvent 
)
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().

MeasureGUI_DimensionInteractor::Operation MeasureGUI_DimensionInteractor::GetOperation ( const Handle(SelectMgr_EntityOwner)&  theEntity,
const Qt::MouseButtons  theButtons,
const Qt::KeyboardModifiers  theKeys 
)
protected
Parameters
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.

MeasureGUI_DimensionInteractor::Handle ( AIS_Dimension  )
private
void MeasureGUI_DimensionInteractor::InteractionFinished ( Handle_AIS_InteractiveObject  theIO)
signal
void MeasureGUI_DimensionInteractor::InteractionStarted ( Handle_AIS_InteractiveObject  theIO)
signal
void MeasureGUI_DimensionInteractor::MoveFlyoutFree ( const Handle(V3d_View)&  theView,
const int  theX,
const int  theY 
)
protected
Parameters
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().

void MeasureGUI_DimensionInteractor::MoveFlyoutInPlane ( const Handle(V3d_View)&  theView,
const int  theX,
const int  theY 
)
protected
Parameters
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().

void MeasureGUI_DimensionInteractor::MoveText ( const Handle(V3d_View)&  theView,
const int  theX,
const int  theY 
)
protected
Parameters
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().

void MeasureGUI_DimensionInteractor::OnViewCreated ( SUIT_ViewWindow *  theView)
protectedslot

References ConnectView().

void MeasureGUI_DimensionInteractor::OnViewRemoved ( SUIT_ViewWindow *  theView)
protectedslot

References DisconnectView().

gp_Lin MeasureGUI_DimensionInteractor::Projection ( const Handle(V3d_View)&  theView,
const int  theMouseX,
const int  theMouseY 
)
protected
gp_Pnt MeasureGUI_DimensionInteractor::ProjectPlane ( const Handle(V3d_View)&  theView,
const int  theMouseX,
const int  theMouseY,
const gp_Pln &  thePlane,
bool &  theIsDone 
)
protected

References Handle(), and Projection().

Standard_Real MeasureGUI_DimensionInteractor::SensitivityTolerance ( const Handle(V3d_View)&  theView)
protected
bool MeasureGUI_DimensionInteractor::StartOperation ( const Operation  theOperation,
const Handle(V3d_View)&  theView,
const int  theX,
const int  theY 
)
protected
Parameters
theOp[in] the operation.
theView[in] the interacted view.
theX[in] the mouse position x.
theY[in] the mouse position y.
Returns
TRUE if operation can be started.

References aFirstPoint, aSecondPoint, Handle(), myFreeMovePlane, Operation_MoveFlyoutFree, Operation_MoveFlyoutInPlane, Operation_MoveText, Projection(), and ProjectPlane().

Member Data Documentation

gp_Pln MeasureGUI_DimensionInteractor::myFreeMovePlane
private
GeometryGUI* MeasureGUI_DimensionInteractor::myGeomGUI
private
bool MeasureGUI_DimensionInteractor::myIsEnabled
private
Operation MeasureGUI_DimensionInteractor::myOperation
private
bool MeasureGUI_DimensionInteractor::myOperationStarted
private
SeqOfOwners MeasureGUI_DimensionInteractor::mySelection
private
OCCViewer_Viewer* MeasureGUI_DimensionInteractor::myViewer
private
OCCViewer_ViewManager* MeasureGUI_DimensionInteractor::myVM
private

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