]> SALOME platform Git repositories - modules/visu.git/blob - src/VISUGUI/VisuGUI_ViewExtender.h
Salome HOME
16303177d1d2963cddc9e1a30785c5e7b9c770ef
[modules/visu.git] / src / VISUGUI / VisuGUI_ViewExtender.h
1 //  Copyright (C) 2007-2008  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.
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 //  VISU VISUGUI : GUI of VISU component
23 //  File   : VisuGUI_ViewExtender.h
24 //  Author : Vitaly Smetannikov
25 //  Module : VISU
26 //
27 #ifndef VisuGUI_ViewExtender_HeaderFile
28 #define VisuGUI_ViewExtender_HeaderFile
29
30 #include <CAM_ViewExtender.h>
31 #include <SALOME_ListIO.hxx>
32 #include <QObject>
33 #include <QMap>
34
35 class VisuGUI;
36 //class QtxAction;
37 //class QDialog;
38
39 class VisuGUI_SegmentationMgr;
40 class SVTK_Viewer;
41 class SVTK_ViewWindow;
42 class SUIT_ViewWindow;
43 class VTKViewer_Actor;
44
45
46 class VisuGUI_ViewExtender:  public QObject, public CAM_ViewExtender
47 {
48   Q_OBJECT
49
50  public:
51   VisuGUI_ViewExtender(VisuGUI* theModule);
52
53   virtual ~VisuGUI_ViewExtender();
54
55   virtual int createToolbar(SUIT_ViewWindow* theView);
56   virtual void contextMenuPopup(QMenu* theMenu);
57
58   virtual void activate(SUIT_ViewModel*);
59   virtual void deactivate(SUIT_ViewModel*);
60
61   VisuGUI_SegmentationMgr* getSegmentationMgr(SVTK_ViewWindow* theWindow);
62  
63
64 private slots:
65   //  void onPlanesMgr();
66   // void onDialogDestroy(); 
67   // void onShowPlanes(bool);
68   // void onDeactivatePlanes(bool);
69  void onViewDeleted(SUIT_ViewWindow* theWindow);
70  void onAddActor(SVTK_ViewWindow* theWindow, VTKViewer_Actor* theActor);
71
72  private:
73
74  //enum { ClippingPlaneMgrId, ShowClippingPlanesId, DeactivateClippingPlanesId };
75
76  //QMap<int, QtxAction*> myActionsMap;
77   VisuGUI* myModule;
78
79   //QDialog* myNonModalDlg;
80
81   //VisuGUI_SegmentationMgr* mySegmentationMgr;
82   QMap<SVTK_ViewWindow*, VisuGUI_SegmentationMgr*> myViewMgrMap;
83
84   QList<SVTK_Viewer*> myViewers;
85
86   //SALOME_ListIO myListIO;
87   
88 };
89
90
91 #endif