+// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// 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.salome-platform.org/
+//
#include "SMESHGUI_EditMeshDlg.h"
#include "SUIT_Desktop.h"
#include "SUIT_Session.h"
+#include "SUIT_MessageBox.h"
+
+#include "LightApp_Application.h"
#include "SALOME_ListIO.hxx"
GroupButtonsLayout->setAlignment(Qt::AlignTop);
GroupButtonsLayout->setSpacing(6);
GroupButtonsLayout->setMargin(11);
+ buttonHelp = new QPushButton(GroupButtons, "buttonHelp");
+ buttonHelp->setText(tr("SMESH_BUT_HELP" ));
+ buttonHelp->setAutoDefault(TRUE);
+ GroupButtonsLayout->addWidget(buttonHelp, 0, 4);
buttonCancel = new QPushButton (GroupButtons, "buttonCancel");
buttonCancel->setText(tr("SMESH_BUT_CLOSE" ));
buttonCancel->setAutoDefault(TRUE);
GroupMeshLayout->addWidget(LineEditMesh, 0, 2);
DlgLayout->addWidget(GroupMesh, 1, 0);
+ myHelpFileName = "merge_elements.htm";
+
Init(); // Initialisations
}
connect(buttonOk , SIGNAL(clicked()), this, SLOT(ClickOnOk()));
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
connect(buttonApply , SIGNAL(clicked()), this, SLOT(ClickOnApply()));
+ connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
connect(SelectButton, SIGNAL(clicked()), this, SLOT(SelectionIntoArgument()));
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()) , this, SLOT(ClickOnCancel()));
- // Move widget on the bottom right corner of main widget
- int x, y;
- mySMESHGUI->DefineDlgPosition(this, x, y);
- this->move(x, y);
this->show(); // displays Dialog
LineEditMesh->setFocus();
reject();
}
+//=================================================================================
+// function : ClickOnHelp()
+// purpose :
+//=================================================================================
+void SMESHGUI_EditMeshDlg::ClickOnHelp()
+{
+ 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"));
+ }
+}
+
//=================================================================================
// function : SelectionIntoArgument()
// purpose : Called when selection as changed or other case