]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Add function for help context module.
authormkr <mkr@opencascade.com>
Thu, 23 Mar 2006 15:11:52 +0000 (15:11 +0000)
committermkr <mkr@opencascade.com>
Thu, 23 Mar 2006 15:11:52 +0000 (15:11 +0000)
src/LightApp/LightApp_Application.cxx
src/LightApp/LightApp_Application.h

index 799db0056135ca646975d9c473ca1b7e5a924661..2d44578c7dd73c9cc02f680b48ae2ca919bbca5f 100644 (file)
@@ -892,6 +892,31 @@ void LightApp_Application::onHelpContentsModule()
   }
 }
 
+//=======================================================================
+// name    : onHelpContextModule
+/*! Purpose : SLOT. Display help contents for choosen dialog*/
+//=======================================================================
+void LightApp_Application::onHelpContextModule(const QString& theComponentName, const QString& theFileName)
+{
+  QCString dir = getenv( theComponentName + "_ROOT_DIR");
+  QString homeDir = Qtx::addSlash(Qtx::addSlash(dir)+Qtx::addSlash("doc")+Qtx::addSlash("salome")+Qtx::addSlash("gui")+Qtx::addSlash(theComponentName));
+
+  QString helpFile = QFileInfo( homeDir + theFileName ).absFilePath();
+  SUIT_ResourceMgr* resMgr = resourceMgr();
+  QString anApp = resMgr->stringValue("ExternalBrowser", "application");
+  QString aParams = resMgr->stringValue("ExternalBrowser", "parameters");
+
+  if (!anApp.isEmpty()) {
+    RunBrowser* rs = new RunBrowser(anApp, aParams, helpFile);
+    rs->start();
+  }
+  else {
+    SUIT_MessageBox::warn1(desktop(), tr("WRN_WARNING"), 
+                          tr("DEFINE_EXTERNAL_BROWSER"), 
+                          tr("BUT_OK"));
+  }
+}
+
 /*!Sets enable or disable some actions on selection changed.*/
 void LightApp_Application::onSelectionChanged()
 {
index a85a2e7cf57eda04fb4ac9bcf18a5572075c3276..3f57fd09edaebc9e4e83e50a01a82a1dac10573d 100644 (file)
@@ -136,6 +136,7 @@ signals:
 
 public slots:
   virtual void                        onHelpContentsModule();
+  virtual void                        onHelpContextModule( const QString&, const QString& );
   virtual void                        onNewDoc();
   virtual void                        onOpenDoc();
   virtual void                        onHelpAbout();