From: stv Date: Mon, 25 Sep 2006 06:37:23 +0000 (+0000) Subject: Identificator assignment moved on the base level - SUIT_ViewManager. Useless id's... X-Git-Tag: For_CTH_V1_2a~16 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=12429924acc73c11f0942a6036fb96c78726ed9d;p=modules%2Fgui.git Identificator assignment moved on the base level - SUIT_ViewManager. Useless id's removed from inherit classes. 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. --- diff --git a/src/GLViewer/GLViewer_ViewManager.cxx b/src/GLViewer/GLViewer_ViewManager.cxx index b9cbff5ae..8e1f1e860 100644 --- a/src/GLViewer/GLViewer_ViewManager.cxx +++ b/src/GLViewer/GLViewer_ViewManager.cxx @@ -28,14 +28,11 @@ #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 ) { diff --git a/src/GLViewer/GLViewer_ViewManager.h b/src/GLViewer/GLViewer_ViewManager.h index cfc25f1f9..3542d63f3 100644 --- a/src/GLViewer/GLViewer_ViewManager.h +++ b/src/GLViewer/GLViewer_ViewManager.h @@ -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