X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOMToolsGUI%2FGEOMToolsGUI_NbIsosDlg.cxx;fp=src%2FGEOMToolsGUI%2FGEOMToolsGUI_NbIsosDlg.cxx;h=11a44623c0e4b3077034cedd3b4107bf7654e49e;hb=e180c20f73ffa96c2d039106f2a2a868c8bc0df1;hp=0a661489480e26f8ecfb97c8c60a49122210533a;hpb=97f4b51b6a57fcba4089840621ebb79dfcec3b28;p=modules%2Fgeom.git diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.cxx index 0a6614894..11a44623c 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.cxx @@ -28,6 +28,10 @@ #include "GEOMToolsGUI_NbIsosDlg.h" +#include "GeometryGUI.h" +#include +#include +#include #include #include @@ -104,22 +108,28 @@ GEOMToolsGUI_NbIsosDlg::GEOMToolsGUI_NbIsosDlg(QWidget* parent ) QPushButton* buttonCancel = new QPushButton( GroupButtons, "buttonCancel" ); buttonCancel->setText( tr( "GEOM_BUT_CANCEL" ) ) ; buttonCancel->setAutoDefault( TRUE ); - GroupButtonsLayout->addWidget( buttonCancel, 0, 2 ); + GroupButtonsLayout->addWidget( buttonCancel, 0, 1 ); + + QPushButton* buttonHelp = new QPushButton( GroupButtons, "buttonHelp" ); + buttonHelp->setText( tr( "GEOM_BUT_HELP" ) ) ; + buttonHelp->setAutoDefault( TRUE ); + GroupButtonsLayout->addWidget( buttonHelp, 0, 2 ); /***************************************************************/ MyDialogLayout->addWidget(GroupC1, 0, 0); MyDialogLayout->addWidget(GroupButtons, 1, 0); - + + myHelpFileName = "isos.htm"; // signals and slots connections connect(buttonOk, SIGNAL(clicked()), this, SLOT(accept())); connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject())); + connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp())); /* Move widget on the botton right corner of main widget */ SUIT_Tools::centerWidget(this, parent); } - //================================================================================= // function : ~GEOMToolsGUI_NbIsosDlg() // purpose : Destroys the object and frees any allocated resources @@ -149,3 +159,21 @@ void GEOMToolsGUI_NbIsosDlg::setV( const int v ) SpinBoxV->setValue( v ); } +//================================================================================= +// function : ClickOnHelp() +// purpose : +//================================================================================= +void GEOMToolsGUI_NbIsosDlg::ClickOnHelp() +{ + LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication()); + if (app) { + GeometryGUI* aGeomGUI = dynamic_cast( app->module( "Geometry" ) ); + app->onHelpContextModule(aGeomGUI ? app->moduleName(aGeomGUI->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")); + } +}