]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
NPAL14863: update object browser outside from SALOME in the batch mode
authorvsr <vsr@opencascade.com>
Wed, 21 Feb 2007 09:58:24 +0000 (09:58 +0000)
committervsr <vsr@opencascade.com>
Wed, 21 Feb 2007 09:58:24 +0000 (09:58 +0000)
src/SalomeApp/SalomeApp_Application.cxx
src/SalomeApp/SalomeApp_Application.h

index 85b8697e5a5ca358c16d9fdedab2293096b24a36..eea9a19a095d3a1f3f99b219f49560b7a0e2d216 100644 (file)
@@ -134,7 +134,10 @@ extern "C" SALOMEAPP_EXPORT SUIT_Application* createApplication()
 /*!Constructor.*/
 SalomeApp_Application::SalomeApp_Application()
 : LightApp_Application()
-{}
+{
+  connect( desktop(), SIGNAL( message( const QString& ) ), 
+          this,      SLOT( onDesktopMessage( const QString& ) ) );
+}
 
 /*!Destructor.
  *\li Destroy event filter.
@@ -1229,3 +1232,13 @@ bool SalomeApp_Application::checkDataObject(LightApp_DataObject* theObj)
 
   return false;
 }
+
+/*! Process standard messages from desktop */
+void SalomeApp_Application::onDesktopMessage( const QString& message )
+{
+  // update object browser
+  if ( message.lower() == "updateobjectbrowser" || 
+       message.lower() == "updateobjbrowser" )
+    updateObjectBrowser();
+}
+
index 507c872fffa4b0fc78fc0771a717aaff64409ab0..09ece677d64a0f4906e35435e86f622d0e87ed3c 100644 (file)
@@ -106,6 +106,7 @@ public slots:
 protected slots:
   void                                onStudySaved( SUIT_Study* );
   void                                onStudyOpened( SUIT_Study* );
+  void                                onDesktopMessage( const QString& );
 
 protected:
   virtual void                        createActions();