]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Naming of the views for VTK and OCC viewers
authorstv <stv@opencascade.com>
Wed, 1 Jun 2005 05:00:58 +0000 (05:00 +0000)
committerstv <stv@opencascade.com>
Wed, 1 Jun 2005 05:00:58 +0000 (05:00 +0000)
src/OCCViewer/OCCViewer_ViewManager.cxx
src/OCCViewer/resources/OCCViewer_msg_en.po
src/VTKViewer/VTKViewer_ViewManager.cxx
src/VTKViewer/VTKViewer_ViewManager.h
src/VTKViewer/resources/VTKViewer_msg_en.po

index 017d9d78166b90fa560c17ce26d12c2122a059c4..3ceca090ca4f97503e60234effdad038a1c2e884 100755 (executable)
@@ -21,7 +21,7 @@ OCCViewer_ViewManager::~OCCViewer_ViewManager()
 void OCCViewer_ViewManager::setViewName(SUIT_ViewWindow* theView)
 {
   int aPos = myViews.find(theView);
-  theView->setCaption( QString( "OCC scene:%1 - viewer:%2" ).arg(myId).arg(aPos+1));
+  theView->setCaption( tr( "OCC_VIEW_TITLE" ).arg( myId ).arg( aPos + 1 ) );
 }
 
 //***************************************************************/
index c13b221b6509665fdaa5010151e4a7c8f3b1db95..a7ecd85c94e02015fcf926c41d0e844cf3d37ea3 100755 (executable)
@@ -163,3 +163,6 @@ msgstr "Error"
 
 msgid "BUT_OK"
 msgstr "Ok"
+
+msgid "OCCViewer_ViewManager::OCC_VIEW_TITLE"
+msgstr "OCC scene:%1 - viewer:%2"
index e15286f87088bdb061a499cadbce4bea11319896..67c2eb293e724bd636c1b5506f23439b2d066e7f 100755 (executable)
@@ -1,10 +1,13 @@
 #include "VTKViewer_ViewManager.h"
 #include "VTKViewer_ViewModel.h"
 
+int VTKViewer_ViewManager::_VTKViewMgr_Id = 0;
+
 //***************************************************************
 VTKViewer_ViewManager::VTKViewer_ViewManager( SUIT_Study* study, SUIT_Desktop* theDesktop ) 
 : SUIT_ViewManager( study, theDesktop )
 {
+  myId = ++_VTKViewMgr_Id;
   setViewModel( new VTKViewer_Viewer() );
 }
 
@@ -17,5 +20,5 @@ VTKViewer_ViewManager::~VTKViewer_ViewManager()
 void VTKViewer_ViewManager::setViewName(SUIT_ViewWindow* theView)
 {
   int aPos = myViews.find(theView);
-  theView->setCaption( QString( "VTK viewer:%1" ).arg(aPos+1));
+  theView->setCaption( tr( "VTK_VIEW_TITLE" ).arg( myId ).arg( aPos + 1 ) );
 }
index bb99895f8ec6442a7f3572e0cd50955f6d2d19ec..82df22c15055c5cc52752359c4b90f12c30d24d3 100755 (executable)
@@ -17,6 +17,10 @@ public:
 
 protected:
   void setViewName( SUIT_ViewWindow* theView );
+
+private:
+  int               myId;
+  static  int       _VTKViewMgr_Id;
 };
 
 #endif
index 23da3b43b7daec3fae8df3b5f1b22db4eaa62fdf..a11813293748c69fa06d310f54242bf99a904314 100755 (executable)
@@ -142,3 +142,6 @@ msgstr "Show toolbar"
 
 msgid "VTKViewer_Viewer::MEN_CHANGE_BACKGROUD"
 msgstr "Change background..."
+
+msgid "VTKViewer_ViewManager::VTK_VIEW_TITLE"
+msgstr "VTK scene:%1 - viewer:%2"