From: asv Date: Fri, 17 Jun 2005 12:28:39 +0000 (+0000) Subject: added menu item "refresh" and slot onRefresh(). X-Git-Tag: T3_0_0_a4~82 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a494435bb013174828367a5e759ff5afd7365307;p=modules%2Fgui.git added menu item "refresh" and slot onRefresh(). --- diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index d9b61e94e..817bc404b 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -528,7 +528,7 @@ void SalomeApp_Application::onSelectionChanged() } -void SalomeApp_Application::onAboutRefresh() +void SalomeApp_Application::onRefresh() { for ( ModuleListIterator it = modules(); it.current(); ++it ) { @@ -536,6 +536,7 @@ void SalomeApp_Application::onAboutRefresh() if ( camDM && camDM->inherits( "SalomeApp_DataModel" ) ) ((SalomeApp_DataModel*)camDM)->update(); } + objectBrowser()->updateTree(); } void SalomeApp_Application::setActiveStudy( SUIT_Study* study ) @@ -944,7 +945,6 @@ QWidget* SalomeApp_Application::createWindow( const int flag ) wid = ob; - connect( ob, SIGNAL( aboutRefresh() ), this, SLOT( onAboutRefresh() ) ); ob->connectPopupRequest( this, SLOT( onConnectPopupRequest( SUIT_PopupClient*, QContextMenuEvent* ) ) ); } else if ( flag == WT_PyConsole ) @@ -1186,3 +1186,11 @@ QString SalomeApp_Application::getFileName( bool open, const QString& initial, c QStringList fls = QStringList::split( ";", filters, false ); return SUIT_FileDlg::getFileName( parent, initial, fls, caption, open, true ); } + +void SalomeApp_Application::contextMenuPopup( const QString& type, QPopupMenu* thePopup, QString& title ) +{ + CAM_Application::contextMenuPopup( type, thePopup, title ); + thePopup->insertSeparator(); + thePopup->insertItem( tr( "MEN_REFRESH" ), this, SLOT( onRefresh() ) ); +} + diff --git a/src/SalomeApp/SalomeApp_Application.h b/src/SalomeApp/SalomeApp_Application.h index adb93cb4e..66f10f1d8 100644 --- a/src/SalomeApp/SalomeApp_Application.h +++ b/src/SalomeApp/SalomeApp_Application.h @@ -92,6 +92,8 @@ public: virtual void start(); + virtual void contextMenuPopup( const QString&, QPopupMenu*, QString& ); + static CORBA::ORB_var orb(); static SALOMEDSClient_StudyManager* studyMgr(); static SALOME_NamingService* namingService(); @@ -110,7 +112,7 @@ public slots: private slots: void onSelection(); - void onAboutRefresh(); + void onRefresh(); protected: virtual void createActions(); diff --git a/src/SalomeApp/resources/SalomeApp_msg_en.po b/src/SalomeApp/resources/SalomeApp_msg_en.po index eca1a8dc8..8a349ab71 100644 --- a/src/SalomeApp/resources/SalomeApp_msg_en.po +++ b/src/SalomeApp/resources/SalomeApp_msg_en.po @@ -201,3 +201,5 @@ msgstr "MODIFIED" msgid "PRP_MODIFICATIONS" msgstr "Modifications" +msgid "MEN_REFRESH" +msgstr "Refresh"