From: mkr Date: Thu, 23 Mar 2006 15:11:52 +0000 (+0000) Subject: Add function for help context module. X-Git-Tag: for_sharm~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=aa3e439b33682dc9fc1a604e4522cd44b75312d0;p=modules%2Fgui.git Add function for help context module. --- diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 799db0056..2d44578c7 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -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() { diff --git a/src/LightApp/LightApp_Application.h b/src/LightApp/LightApp_Application.h index a85a2e7cf..3f57fd09e 100644 --- a/src/LightApp/LightApp_Application.h +++ b/src/LightApp/LightApp_Application.h @@ -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();