]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Identificator assignment moved on the base level - SUIT_ViewManager. Useless id's...
authorstv <stv@opencascade.com>
Mon, 25 Sep 2006 06:37:23 +0000 (06:37 +0000)
committerstv <stv@opencascade.com>
Mon, 25 Sep 2006 06:37:23 +0000 (06:37 +0000)
Title mechanism in the SUIT_ViewManager was changed. Now view manager support title for views with specific tags: %M - view manager number, %V - view number.

src/GLViewer/GLViewer_ViewManager.cxx
src/GLViewer/GLViewer_ViewManager.h

index b9cbff5aef4336c90bd1ba3522ff838edeb416e4..8e1f1e860f69d761d704a7db5d0972594b534e88 100644 (file)
 #include "GLViewer_Viewer2d.h"
 #include "SUIT_Desktop.h"
 
-int GLViewer_ViewManager::myMaxId = 0;
-
 /*!Constructor.*/
 GLViewer_ViewManager::GLViewer_ViewManager( SUIT_Study* theStudy, SUIT_Desktop* theDesktop )
-: SUIT_ViewManager( theStudy, theDesktop )
+: SUIT_ViewManager( theStudy, theDesktop, new GLViewer_Viewer2d( "GLViewer" ) )
 {
-    myId = ++myMaxId;
-    setViewModel( new GLViewer_Viewer2d( "GLViewer" ) );
+  setTitle( tr( "GL_VIEW_TITLE" ) );
 }
 
 /*!Destructor.*/
@@ -43,13 +40,6 @@ GLViewer_ViewManager::~GLViewer_ViewManager()
 {
 }
 
-/*!Sets view name for view window \a theView.*/
-void GLViewer_ViewManager::setViewName(SUIT_ViewWindow* theView)
-{
-    int aPos = myViews.find(theView);
-    theView->setCaption( QString( "GL scene:%1 - viewer:%2" ).arg(myId).arg(aPos+1));
-}
-
 /*!Context menu popup for \a popup.*/
 void GLViewer_ViewManager::contextMenuPopup( QPopupMenu* popup )
 {
index cfc25f1f97084821e022a317a2445a80aa9775a3..3542d63f35cf876df4333af606660068c24c13ec 100644 (file)
@@ -36,18 +36,11 @@ class GLVIEWER_API GLViewer_ViewManager : public SUIT_ViewManager
   Q_OBJECT
 public:
     GLViewer_ViewManager( SUIT_Study* theStudy, SUIT_Desktop* theDesktop );
-    ~GLViewer_ViewManager();
+    virtual ~GLViewer_ViewManager();
 
     GLViewer_Viewer* getGLViewer() { return (GLViewer_Viewer*) myViewModel; }
 
     virtual void     contextMenuPopup( QPopupMenu* );
-
-protected:
-    void         setViewName(SUIT_ViewWindow* theView);
-
-protected:
-    static  int  myMaxId;
-    int          myId;
 };
 
 #endif // GLVIEWER_VIEWMANAGER_H