Version: 9.12.0
MeasureGUI_AnnotationInteractor Class Reference

Class implementing logical layer for interactive dragging of annotation labels. It includes two components: listener for GUI events occurring 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::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::~MeasureGUI_AnnotationInteractor ( )
virtual

References Disable(), and myActiveViewPort.

Member Function Documentation

◆ ConnectView()

void MeasureGUI_AnnotationInteractor::ConnectView ( SUIT_ViewWindow *  theWindow)
protected

◆ Disable()

void MeasureGUI_AnnotationInteractor::Disable ( )

◆ DisconnectView()

void MeasureGUI_AnnotationInteractor::DisconnectView ( SUIT_ViewWindow *  theWindow)
protected

◆ Enable()

void MeasureGUI_AnnotationInteractor::Enable ( )

◆ eventFilter()

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 Handle(), myActiveViewPort, myEditEntry, mySelection, myStartPoint, myViewer, SignalInteractionFinished(), and SignalInteractionStarted().

◆ Handle()

MeasureGUI_AnnotationInteractor::Handle ( GEOM_Annotation  )
private

◆ OnViewCreated

void MeasureGUI_AnnotationInteractor::OnViewCreated ( SUIT_ViewWindow *  theView)
protectedslot

References ConnectView().

◆ OnViewRemoved

void MeasureGUI_AnnotationInteractor::OnViewRemoved ( SUIT_ViewWindow *  theView)
protectedslot

References DisconnectView().

◆ SetEditEntry()

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

References myEditEntry.

◆ SignalInteractionFinished

void MeasureGUI_AnnotationInteractor::SignalInteractionFinished ( Handle_GEOM_Annotation  theIO)
signal

◆ SignalInteractionStarted

void MeasureGUI_AnnotationInteractor::SignalInteractionStarted ( Handle_GEOM_Annotation  theIO)
signal

Member Data Documentation

◆ myActiveViewPort

OCCViewer_ViewPort3d* MeasureGUI_AnnotationInteractor::myActiveViewPort
private

◆ myEditEntry

QString MeasureGUI_AnnotationInteractor::myEditEntry
private

◆ myGeomGUI

GeometryGUI* MeasureGUI_AnnotationInteractor::myGeomGUI
private

◆ myIsEnabled

bool MeasureGUI_AnnotationInteractor::myIsEnabled
private

◆ mySelection

SelectMgr_SequenceOfOwner MeasureGUI_AnnotationInteractor::mySelection
private

◆ myStartPoint

QPoint MeasureGUI_AnnotationInteractor::myStartPoint
private

◆ myViewer

OCCViewer_Viewer* MeasureGUI_AnnotationInteractor::myViewer
private

◆ myVM

OCCViewer_ViewManager* MeasureGUI_AnnotationInteractor::myVM
private

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