Salome HOME
New item (FontItem), allowing to show information about font setting and to select...
[modules/gui.git] / src / GLViewer / GLViewer_ViewManager.cxx
1 // File:      GLViewer_ViewManager.cxx
2 // Created:   November, 2004
3 // Author:    OCC team
4 // Copyright (C) CEA 2004
5
6 //#include <GLViewerAfx.h>
7 #include "GLViewer_ViewManager.h"
8 #include "GLViewer_ViewFrame.h"
9 #include "GLViewer_Viewer2d.h"
10 #include "SUIT_Desktop.h"
11
12 int GLViewer_ViewManager::myMaxId = 0;
13
14 //***************************************************************
15 GLViewer_ViewManager::GLViewer_ViewManager( SUIT_Study* theStudy, SUIT_Desktop* theDesktop )
16 : SUIT_ViewManager( theStudy, theDesktop )
17 {
18     myId = ++myMaxId;
19     setViewModel( new GLViewer_Viewer2d( "GLViewer" ) );
20 }
21
22 //***************************************************************
23 GLViewer_ViewManager::~GLViewer_ViewManager()
24 {
25 }
26
27 //***************************************************************
28 void GLViewer_ViewManager::setViewName(SUIT_ViewWindow* theView)
29 {
30     int aPos = myViews.find(theView);
31     theView->setCaption( QString( "GL scene:%1 - viewer:%2" ).arg(myId).arg(aPos+1));
32 }
33
34 //***************************************************************
35 void GLViewer_ViewManager::contextMenuPopup( QPopupMenu* popup )
36 {
37   SUIT_ViewManager::contextMenuPopup( popup );
38   // if it is necessary invoke method CreatePopup of ViewPort
39   // be sure that existing QPopupMenu menu is used for that.
40 }