Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
MeasureGUI_AnnotationInteractor.h
Go to the documentation of this file.
1 // Copyright (C) 2007-2016 CEA/DEN, EDF R&D, 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 
36 class GeometryGUI;
37 class OCCViewer_Viewer;
38 class OCCViewer_ViewManager;
39 class OCCViewer_ViewPort3d;
40 class SUIT_ViewWindow;
41 
51 {
52  Q_OBJECT
53 
54 public:
55 
61 
64 
65 public:
66 
68  void Enable();
69 
71  void Disable();
72 
74  void SetEditEntry( const QString& theEntry ) { myEditEntry = theEntry; }
75 
76 protected:
77 
79  void ConnectView( SUIT_ViewWindow* theWindow );
80 
82  void DisconnectView( SUIT_ViewWindow* theWindow );
83 
84 signals:
85 
87  void SignalInteractionStarted( Handle_GEOM_Annotation theIO );
88 
90  void SignalInteractionFinished( Handle_GEOM_Annotation theIO );
91 
92 protected slots:
93 
95  void OnViewCreated( SUIT_ViewWindow* );
96 
98  void OnViewRemoved( SUIT_ViewWindow* );
99 
100 protected:
101 
107  virtual bool eventFilter( QObject*, QEvent* );
108 
109 private:
110 
113  OCCViewer_ViewManager* myVM;
114  OCCViewer_Viewer* myViewer;
115  OCCViewer_ViewPort3d* myActiveViewPort;
116  Handle(GEOM_Annotation) myActiveIO;
117  SelectMgr_SequenceOfOwner mySelection;
118  QPoint myStartPoint;
119  QString myEditEntry;
120 };
121 
122 #endif