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

Class implementing logical layer for interactive dragging of annotation labels. It includes two components: listener for GUI events occuring inside of OCCT 3D viewer and processor for hooked events to perform interactive modification of the selected annotation within current AIS context.

#include <MeasureGUI_AnnotationInteractor.h>

Inheritance diagram for MeasureGUI_AnnotationInteractor:
Inheritance graph

Signals

void SignalInteractionStarted (Handle_GEOM_Annotation theIO)
 Emitted when interactor begins modification of the interactive object. More...
 
void SignalInteractionFinished (Handle_GEOM_Annotation theIO)
 Emitted when interactor finished modification of the interactive object. More...
 

Public Member Functions

 MeasureGUI_AnnotationInteractor (GeometryGUI *theGUI, QObject *theOwner)
 Constructor. More...
 
virtual ~MeasureGUI_AnnotationInteractor ()
 Destructor. More...
 
void Enable ()
 Enables event processing and interaction handlers. More...
 
void Disable ()
 Disables event processing and interaction handlers. More...
 
void SetEditEntry (const QString &theEntry)
 Set entry of allowed annotation presentations. More...
 

Protected Slots

void OnViewCreated (SUIT_ViewWindow *)
 Handler for signal coming from GUI layer. More...
 
void OnViewRemoved (SUIT_ViewWindow *)
 Handler for signal coming from GUI layer. More...
 

Protected Member Functions

void ConnectView (SUIT_ViewWindow *theWindow)
 Connect interactor's event handler to the view window given. More...
 
void DisconnectView (SUIT_ViewWindow *theWindow)
 Disconnect interactor's event handler from the view window given. More...
 
virtual bool eventFilter (QObject *, QEvent *)
 Hooks and process events from OCCT viewer prior to their coming into the base viewer class. More...
 

Private Member Functions

 Handle (GEOM_Annotation) myActiveIO
 

Private Attributes

GeometryGUImyGeomGUI
 
bool myIsEnabled
 
OCCViewer_ViewManager * myVM
 
OCCViewer_Viewer * myViewer
 
OCCViewer_ViewPort3d * myActiveViewPort
 
SelectMgr_SequenceOfOwner mySelection
 
QPoint myStartPoint
 
QString myEditEntry
 

Constructor & Destructor Documentation

MeasureGUI_AnnotationInteractor::MeasureGUI_AnnotationInteractor ( GeometryGUI theGUI,
QObject theOwner 
)

Connects to existing viewer/view windows to process events.

Parameters
theGUI[in] the geometry module's GUI interface.
theOwner[in] the owner of the instance.
MeasureGUI_AnnotationInteractor::~MeasureGUI_AnnotationInteractor ( )
virtual

References Disable(), myActiveViewPort, and NULL.

Member Function Documentation

void MeasureGUI_AnnotationInteractor::ConnectView ( SUIT_ViewWindow *  theWindow)
protected
void MeasureGUI_AnnotationInteractor::Disable ( )
void MeasureGUI_AnnotationInteractor::DisconnectView ( SUIT_ViewWindow *  theWindow)
protected
void MeasureGUI_AnnotationInteractor::Enable ( )
bool MeasureGUI_AnnotationInteractor::eventFilter ( QObject theObject,
QEvent *  theEvent 
)
protectedvirtual

It handles the events coming to viewport and identifies whether the events can invoke an interaction operation or not. If yes, the operation is performed within the interactor class and events are "accepted". Otherwise, the events are passed to viewer's subroutines.

References anIO, Handle(), myActiveViewPort, myEditEntry, mySelection, myStartPoint, myViewer, NULL, SignalInteractionFinished(), and SignalInteractionStarted().

MeasureGUI_AnnotationInteractor::Handle ( GEOM_Annotation  )
private
void MeasureGUI_AnnotationInteractor::OnViewCreated ( SUIT_ViewWindow *  theView)
protectedslot

References ConnectView().

void MeasureGUI_AnnotationInteractor::OnViewRemoved ( SUIT_ViewWindow *  theView)
protectedslot

References DisconnectView().

void MeasureGUI_AnnotationInteractor::SetEditEntry ( const QString &  theEntry)
inline

References myEditEntry.

void MeasureGUI_AnnotationInteractor::SignalInteractionFinished ( Handle_GEOM_Annotation  theIO)
signal
void MeasureGUI_AnnotationInteractor::SignalInteractionStarted ( Handle_GEOM_Annotation  theIO)
signal

Member Data Documentation

OCCViewer_ViewPort3d* MeasureGUI_AnnotationInteractor::myActiveViewPort
private
QString MeasureGUI_AnnotationInteractor::myEditEntry
private
GeometryGUI* MeasureGUI_AnnotationInteractor::myGeomGUI
private
bool MeasureGUI_AnnotationInteractor::myIsEnabled
private
SelectMgr_SequenceOfOwner MeasureGUI_AnnotationInteractor::mySelection
private
QPoint MeasureGUI_AnnotationInteractor::myStartPoint
private
OCCViewer_Viewer* MeasureGUI_AnnotationInteractor::myViewer
private
OCCViewer_ViewManager* MeasureGUI_AnnotationInteractor::myVM
private

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