From 8850d1517703a31ee4a08c1f97fa121228a06db8 Mon Sep 17 00:00:00 2001 From: stv Date: Wed, 1 Jun 2005 05:00:58 +0000 Subject: [PATCH] Naming of the views for VTK and OCC viewers --- src/OCCViewer/OCCViewer_ViewManager.cxx | 2 +- src/OCCViewer/resources/OCCViewer_msg_en.po | 3 +++ src/VTKViewer/VTKViewer_ViewManager.cxx | 5 ++++- src/VTKViewer/VTKViewer_ViewManager.h | 4 ++++ src/VTKViewer/resources/VTKViewer_msg_en.po | 3 +++ 5 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/OCCViewer/OCCViewer_ViewManager.cxx b/src/OCCViewer/OCCViewer_ViewManager.cxx index 017d9d781..3ceca090c 100755 --- a/src/OCCViewer/OCCViewer_ViewManager.cxx +++ b/src/OCCViewer/OCCViewer_ViewManager.cxx @@ -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 ) ); } //***************************************************************/ diff --git a/src/OCCViewer/resources/OCCViewer_msg_en.po b/src/OCCViewer/resources/OCCViewer_msg_en.po index c13b221b6..a7ecd85c9 100755 --- a/src/OCCViewer/resources/OCCViewer_msg_en.po +++ b/src/OCCViewer/resources/OCCViewer_msg_en.po @@ -163,3 +163,6 @@ msgstr "Error" msgid "BUT_OK" msgstr "Ok" + +msgid "OCCViewer_ViewManager::OCC_VIEW_TITLE" +msgstr "OCC scene:%1 - viewer:%2" diff --git a/src/VTKViewer/VTKViewer_ViewManager.cxx b/src/VTKViewer/VTKViewer_ViewManager.cxx index e15286f87..67c2eb293 100755 --- a/src/VTKViewer/VTKViewer_ViewManager.cxx +++ b/src/VTKViewer/VTKViewer_ViewManager.cxx @@ -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 ) ); } diff --git a/src/VTKViewer/VTKViewer_ViewManager.h b/src/VTKViewer/VTKViewer_ViewManager.h index bb99895f8..82df22c15 100755 --- a/src/VTKViewer/VTKViewer_ViewManager.h +++ b/src/VTKViewer/VTKViewer_ViewManager.h @@ -17,6 +17,10 @@ public: protected: void setViewName( SUIT_ViewWindow* theView ); + +private: + int myId; + static int _VTKViewMgr_Id; }; #endif diff --git a/src/VTKViewer/resources/VTKViewer_msg_en.po b/src/VTKViewer/resources/VTKViewer_msg_en.po index 23da3b43b..a11813293 100755 --- a/src/VTKViewer/resources/VTKViewer_msg_en.po +++ b/src/VTKViewer/resources/VTKViewer_msg_en.po @@ -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" -- 2.39.2