Salome HOME
Initial version
[modules/gui.git] / src / OCCViewer / OCCViewer_ViewManager.cxx
1 #include "OCCViewer_ViewManager.h"
2 #include "OCCViewer_ViewWindow.h"
3 #include "SUIT_Desktop.h"
4
5 int OCCViewer_ViewManager::myMaxId = 0;
6
7 //***************************************************************
8 OCCViewer_ViewManager::OCCViewer_ViewManager( SUIT_Study* study, SUIT_Desktop* theDesktop, bool DisplayTrihedron )
9 : SUIT_ViewManager( study, theDesktop )
10 {
11   myId = ++myMaxId;
12   setViewModel( new OCCViewer_Viewer( DisplayTrihedron ) );
13 }
14
15 //***************************************************************
16 OCCViewer_ViewManager::~OCCViewer_ViewManager()
17 {
18 }
19
20 //***************************************************************
21 void OCCViewer_ViewManager::setViewName(SUIT_ViewWindow* theView)
22 {
23   int aPos = myViews.find(theView);
24   theView->setCaption( QString( "OCC scene:%1 - viewer:%2" ).arg(myId).arg(aPos+1));
25 }
26
27 //***************************************************************
28 /*bool OCCViewer_ViewManager::insertView(SUIT_ViewWindow* theView)
29 {
30   bool res = SUIT_ViewManager::insertView( theView );
31   if ( res ) {
32     OCCViewer_ViewWindow* view = (OCCViewer_ViewWindow*)theView;
33     connect( view, SIGNAL(cloneView()), this, SLOT(createView()) );
34   }
35   return res;
36 }*/
37
38 //***************************************************************
39 void OCCViewer_ViewManager::contextMenuPopup( QPopupMenu* popup )
40 {
41   SUIT_ViewManager::contextMenuPopup( popup );
42   // if it is necessary invoke method CreatePopup of ViewPort
43   // be sure that existing QPopupMenu menu is used for that.
44 }