Salome HOME
3ceca090ca4f97503e60234effdad038a1c2e884
[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( tr( "OCC_VIEW_TITLE" ).arg( myId ).arg( aPos + 1 ) );
25 }
26
27 //***************************************************************/
28 void OCCViewer_ViewManager::contextMenuPopup( QPopupMenu* popup )
29 {
30   SUIT_ViewManager::contextMenuPopup( popup );
31   // if it is necessary invoke method CreatePopup of ViewPort
32   // be sure that existing QPopupMenu menu is used for that.
33 }