X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_Preferences_ScalarBarDlg.cxx;h=b30ce298275912c493753ee7e6dc70a494701d4c;hb=c5e983833f160443bd4ac2bbf2082b64e3458a13;hp=5b4cbd873528903e6f7e101fb60363d95b6f3ecf;hpb=d303154d91eb916a55ac93a372cbdb918aa18d14;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_Preferences_ScalarBarDlg.cxx b/src/SMESHGUI/SMESHGUI_Preferences_ScalarBarDlg.cxx index 5b4cbd873..b30ce2982 100644 --- a/src/SMESHGUI/SMESHGUI_Preferences_ScalarBarDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_Preferences_ScalarBarDlg.cxx @@ -35,7 +35,10 @@ // SALOME GUI includes #include #include +#include +#include +#include #include #include @@ -272,12 +275,14 @@ SMESHGUI_Preferences_ScalarBarDlg::SMESHGUI_Preferences_ScalarBarDlg( SMESHGUI* QHBoxLayout* myButtonGrpLayout = new QHBoxLayout( myButtonGrp ); myButtonGrpLayout->setSpacing( SPACING_SIZE ); myButtonGrpLayout->setMargin( MARGIN_SIZE ); - myOkBtn = new QPushButton( tr( "SMESH_BUT_OK" ), myButtonGrp ); + myOkBtn = new QPushButton( tr( "SMESH_BUT_APPLY_AND_CLOSE" ), myButtonGrp ); myOkBtn->setAutoDefault( true ); myOkBtn->setDefault( true ); myApplyBtn = new QPushButton( tr( "SMESH_BUT_APPLY" ), myButtonGrp ); myApplyBtn->setAutoDefault( true ); myCancelBtn = new QPushButton( tr( "SMESH_BUT_CLOSE" ), myButtonGrp ); myCancelBtn->setAutoDefault( true ); + myHelpBtn = new QPushButton( tr("SMESH_BUT_HELP"), myButtonGrp ); + myHelpBtn->setAutoDefault(true); myButtonGrpLayout->addWidget( myOkBtn ); myButtonGrpLayout->addSpacing( 10 ); @@ -285,6 +290,7 @@ SMESHGUI_Preferences_ScalarBarDlg::SMESHGUI_Preferences_ScalarBarDlg( SMESHGUI* myButtonGrpLayout->addSpacing( 10 ); myButtonGrpLayout->addStretch(); myButtonGrpLayout->addWidget( myCancelBtn ); + myButtonGrpLayout->addWidget( myHelpBtn ); aTopLayout->addWidget( myButtonGrp ); @@ -367,11 +373,14 @@ SMESHGUI_Preferences_ScalarBarDlg::SMESHGUI_Preferences_ScalarBarDlg( SMESHGUI* connect( myOkBtn, SIGNAL( clicked() ), this, SLOT( onOk() ) ); connect( myApplyBtn, SIGNAL( clicked() ), this, SLOT( onApply() ) ); connect( myCancelBtn, SIGNAL( clicked() ), this, SLOT( onCancel() ) ); + connect( myHelpBtn, SIGNAL(clicked()), this, SLOT( onHelp() ) ); connect( myXSpin, SIGNAL( valueChanged( double ) ), this, SLOT( onXYChanged() ) ); connect( myYSpin, SIGNAL( valueChanged( double ) ), this, SLOT( onXYChanged() ) ); connect( aOrientationGrp, SIGNAL( buttonClicked( int ) ), this, SLOT( onOrientationChanged() ) ); connect( mySelectionMgr, SIGNAL( currentSelectionChanged() ), this, SLOT( onSelectionChanged() ) ); connect( mySMESHGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( onCancel() ) ); + + myHelpFileName = "about_quality_controls_page.html"; } //================================================================================================= @@ -475,6 +484,33 @@ void SMESHGUI_Preferences_ScalarBarDlg::onCancel() close(); } +//================================================================================================= +/*! + * SMESHGUI_Preferences_ScalarBarDlg::onHelp + * + * Help button slot + */ +//================================================================================================= +void SMESHGUI_Preferences_ScalarBarDlg::onHelp() +{ + LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication()); + if (app) + app->onHelpContextModule(mySMESHGUI ? app->moduleName(mySMESHGUI->moduleName()) : QString(""), myHelpFileName); + else { + QString platform; +#ifdef WIN32 + platform = "winapplication"; +#else + platform = "application"; +#endif + SUIT_MessageBox::warning(this, tr("WRN_WARNING"), + tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE"). + arg(app->resourceMgr()->stringValue("ExternalBrowser", + platform)). + arg(myHelpFileName)); + } +} + //================================================================================================= /*! * SMESHGUI_Preferences_ScalarBarDlg::onSelectionChanged