Version: 9.16.0
MeasureGUI_AnnotationInteractor.h
Go to the documentation of this file.
1// Copyright (C) 2007-2026 CEA, EDF, OPEN CASCADE
2//
3// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5//
6// This library is free software; you can redistribute it and/or
7// modify it under the terms of the GNU Lesser General Public
8// License as published by the Free Software Foundation; either
9// version 2.1 of the License, or (at your option) any later version.
10//
11// This library is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14// Lesser General Public License for more details.
15//
16// You should have received a copy of the GNU Lesser General Public
17// License along with this library; if not, write to the Free Software
18// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19//
20// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21//
22
23// GEOM GEOMGUI : GUI for Geometry component
24// File : MeasureGUI_AnnotationInteractor.h
25// Author : Anton POLETAEV, Open CASCADE S.A.S.
26//
27#ifndef MEASUREGUI_ANNOTATIONINTERACTOR_H
28#define MEASUREGUI_ANNOTATIONINTERACTOR_H
29
30#include <GEOM_Annotation.hxx>
31#include <SelectMgr_EntityOwner.hxx>
32#include <SelectMgr_SequenceOfOwner.hxx>
33#include <QObject>
34#include <QPoint>
35
36class GeometryGUI;
37class OCCViewer_Viewer;
38class OCCViewer_ViewManager;
39class OCCViewer_ViewPort3d;
40class SUIT_ViewWindow;
41
51{
52 Q_OBJECT
53
54public:
55
61
64
65public:
66
68 void Enable();
69
71 void Disable();
72
74 void SetEditEntry( const QString& theEntry ) { myEditEntry = theEntry; }
75
76protected:
77
79 void ConnectView( SUIT_ViewWindow* theWindow );
80
82 void DisconnectView( SUIT_ViewWindow* theWindow );
83
84signals:
85
87 void SignalInteractionStarted( Handle_GEOM_Annotation theIO );
88
90 void SignalInteractionFinished( Handle_GEOM_Annotation theIO );
91
92protected slots:
93
95 void OnViewCreated( SUIT_ViewWindow* );
96
98 void OnViewRemoved( SUIT_ViewWindow* );
99
100protected:
101
107 virtual bool eventFilter( QObject*, QEvent* );
108
109private:
110
113 OCCViewer_ViewManager* myVM;
114 OCCViewer_Viewer* myViewer;
115 OCCViewer_ViewPort3d* myActiveViewPort;
117 SelectMgr_SequenceOfOwner mySelection;
119 QString myEditEntry;
120};
121
122#endif
Interactive object, representating annotation entity.
Definition: GEOM_Annotation.hxx:63
Definition: GeometryGUI.h:74
Class implementing logical layer for interactive dragging of annotation labels. It includes two compo...
Definition: MeasureGUI_AnnotationInteractor.h:51
void OnViewRemoved(SUIT_ViewWindow *)
Handler for signal coming from GUI layer.
Definition: MeasureGUI_AnnotationInteractor.cxx:178
void SignalInteractionStarted(Handle_GEOM_Annotation theIO)
Emitted when interactor begins modification of the interactive object.
GeometryGUI * myGeomGUI
Definition: MeasureGUI_AnnotationInteractor.h:111
Handle(GEOM_Annotation) myActiveIO
MeasureGUI_AnnotationInteractor(GeometryGUI *theGUI, QObject *theOwner)
Constructor.
Definition: MeasureGUI_AnnotationInteractor.cxx:49
void ConnectView(SUIT_ViewWindow *theWindow)
Connect interactor's event handler to the view window given.
Definition: MeasureGUI_AnnotationInteractor.cxx:151
QPoint myStartPoint
Definition: MeasureGUI_AnnotationInteractor.h:118
OCCViewer_ViewPort3d * myActiveViewPort
Definition: MeasureGUI_AnnotationInteractor.h:115
void Disable()
Disables event processing and interaction handlers.
Definition: MeasureGUI_AnnotationInteractor.cxx:117
bool myIsEnabled
Definition: MeasureGUI_AnnotationInteractor.h:112
void Enable()
Enables event processing and interaction handlers.
Definition: MeasureGUI_AnnotationInteractor.cxx:79
void OnViewCreated(SUIT_ViewWindow *)
Handler for signal coming from GUI layer.
Definition: MeasureGUI_AnnotationInteractor.cxx:169
void DisconnectView(SUIT_ViewWindow *theWindow)
Disconnect interactor's event handler from the view window given.
Definition: MeasureGUI_AnnotationInteractor.cxx:160
QString myEditEntry
Definition: MeasureGUI_AnnotationInteractor.h:119
virtual ~MeasureGUI_AnnotationInteractor()
Destructor.
Definition: MeasureGUI_AnnotationInteractor.cxx:64
OCCViewer_ViewManager * myVM
Definition: MeasureGUI_AnnotationInteractor.h:113
void SetEditEntry(const QString &theEntry)
Set entry of allowed annotation presentations.
Definition: MeasureGUI_AnnotationInteractor.h:74
OCCViewer_Viewer * myViewer
Definition: MeasureGUI_AnnotationInteractor.h:114
SelectMgr_SequenceOfOwner mySelection
Definition: MeasureGUI_AnnotationInteractor.h:117
void SignalInteractionFinished(Handle_GEOM_Annotation theIO)
Emitted when interactor finished modification of the interactive object.
virtual bool eventFilter(QObject *, QEvent *)
Hooks and process events from OCCT viewer prior to their coming into the base viewer class.
Definition: MeasureGUI_AnnotationInteractor.cxx:187