X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_FilterLibraryDlg.cxx;h=a131436a92f11e5bdb75f40e98ce168b60a6ec7b;hp=75b97b4c6819313313dfcee59ba6936ea3feb996;hb=c63ee099ad2b149bd70136839c973e8910137bc5;hpb=4ff5bd61540272713e48de1eee75625028c32155 diff --git a/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx b/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx index 75b97b4c6..a131436a9 100644 --- a/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx @@ -17,7 +17,7 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // // @@ -34,6 +34,9 @@ #include "SUIT_Session.h" #include "SUIT_Desktop.h" #include "SUIT_FileDlg.h" +#include "SUIT_MessageBox.h" + +#include "LightApp_Application.h" // QT Includes #include @@ -99,7 +102,7 @@ SMESHGUI_FilterLibraryDlg::SMESHGUI_FilterLibraryDlg (SMESHGUI* theModule, const QValueList& theTypes, const int theMode, const char* theName) - : QDialog( parent, theName, true, WStyle_Customize | + : QDialog( parent, theName, false, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ), mySMESHGUI( theModule ) { @@ -144,6 +147,8 @@ void SMESHGUI_FilterLibraryDlg::construct (const QValueList& theTypes, aDlgLay->setStretchFactor(myMainFrame, 1); + myHelpFileName = "selection_filter_library.htm"; + Init(myTypes, myMode); } @@ -244,11 +249,13 @@ QFrame* SMESHGUI_FilterLibraryDlg::createButtonFrame (QWidget* theParent) myButtons[ BTN_Cancel ] = new QPushButton(tr("SMESH_BUT_CANCEL"), aGrp); myButtons[ BTN_Close ] = new QPushButton(tr("SMESH_BUT_CLOSE"), aGrp); + myButtons[ BTN_Help ] = new QPushButton(tr("SMESH_BUT_HELP"), aGrp); connect(myButtons[ BTN_OK ], SIGNAL(clicked()), SLOT(onOk())); connect(myButtons[ BTN_Cancel ], SIGNAL(clicked()), SLOT(onClose())); connect(myButtons[ BTN_Close ], SIGNAL(clicked()), SLOT(onClose())); connect(myButtons[ BTN_Apply ], SIGNAL(clicked()), SLOT(onApply())); + connect(myButtons[ BTN_Help ], SIGNAL(clicked()), SLOT(onHelp())); QMap::iterator anIter; for (anIter = myButtons.begin(); anIter != myButtons.end(); ++anIter) @@ -461,6 +468,23 @@ void SMESHGUI_FilterLibraryDlg::onClose() reject(); } +//================================================================================= +// function : onHelp() +// purpose : +//================================================================================= +void SMESHGUI_FilterLibraryDlg::onHelp() +{ + LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication()); + if (app) + app->onHelpContextModule(mySMESHGUI ? app->moduleName(mySMESHGUI->moduleName()) : QString(""), myHelpFileName); + else { + SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"), + QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE"). + arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(myHelpFileName), + QObject::tr("BUT_OK")); + } +} + //======================================================================= // name : SMESHGUI_FilterLibraryDlg::onDeactivate // Purpose : SLOT called when dialog must be deativated