Salome HOME
1) Add references into SMESH dialogs to the corresponding help pages from GUI documen...
authormkr <mkr@opencascade.com>
Fri, 24 Mar 2006 14:10:23 +0000 (14:10 +0000)
committermkr <mkr@opencascade.com>
Fri, 24 Mar 2006 14:10:23 +0000 (14:10 +0000)
2) Remove unused classes.

79 files changed:
src/SMESHGUI/Makefile.in
src/SMESHGUI/SMESHGUI.cxx
src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx
src/SMESHGUI/SMESHGUI_AddMeshElementDlg.h
src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx
src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.h
src/SMESHGUI/SMESHGUI_ClippingDlg.cxx
src/SMESHGUI/SMESHGUI_ClippingDlg.h
src/SMESHGUI/SMESHGUI_CreateHypothesesDlg.cxx [deleted file]
src/SMESHGUI/SMESHGUI_CreateHypothesesDlg.h [deleted file]
src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx
src/SMESHGUI/SMESHGUI_CreatePatternDlg.h
src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx
src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.h
src/SMESHGUI/SMESHGUI_DeleteGroupDlg.cxx
src/SMESHGUI/SMESHGUI_DeleteGroupDlg.h
src/SMESHGUI/SMESHGUI_Dialog.h
src/SMESHGUI/SMESHGUI_EditHypothesesDlg.cxx [deleted file]
src/SMESHGUI/SMESHGUI_EditHypothesesDlg.h [deleted file]
src/SMESHGUI/SMESHGUI_EditMeshDlg.cxx
src/SMESHGUI/SMESHGUI_EditMeshDlg.h
src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx
src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.h
src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx
src/SMESHGUI/SMESHGUI_ExtrusionDlg.h
src/SMESHGUI/SMESHGUI_FilterDlg.cxx
src/SMESHGUI/SMESHGUI_FilterDlg.h
src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx
src/SMESHGUI/SMESHGUI_FilterLibraryDlg.h
src/SMESHGUI/SMESHGUI_GroupDlg.cxx
src/SMESHGUI/SMESHGUI_GroupDlg.h
src/SMESHGUI/SMESHGUI_GroupOpDlg.cxx
src/SMESHGUI/SMESHGUI_GroupOpDlg.h
src/SMESHGUI/SMESHGUI_Hypotheses.cxx
src/SMESHGUI/SMESHGUI_Hypotheses.h
src/SMESHGUI/SMESHGUI_MergeNodesDlg.cxx
src/SMESHGUI/SMESHGUI_MergeNodesDlg.h
src/SMESHGUI/SMESHGUI_MeshInfosDlg.cxx
src/SMESHGUI/SMESHGUI_MeshInfosDlg.h
src/SMESHGUI/SMESHGUI_MeshOp.cxx
src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx
src/SMESHGUI/SMESHGUI_MeshPatternDlg.h
src/SMESHGUI/SMESHGUI_MoveNodesDlg.cxx
src/SMESHGUI/SMESHGUI_MoveNodesDlg.h
src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx
src/SMESHGUI/SMESHGUI_MultiEditDlg.h
src/SMESHGUI/SMESHGUI_NodesDlg.cxx
src/SMESHGUI/SMESHGUI_NodesDlg.h
src/SMESHGUI/SMESHGUI_Operation.cxx
src/SMESHGUI/SMESHGUI_Operation.h
src/SMESHGUI/SMESHGUI_PrecisionDlg.cxx [deleted file]
src/SMESHGUI/SMESHGUI_PrecisionDlg.h [deleted file]
src/SMESHGUI/SMESHGUI_RemoveElementsDlg.cxx
src/SMESHGUI/SMESHGUI_RemoveElementsDlg.h
src/SMESHGUI/SMESHGUI_RemoveNodesDlg.cxx
src/SMESHGUI/SMESHGUI_RemoveNodesDlg.h
src/SMESHGUI/SMESHGUI_RenumberingDlg.cxx
src/SMESHGUI/SMESHGUI_RenumberingDlg.h
src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx
src/SMESHGUI/SMESHGUI_RevolutionDlg.h
src/SMESHGUI/SMESHGUI_RotationDlg.cxx
src/SMESHGUI/SMESHGUI_RotationDlg.h
src/SMESHGUI/SMESHGUI_Selection.cxx
src/SMESHGUI/SMESHGUI_SewingDlg.cxx
src/SMESHGUI/SMESHGUI_SewingDlg.h
src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx
src/SMESHGUI/SMESHGUI_SingleEditDlg.h
src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx
src/SMESHGUI/SMESHGUI_SmoothingDlg.h
src/SMESHGUI/SMESHGUI_StandardMeshInfosDlg.cxx
src/SMESHGUI/SMESHGUI_StandardMeshInfosDlg.h
src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx
src/SMESHGUI/SMESHGUI_SymmetryDlg.h
src/SMESHGUI/SMESHGUI_TranslationDlg.cxx
src/SMESHGUI/SMESHGUI_TranslationDlg.h
src/SMESHGUI/SMESHGUI_TransparencyDlg.cxx
src/SMESHGUI/SMESHGUI_TransparencyDlg.h
src/SMESHGUI/SMESHGUI_XmlHandler.h
src/SMESHGUI/SMESH_msg_en.po

index 0ec4d156919457ca105883d8d654b72608cfb8e0..b8edde8721f1acf69e0b58d191cf85a97aa204cf 100644 (file)
@@ -70,8 +70,6 @@ LIB_SRC =     SMESHGUI.cxx \
                SMESHGUI_Swig.cxx \
                SMESHGUI_MoveNodesDlg.cxx \
                SMESHGUI_AddMeshElementDlg.cxx \
-               SMESHGUI_EditHypothesesDlg.cxx \
-               SMESHGUI_CreateHypothesesDlg.cxx \
                SMESHGUI_XmlHandler.cxx \
                SMESHGUI_Filter.cxx \
                SMESHGUI_FilterDlg.cxx \
@@ -98,7 +96,6 @@ LIB_SRC =     SMESHGUI.cxx \
                SMESHGUI_FilterUtils.cxx \
                SMESHGUI_PatternUtils.cxx \
                SMESHGUI_HypothesesUtils.cxx \
-               SMESHGUI_PrecisionDlg.cxx \
                SMESHGUI_VTKUtils.cxx \
                SMESHGUI_Selection.cxx \
                SMESHGUI_CreatePolyhedralVolumeDlg.cxx \
@@ -131,8 +128,6 @@ LIB_MOC = \
                SMESHGUI_Preferences_SelectionDlg.h \
                SMESHGUI_MoveNodesDlg.h \
                SMESHGUI_AddMeshElementDlg.h \
-               SMESHGUI_EditHypothesesDlg.h \
-               SMESHGUI_CreateHypothesesDlg.h \
                SMESHGUI_FilterDlg.h \
                SMESHGUI_FilterLibraryDlg.h \
                SMESHGUI_SingleEditDlg.h \
@@ -148,7 +143,6 @@ LIB_MOC = \
                SMESHGUI_TranslationDlg.h \
                SMESHGUI_SymmetryDlg.h \
                SMESHGUI_SewingDlg.h \
-               SMESHGUI_PrecisionDlg.h \
                SMESHGUI_MergeNodesDlg.h \
                SMESHGUI_EditMeshDlg.h \
                SMESHGUI_CreatePolyhedralVolumeDlg.h \
index d8a9c1cd620428a2b259eb6e60b12b66b0c65c2a..d4ac0bd64854e014fe528be7e830c6bf5ac3633f 100644 (file)
@@ -42,8 +42,6 @@
 #include "SMESHGUI_MoveNodesDlg.h"
 #include "SMESHGUI_AddMeshElementDlg.h"
 #include "SMESHGUI_AddQuadraticElementDlg.h"
-#include "SMESHGUI_EditHypothesesDlg.h"
-#include "SMESHGUI_CreateHypothesesDlg.h"
 #include "SMESHGUI_FilterDlg.h"
 #include "SMESHGUI_FilterLibraryDlg.h"
 #include "SMESHGUI_SingleEditDlg.h"
@@ -62,7 +60,6 @@
 #include "SMESHGUI_MergeNodesDlg.h"
 #include "SMESHGUI_EditMeshDlg.h"
 #include "SMESHGUI_MeshPatternDlg.h"
-#include "SMESHGUI_PrecisionDlg.h"
 #include "SMESHGUI_Selection.h"
 #include "SMESHGUI_CreatePolyhedralVolumeDlg.h"
 #include "SMESHGUI_MeshOp.h"
index 09b12806c5742963971be5b342a64e0f830bfb44..94878a048f92511179a948f96314882921241737 100644 (file)
@@ -39,6 +39,7 @@
 #include "SMESH_Actor.h"
 
 #include "SUIT_Session.h"
+#include "SUIT_MessageBox.h"
 
 #include "SVTK_Selection.h"
 #include "SVTK_Selector.h"
@@ -243,20 +244,34 @@ SMESHGUI_AddMeshElementDlg::SMESHGUI_AddMeshElementDlg( SMESHGUI* theModule,
   }
 
   QString elemName;
-  if (myNbNodes == 2)
+  if (myNbNodes == 2) {
     elemName = "EDGE";
-  else if (myNbNodes == 3)
+    myHelpFileName = "/files/adding_nodes_and_elements.htm#Adding_edges";
+  }
+  else if (myNbNodes == 3) {
     elemName = "TRIANGLE";
+    myHelpFileName = "/files/adding_nodes_and_elements.htm#Adding_triangles";
+  }
   else if (myNbNodes == 4)
-    if (myElementType == SMDSAbs_Face)
+    if (myElementType == SMDSAbs_Face) {
       elemName = "QUADRANGLE";
-    else
+      myHelpFileName = "/files/adding_nodes_and_elements.htm#Adding_quadrangles";
+    }
+    else {
       elemName = "TETRAS";
-  else if (myNbNodes == 8)
+      myHelpFileName = "/files/adding_nodes_and_elements.htm#Adding_tetrahedrons";
+    }
+  else if (myNbNodes == 8) {
     elemName = "HEXAS";
-  else if (myElementType == SMDSAbs_Face){
+    myHelpFileName = "/files/adding_nodes_and_elements.htm#Adding_hexahedrons";
+  }
+  else if (myElementType == SMDSAbs_Face) {
     elemName = "POLYGON";
     myIsPoly = true;
+    myHelpFileName = "/files/adding_nodes_and_elements.htm#Adding_polygons";
+  }
+  else if (myElementType == SMDSAbs_Volume) {
+    myHelpFileName = "/files/adding_nodes_and_elements.htm#Adding_polyhedrons";
   }
   
   QString iconName      = tr(QString("ICON_DLG_%1").arg(elemName));
@@ -326,6 +341,11 @@ SMESHGUI_AddMeshElementDlg::SMESHGUI_AddMeshElementDlg( SMESHGUI* theModule,
   buttonOk->setAutoDefault(TRUE);
   buttonOk->setDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonOk, 0, 0);
+  buttonHelp = new QPushButton(GroupButtons, "buttonHelp");
+  buttonHelp->setText(tr("SMESH_BUT_HELP" ));
+  buttonHelp->setAutoDefault(TRUE);
+  GroupButtonsLayout->addWidget(buttonHelp, 0, 4);
+
   SMESHGUI_AddMeshElementDlgLayout->addWidget(GroupButtons, 2, 0);
 
   /***************************************************************/
@@ -400,6 +420,7 @@ void SMESHGUI_AddMeshElementDlg::Init()
   connect(buttonOk, SIGNAL(clicked()),     SLOT(ClickOnOk()));
   connect(buttonCancel, SIGNAL(clicked()), SLOT(ClickOnCancel()));
   connect(buttonApply, SIGNAL(clicked()),  SLOT(ClickOnApply()));
+  connect(buttonHelp, SIGNAL(clicked()),   SLOT(ClickOnHelp()));
 
   connect(SelectButtonC1A1, SIGNAL(clicked()), SLOT(SetEditCurrentArgument()));
   connect(LineEditC1A1, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
@@ -503,6 +524,23 @@ void SMESHGUI_AddMeshElementDlg::ClickOnCancel()
   return;
 }
 
+//=================================================================================
+// function : ClickOnHelp()
+// purpose  :
+//=================================================================================
+void SMESHGUI_AddMeshElementDlg::ClickOnHelp()
+{
+  SalomeApp_Application* app = (SalomeApp_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 : onTextChange()
 // purpose  :
index 33f8a3d3ab6b745713a7febfda6f88bb980e802e..d91e8853bf9eb4e6ac4fe65516d4a12ebf928326 100644 (file)
@@ -106,6 +106,7 @@ private:
     QPushButton * buttonOk;
     QPushButton * buttonCancel;
     QPushButton * buttonApply;
+    QPushButton * buttonHelp;
     QGroupBox   * GroupC1;
     QLabel      * TextLabelC1A1;
     QPushButton * SelectButtonC1A1;
@@ -113,11 +114,14 @@ private:
 
     QCheckBox   * Reverse;
 
+    QString       myHelpFileName;
+
 private slots:
 
     void ClickOnOk();
     void ClickOnCancel();
     void ClickOnApply();
+    void ClickOnHelp();
     void SetEditCurrentArgument() ;
     void SelectionIntoArgument() ;
     void DeactivateActiveDialog() ;
index 7d692cfbcb5456a3808f035ec2c300ae269ccafe..f45e90b6c2c3cd956e116c93e742bcd8665c5d91 100644 (file)
@@ -11,6 +11,7 @@
 #include "SMESH_Actor.h"
 
 #include "SUIT_Session.h"
+#include "SUIT_MessageBox.h"
 
 #include "SVTK_Selection.h"
 #include "SVTK_Selector.h"
@@ -421,6 +422,10 @@ SMESHGUI_AddQuadraticElementDlg::SMESHGUI_AddQuadraticElementDlg( SMESHGUI* theM
   buttonOk->setAutoDefault(TRUE);
   buttonOk->setDefault(TRUE);
   aGroupButtonsLayout->addWidget(buttonOk, 0, 0);
+  buttonHelp = new QPushButton(GroupButtons, "buttonHelp");
+  buttonHelp->setText(tr("SMESH_BUT_HELP" ));
+  buttonHelp->setAutoDefault(TRUE);
+  aGroupButtonsLayout->addWidget(buttonHelp, 0, 4);
 
   aDialogLayout->addWidget(GroupButtons, 2, 0);
 
@@ -456,30 +461,37 @@ void SMESHGUI_AddQuadraticElementDlg::Init()
   case QUAD_EDGE:
     aNumRows = 1;
     myNbCorners = 2;
+    myHelpFileName = "/files/adding_nodes_and_elements.htm#?"; //Adding_edges
     break;
   case QUAD_TRIANGLE:
     aNumRows = 3;
     myNbCorners = 3;
+    myHelpFileName = "/files/adding_nodes_and_elements.htm#?"; //Adding_triangles
     break;
   case QUAD_QUADRANGLE:
     aNumRows = 4;
     myNbCorners = 4;
+    myHelpFileName = "/files/adding_nodes_and_elements.htm#?"; //Adding_quadrangles
     break;
   case QUAD_TETRAHEDRON:
     aNumRows = 6;
     myNbCorners = 4;
+    myHelpFileName = "/files/adding_nodes_and_elements.htm#?"; //Adding_tetrahedrons
     break;
   case QUAD_PYRAMID:
     aNumRows = 8;
     myNbCorners = 5;
+    myHelpFileName = "/files/adding_nodes_and_elements.htm#?";
     break;
   case QUAD_PENTAHEDRON:
     aNumRows = 9;
     myNbCorners = 6;
+    myHelpFileName = "/files/adding_nodes_and_elements.htm#?";
     break; 
   case QUAD_HEXAHEDRON:
     aNumRows = 12;
     myNbCorners = 8;
+    myHelpFileName = "/files/adding_nodes_and_elements.htm#?"; //Adding_hexahedrons
     break;
   }
     
@@ -521,6 +533,7 @@ void SMESHGUI_AddQuadraticElementDlg::Init()
   connect(buttonOk, SIGNAL(clicked()),     SLOT(ClickOnOk()));
   connect(buttonCancel, SIGNAL(clicked()), SLOT(ClickOnCancel()));
   connect(buttonApply, SIGNAL(clicked()),  SLOT(ClickOnApply()));
+  connect(buttonHelp, SIGNAL(clicked()),   SLOT(ClickOnHelp()));
 
   connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), SLOT(DeactivateActiveDialog()));
   connect(mySMESHGUI, SIGNAL (SignalStudyFrameChanged()), SLOT(ClickOnCancel()));
@@ -636,6 +649,23 @@ void SMESHGUI_AddQuadraticElementDlg::ClickOnCancel()
   return;
 }
 
+//=================================================================================
+// function : ClickOnHelp()
+// purpose  :
+//=================================================================================
+void SMESHGUI_AddQuadraticElementDlg::ClickOnHelp()
+{
+  SalomeApp_Application* app = (SalomeApp_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 : onTextChange()
 // purpose  :
index 2d1fa863124371418ccb6409a64c7070c2229afb..00b39cc9346f12544d8f0ef11386c48bb608b7fb 100644 (file)
@@ -78,7 +78,10 @@ private:
     QPushButton*  buttonOk;
     QPushButton*  buttonCancel;
     QPushButton*  buttonApply;
-   
+    QPushButton * buttonHelp;
+
+    QString       myHelpFileName;
+
 private slots:
   
     void onTextChange(const QString&);
@@ -89,6 +92,7 @@ private slots:
     void ClickOnOk();
     void ClickOnCancel();
     void ClickOnApply();
+    void ClickOnHelp();
     void SetEditCorners() ;
     void SelectionIntoArgument() ;
     void DeactivateActiveDialog() ;
index 7551df818a0d5a70d5a93bce657424f1eca558d3..da3ed99ca24e4f3470406e87887570ea04b874fb 100644 (file)
@@ -37,6 +37,7 @@
 
 #include "SUIT_Session.h"
 #include "SUIT_OverrideCursor.h"
+#include "SUIT_MessageBox.h"
 
 #include "SALOME_ListIO.hxx"
 #include "SALOME_InteractiveObject.hxx"
@@ -324,6 +325,10 @@ SMESHGUI_ClippingDlg::SMESHGUI_ClippingDlg (SMESHGUI* theModule,
   buttonOk->setAutoDefault(TRUE);
   buttonOk->setDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonOk, 0, 0);
+  buttonHelp = new QPushButton(GroupButtons, "buttonHelp");
+  buttonHelp->setText(tr("SMESH_BUT_HELP" ));
+  buttonHelp->setAutoDefault(TRUE);
+  GroupButtonsLayout->addWidget(buttonHelp, 0, 4);
 
   SMESHGUI_ClippingDlgLayout->addWidget(GroupPlanes,      0, 0);
   SMESHGUI_ClippingDlgLayout->addWidget(GroupParameters,  1, 0);
@@ -344,6 +349,8 @@ SMESHGUI_ClippingDlg::SMESHGUI_ClippingDlg (SMESHGUI* theModule,
   myIsSelectPlane = false;
   onSelectionChanged();
 
+  myHelpFileName = "clipping.htm";
+
   // signals and slots connections :
   connect(ComboBoxPlanes, SIGNAL(activated(int)), this, SLOT(onSelectPlane(int)));
   connect(buttonNew, SIGNAL(clicked()), this, SLOT(ClickOnNew()));
@@ -357,6 +364,7 @@ SMESHGUI_ClippingDlg::SMESHGUI_ClippingDlg (SMESHGUI* theModule,
   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(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnOk()));
   connect(mySelectionMgr,  SIGNAL(currentSelectionChanged()), this, SLOT(onSelectionChanged()));
   /* to close dialog if study frame change */
@@ -425,6 +433,23 @@ void SMESHGUI_ClippingDlg::ClickOnCancel()
   close();
 }
 
+//=================================================================================
+// function : ClickOnHelp()
+// purpose  :
+//=================================================================================
+void SMESHGUI_ClippingDlg::ClickOnHelp()
+{
+  SalomeApp_Application* app = (SalomeApp_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 : onSelectionChanged()
 // purpose  : Called when selection is changed
index bc4bab595580c113f268a30aa5964826cef552c2..a9629699f14a45f063d449173c04d048ec3a3a65 100644 (file)
@@ -111,8 +111,10 @@ private:
     QPushButton*      buttonOk;
     QPushButton*      buttonCancel;
     QPushButton*      buttonApply;
+    QPushButton*      buttonHelp;
 
     bool myIsSelectPlane;
+    QString myHelpFileName;
 
 public slots:
 
@@ -126,6 +128,7 @@ public slots:
     void ClickOnOk();
     void ClickOnCancel();
     void ClickOnApply();
+    void ClickOnHelp();
 };
 
 #endif // DIALOGBOX_TRANSPARENCYDLG_H
diff --git a/src/SMESHGUI/SMESHGUI_CreateHypothesesDlg.cxx b/src/SMESHGUI/SMESHGUI_CreateHypothesesDlg.cxx
deleted file mode 100644 (file)
index 4f97f99..0000000
+++ /dev/null
@@ -1,296 +0,0 @@
-//  SMESH SMESHGUI : GUI for SMESH component
-//
-//  Copyright (C) 2003  CEA
-//
-//  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 or email : webmaster.salome@opencascade.org
-//
-//
-//
-//  File   : SMESHGUI_CreateHypothesesDlg.cxx
-//  Author : Julia DOROVSKIKH
-//  Module : SMESH
-//  $Header$
-
-#include "SMESHGUI_CreateHypothesesDlg.h"
-
-#include "SMESHGUI_HypothesesUtils.h"
-#include "SMESHGUI_Hypotheses.h"
-#include "SMESHGUI_Utils.h"
-#include "SMESHGUI.h"
-
-#include "SUIT_Desktop.h"
-#include "SUIT_ResourceMgr.h"
-
-#include "SALOME_ListIteratorOfListIO.hxx"
-
-#include "utilities.h"
-
-// QT Includes
-#include <qbuttongroup.h>
-#include <qgroupbox.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qlistview.h>
-#include <qheader.h>
-
-using namespace std;
-
-//=================================================================================
-// function : SMESHGUI_CreateHypothesesDlg()
-// purpose  : Constructs a SMESHGUI_CreateHypothesesDlg which is a child of 'parent', with the
-//            name 'name' and widget flags set to 'f'.
-//            The dialog will by default be modeless, unless you set 'modal' to
-//            TRUE to construct a modal dialog.
-//=================================================================================
-SMESHGUI_CreateHypothesesDlg::SMESHGUI_CreateHypothesesDlg (SMESHGUI* theModule,
-                                                            const char* name,
-                                                            bool modal,
-                                                            bool isAlgo)
-     : QDialog( SMESH::GetDesktop( theModule ), name, modal, WStyle_Customize | WStyle_NormalBorder |
-               WStyle_Title | WStyle_SysMenu | WDestructiveClose),
-       myIsAlgo(isAlgo),
-       mySMESHGUI( theModule )
-{
-  if (!name)
-    setName("SMESHGUI_CreateHypothesesDlg");
-  setCaption(isAlgo ? tr("SMESH_CREATE_ALGORITHMS" ) : tr("SMESH_CREATE_HYPOTHESES" ));
-  setSizeGripEnabled(TRUE);
-
-  QGridLayout* SMESHGUI_CreateHypothesesDlgLayout = new QGridLayout(this);
-  SMESHGUI_CreateHypothesesDlgLayout->setSpacing(6);
-  SMESHGUI_CreateHypothesesDlgLayout->setMargin(11);
-
-  /***************************************************************/
-  GroupAlgorithms = new QGroupBox(this, "GroupAlgorithms");
-  GroupAlgorithms->setTitle(isAlgo ? tr("SMESH_AVAILABLE_ALGORITHMS") : tr("SMESH_AVAILABLE_HYPOTHESES"));
-  GroupAlgorithms->setColumnLayout(0, Qt::Vertical);
-  GroupAlgorithms->layout()->setSpacing(0);
-  GroupAlgorithms->layout()->setMargin(0);
-
-  QGridLayout* hypLayout = new QGridLayout(GroupAlgorithms->layout());
-  hypLayout->setGeometry(QRect(12, 18, 139, 250));
-  hypLayout->setAlignment(Qt::AlignTop);
-  hypLayout->setSpacing(6);
-  hypLayout->setMargin(11);
-
-  ListAlgoDefinition = new QListView(GroupAlgorithms, "ListAlgoDefinition");
-  ListAlgoDefinition->setMinimumSize(400, 200);
-  ListAlgoDefinition->addColumn("");
-  ListAlgoDefinition->header()->hide();
-  ListAlgoDefinition->setSelectionMode(QListView::Single);
-  ListAlgoDefinition->setResizeMode(QListView::AllColumns);
-  ListAlgoDefinition->setRootIsDecorated(true);
-
-  hypLayout->addWidget(ListAlgoDefinition, 0, 0);
-  SMESHGUI_CreateHypothesesDlgLayout->addWidget(GroupAlgorithms, 0, 0);
-
-  /***************************************************************/
-  GroupButtons = new QGroupBox(this, "GroupButtons");
-  GroupButtons->setColumnLayout(0, Qt::Vertical);
-  GroupButtons->layout()->setSpacing(0);
-  GroupButtons->layout()->setMargin(0);
-  QGridLayout* GroupButtonsLayout = new QGridLayout(GroupButtons->layout());
-  GroupButtonsLayout->setAlignment(Qt::AlignTop);
-  GroupButtonsLayout->setSpacing(6);
-  GroupButtonsLayout->setMargin(11);
-
-  buttonApply = new QPushButton(GroupButtons, "buttonApply");
-  buttonApply->setText(tr("SMESH_BUT_CREATE" ));
-  buttonApply->setAutoDefault(TRUE);
-  buttonApply->setDefault(FALSE);
-  buttonApply->setEnabled(FALSE);
-  GroupButtonsLayout->addWidget(buttonApply, 0, 1);
-
-  QSpacerItem* spacer_9 = new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
-  GroupButtonsLayout->addItem(spacer_9, 0, 2);
-
-  buttonCancel = new QPushButton(GroupButtons, "buttonCancel");
-  buttonCancel->setText(tr("SMESH_BUT_CLOSE" ));
-  buttonCancel->setAutoDefault(TRUE);
-  buttonCancel->setDefault(TRUE);
-  buttonCancel->setEnabled(TRUE);
-  GroupButtonsLayout->addWidget(buttonCancel, 0, 3);
-
-  SMESHGUI_CreateHypothesesDlgLayout->addWidget(GroupButtons, 1, 0);
-  /***************************************************************/
-
-  Init();
-}
-
-//=================================================================================
-// function : ~SMESHGUI_CreateHypothesesDlg()
-// purpose  : Destroys the object and frees any allocated resources
-//=================================================================================
-SMESHGUI_CreateHypothesesDlg::~SMESHGUI_CreateHypothesesDlg()
-{
-  // no need to delete child widgets, Qt does it all for us
-}
-
-//=================================================================================
-// function : Init()
-// purpose  :
-//=================================================================================
-void SMESHGUI_CreateHypothesesDlg::Init()
-{
-  mySMESHGUI->SetActiveDialogBox((QDialog*)this);
-
-  InitAlgoDefinition();
-
-  /* signals and slots connections */
-  connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
-  connect(buttonApply , SIGNAL(clicked()), this, SLOT(ClickOnApply()));
-
-//  connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
-  connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
-
-  connect(ListAlgoDefinition, SIGNAL(selectionChanged()), this, SLOT(onSelectionChanged()));
-  connect(ListAlgoDefinition, SIGNAL(doubleClicked(QListViewItem*)), this, SLOT(onDoubleClicked(QListViewItem*)));
-
-  this->show();
-}
-
-//=================================================================================
-// function : ClickOnCancel()
-// purpose  :
-//=================================================================================
-void SMESHGUI_CreateHypothesesDlg::ClickOnCancel()
-{
-  close();
-}
-
-//=================================================================================
-// function : ClickOnApply()
-// purpose  :
-//=================================================================================
-void SMESHGUI_CreateHypothesesDlg::ClickOnApply()
-{
-  if (mySMESHGUI->isActiveStudyLocked())
-    return;
-  QListViewItem* item = ListAlgoDefinition->selectedItem();
-  if (!item)
-    return;
-  QString aHypType = item->text(1);
-  MESSAGE("Apply " << aHypType);
-  char* sHypType = (char*)aHypType.latin1();
-
-  HypothesisData* aHypData = SMESH::GetHypothesisData(sHypType);
-  if (!aHypData)
-    return;
-  QString aClientLibName = aHypData->ClientLibName;
-  MESSAGE("Client lib name = " << aClientLibName);
-
-  if (aClientLibName == "") {
-    // Call hypothesis creation server method (without GUI)
-    QString aHypName = aHypData->Label;
-    SMESH::CreateHypothesis(sHypType, aHypName, myIsAlgo);
-  } else {
-    // Get hypotheses creator client (GUI)
-    SMESHGUI_GenericHypothesisCreator* aCreator =
-      SMESH::GetHypothesisCreator(sHypType);
-
-    if( aCreator )
-      // Create hypothesis/algorithm
-      aCreator->create( myIsAlgo, this );
-    else
-    {
-      // report about error
-    }
-  }
-
-//  buttonApply->setEnabled(FALSE);
-  return;
-}
-
-//=================================================================================
-// function : ActivateThisDialog()
-// purpose  :
-//=================================================================================
-void SMESHGUI_CreateHypothesesDlg::ActivateThisDialog()
-{
-  mySMESHGUI->EmitSignalDeactivateDialog();
-  GroupButtons->setEnabled(true);
-  return;
-}
-
-//=================================================================================
-// function : enterEvent()
-// purpose  :
-//=================================================================================
-void SMESHGUI_CreateHypothesesDlg::enterEvent (QEvent*)
-{
-  ActivateThisDialog();
-  return;
-}
-
-//=================================================================================
-// function : closeEvent()
-// purpose  :
-//=================================================================================
-void SMESHGUI_CreateHypothesesDlg::closeEvent (QCloseEvent* e)
-{
-  mySMESHGUI->ResetState();
-  QDialog::closeEvent(e);
-}
-
-//=================================================================================
-// function : onSelectionChanged()
-// purpose  :
-//=================================================================================
-void SMESHGUI_CreateHypothesesDlg::onSelectionChanged()
-{
-  QListViewItem* item = ListAlgoDefinition->selectedItem();
-  buttonApply->setEnabled(item && item->depth() > 0);
-}
-
-//=================================================================================
-// function : onDoubleClicked()
-// purpose  :
-//=================================================================================
-void SMESHGUI_CreateHypothesesDlg::onDoubleClicked (QListViewItem* i)
-{
-  if (i && i->depth() > 0)
-    this->ClickOnApply();
-}
-
-//=================================================================================
-// function : InitAlgoDefinition()
-// purpose  :
-//=================================================================================
-void SMESHGUI_CreateHypothesesDlg::InitAlgoDefinition()
-{
-  ListAlgoDefinition->clear();
-  QStringList HypList = SMESH::GetAvailableHypotheses(myIsAlgo);
-  for (int i = 0; i < HypList.count(); ++i) {
-    HypothesisData* aHypData = SMESH::GetHypothesisData(HypList[i]);
-    QListViewItem* parentItem = 0;
-    QListViewItem* childItem = ListAlgoDefinition->firstChild();
-    while (childItem) {
-      if (childItem->text(0) == aHypData->PluginName) {
-       parentItem = childItem;
-       break;
-      }
-      childItem = childItem->nextSibling();
-    }
-    if (!parentItem)
-      parentItem = new QListViewItem(ListAlgoDefinition, aHypData->PluginName);
-    parentItem->setOpen(true);
-    QListViewItem* aItem = new QListViewItem(parentItem, aHypData->Label, HypList[i]);
-    QPixmap aPixMap (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr(aHypData->IconId)));
-    if (!aPixMap.isNull())
-      aItem->setPixmap(0, aPixMap);
-  }
-}
diff --git a/src/SMESHGUI/SMESHGUI_CreateHypothesesDlg.h b/src/SMESHGUI/SMESHGUI_CreateHypothesesDlg.h
deleted file mode 100644 (file)
index e2bb65a..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-//  SMESH SMESHGUI : GUI for SMESH component
-//
-//  Copyright (C) 2003  CEA
-// 
-//  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 or email : webmaster.salome@opencascade.org
-//
-//
-//
-//  File   : SMESHGUI_CreateHypothesesDlg.h
-//  Author : Julia DOROVSKIKH
-//  Module : SMESH
-//  $Header$
-
-#ifndef DIALOGBOX_CREATE_HYPOTHESES_H
-#define DIALOGBOX_CREATE_HYPOTHESES_H
-
-// QT Includes
-#include <qvariant.h>
-#include <qdialog.h>
-#include <qstringlist.h>
-
-// IDL Headers
-#include <SALOMEconfig.h>
-#include CORBA_SERVER_HEADER(GEOM_Gen)
-#include CORBA_SERVER_HEADER(SMESH_Mesh)
-
-#include <map>
-#include <string>
-
-class QButtonGroup;
-class QGroupBox;
-class QPushButton;
-class QListView;
-class QListViewItem;
-class SMESHGUI;
-
-//=================================================================================
-// class    : SMESHGUI_CreateHypothesesDlg
-// purpose  :
-//=================================================================================
-class SMESHGUI_CreateHypothesesDlg : public QDialog
-{
-    Q_OBJECT
-
-public:
-    SMESHGUI_CreateHypothesesDlg (SMESHGUI*,
-                                 const char* name = 0,
-                                 bool modal = FALSE,
-                                 bool isAlgo = FALSE);
-    ~SMESHGUI_CreateHypothesesDlg ();
-
-private:
-
-    void Init() ;
-    void closeEvent( QCloseEvent* e ) ;
-    void enterEvent ( QEvent * ) ;
-
-    void InitAlgoDefinition();
-
-    SMESHGUI*     mySMESHGUI;
-    bool          myIsAlgo;
-
-    QGroupBox*    GroupButtons;
-    QPushButton*  buttonCancel;
-    QPushButton*  buttonApply;
-
-    QGroupBox* GroupAlgorithms;
-    QListView* ListAlgoDefinition;
-
-private slots:
-
-    void ClickOnCancel();
-    void ClickOnApply();
-    void ActivateThisDialog() ;
-
-    void onSelectionChanged();
-    void onDoubleClicked(QListViewItem*);
-};
-
-#endif // DIALOGBOX_CREATE_HYPOTHESES_H
index d2f316fda323ae3c4837619f02fe6a90ba0abfdc..8d5bc7a6a4daaaa45705e2b04c000b1494d47f40 100755 (executable)
 #include "SUIT_ResourceMgr.h"\r
 #include "SUIT_Desktop.h"\r
 #include "SUIT_FileDlg.h"\r
+#include "SUIT_Session.h"\r
+#include "SUIT_MessageBox.h"\r
 \r
+#include "SalomeApp_Application.h"\r
 #include "SalomeApp_Study.h"\r
 #include "LightApp_DataOwner.h"\r
 #include "LightApp_SelectionMgr.h"\r
@@ -105,6 +108,8 @@ SMESHGUI_CreatePatternDlg::SMESHGUI_CreatePatternDlg( SMESHGUI*   theModule,
   if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))\r
     mySelector = aViewWindow->GetSelector();\r
 \r
+  myHelpFileName = "pattern_mapping.htm";\r
+\r
   Init(theType);\r
 }\r
 \r
@@ -185,6 +190,7 @@ QFrame* SMESHGUI_CreatePatternDlg::createButtonFrame (QWidget* theParent)
   myOkBtn    = new QPushButton(tr("SMESH_BUT_OK"    ), aFrame);\r
   mySaveBtn  = new QPushButton(tr("SAVE"            ), aFrame);\r
   myCloseBtn = new QPushButton(tr("SMESH_BUT_CANCEL"), aFrame);\r
+  myHelpBtn = new QPushButton(tr("SMESH_BUT_HELP"), aFrame);\r
 \r
   QSpacerItem* aSpacer = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum);\r
 \r
@@ -194,10 +200,12 @@ QFrame* SMESHGUI_CreatePatternDlg::createButtonFrame (QWidget* theParent)
   aLay->addWidget(mySaveBtn);\r
   aLay->addItem(aSpacer);\r
   aLay->addWidget(myCloseBtn);\r
+  aLay->addWidget(myHelpBtn);\r
 \r
   connect(myOkBtn,    SIGNAL(clicked()), SLOT(onOk()));\r
   connect(myCloseBtn, SIGNAL(clicked()), SLOT(onClose()));\r
   connect(mySaveBtn, SIGNAL(clicked()), SLOT(onSave()));\r
+  connect(myHelpBtn, SIGNAL(clicked()), SLOT(onHelp()));\r
 \r
   return aFrame;\r
 }\r
@@ -463,6 +471,23 @@ void SMESHGUI_CreatePatternDlg::onClose()
   emit Close();\r
 }\r
 \r
+//=================================================================================\r
+// function : onHelp()\r
+// purpose  :\r
+//=================================================================================\r
+void SMESHGUI_CreatePatternDlg::onHelp()\r
+{\r
+  SalomeApp_Application* app = (SalomeApp_Application*)(SUIT_Session::session()->activeApplication());\r
+  if (app) \r
+    app->onHelpContextModule(mySMESHGUI ? app->moduleName(mySMESHGUI->moduleName()) : QString(""), myHelpFileName);\r
+  else {\r
+    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),\r
+                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").\r
+                          arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(myHelpFileName),\r
+                          QObject::tr("BUT_OK"));\r
+  }\r
+}\r
+\r
 //=======================================================================\r
 // function : loadFromObject()\r
 // purpose  : Load pattern from geom object corresponding to the mesh/submesh\r
index 84a0cbd34ea1cbf9e60efa2a6442580cfe34c8c7..1c2c714c24e855340d61e570bd9e3e7e04b7fb13 100755 (executable)
@@ -90,6 +90,7 @@ private slots:
   void                     onOk();
   void                     onSave();
   void                     onClose();
+  void                     onHelp();
 
   void                     onDeactivate();
 
@@ -116,6 +117,7 @@ private:
   QPushButton*             myOkBtn;
   QPushButton*             mySaveBtn;
   QPushButton*             myCloseBtn;
+  QPushButton*             myHelpBtn;
 
   QButtonGroup*            myTypeGrp;
   QRadioButton*            mySwitch2d;
@@ -141,6 +143,8 @@ private:
 
   SMESH::SMESH_Pattern_var myPattern;
   bool                     myIsLoaded;
+
+  QString                  myHelpFileName;
 };
 
 #endif
index 02ac5a08dba68cc6459ba0f262daeca24d6ba254..3c90bdf4bf835534ead0f74150c52342f6b39042 100644 (file)
@@ -40,6 +40,8 @@
 #include "SMDS_Mesh.hxx"
 
 #include "SUIT_ResourceMgr.h"
+#include "SUIT_Session.h"
+#include "SUIT_MessageBox.h"
 
 #include "SalomeApp_Application.h"
 #include "SalomeApp_Study.h"
@@ -249,6 +251,11 @@ SMESHGUI_CreatePolyhedralVolumeDlg::SMESHGUI_CreatePolyhedralVolumeDlg( SMESHGUI
   buttonOk->setAutoDefault( TRUE );
   buttonOk->setDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonOk, 0, 0 );
+  buttonHelp = new QPushButton(GroupButtons, "buttonHelp");
+  buttonHelp->setText(tr("SMESH_BUT_HELP" ));
+  buttonHelp->setAutoDefault(TRUE);
+  GroupButtonsLayout->addWidget(buttonHelp, 0, 4);
+
   SMESHGUI_CreatePolyhedralVolumeDlgLayout->addWidget( GroupButtons, 2, 0 );
 
   /***************************************************************/
@@ -315,6 +322,8 @@ SMESHGUI_CreatePolyhedralVolumeDlg::SMESHGUI_CreatePolyhedralVolumeDlg( SMESHGUI
   RadioButton1->setChecked( TRUE );
  
   mySMESHGUI->SetActiveDialogBox( (QDialog*)this ) ;
+
+  myHelpFileName = "/files/adding_nodes_and_elements.htm#?"; //Adding_polyhedrons
   
   Init();
 }
@@ -348,6 +357,7 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::Init()
   connect(buttonOk, SIGNAL( clicked() ),     SLOT( ClickOnOk() ) );
   connect(buttonCancel, SIGNAL( clicked() ), SLOT( ClickOnCancel() ) ) ;
   connect(buttonApply, SIGNAL( clicked() ),  SLOT(ClickOnApply() ) );
+  connect(buttonHelp, SIGNAL(clicked()),     SLOT(ClickOnHelp() ) );
 
   connect( GroupConstructors, SIGNAL(clicked(int) ), SLOT( ConstructorsClicked(int) ) );
   connect(SelectElementsButton, SIGNAL( clicked() ), SLOT( SetEditCurrentArgument() ) ) ;
@@ -560,6 +570,23 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnCancel()
   reject() ;
 }
 
+//=================================================================================
+// function : ClickOnHelp()
+// purpose  :
+//=================================================================================
+void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnHelp()
+{
+  SalomeApp_Application* app = (SalomeApp_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 : onTextChange
 //purpose  : 
index be9dca196ae2331ffd09d7192d407ea9c0f15992..b7d07df220b1c9a41b8b5e0dc12b8cdc421396bb 100644 (file)
@@ -98,6 +98,7 @@ private:
     QPushButton* buttonOk;
     QPushButton* buttonCancel;
     QPushButton* buttonApply;
+    QPushButton* buttonHelp;
     QGroupBox* GroupContent;
     QLabel* TextLabelIds;
     QPushButton* SelectElementsButton;
@@ -106,6 +107,8 @@ private:
     QLabel* myFacesByNodesLabel;
     QPushButton* AddButton;
     QPushButton* RemoveButton;
+
+    QString myHelpFileName;
        
     public slots:
 
@@ -119,6 +122,7 @@ private:
     void ClickOnOk();
     void ClickOnCancel();
     void ClickOnApply();
+    void ClickOnHelp();
     void SetEditCurrentArgument() ;
     void SelectionIntoArgument() ;
     void DeactivateActiveDialog() ;
index 44373571f92f169a0c4c3bd905b1193a49bf606c..eb6892d6a71014b3ae1957cd630b17d57bfdaef4 100644 (file)
 #include "SMESH_TypeFilter.hxx"
 
 #include "SUIT_Desktop.h"
+#include "SUIT_Session.h"
+#include "SUIT_MessageBox.h"
 
 #include "SalomeApp_Study.h"
+#include "SalomeApp_Application.h"
 #include "LightApp_SelectionMgr.h"
 
 #include "SALOME_ListIO.hxx"
@@ -90,6 +93,8 @@ SMESHGUI_DeleteGroupDlg::SMESHGUI_DeleteGroupDlg (SMESHGUI* theModule):
 
   aDlgLay->setStretchFactor(aMainFrame, 1);
 
+  myHelpFileName = "deleting_groups.htm";
+
   Init();
 }
 
@@ -122,6 +127,7 @@ QFrame* SMESHGUI_DeleteGroupDlg::createButtonFrame (QWidget* theParent)
   myOkBtn     = new QPushButton(tr("SMESH_BUT_OK"   ), aFrame);
   myApplyBtn  = new QPushButton(tr("SMESH_BUT_APPLY"), aFrame);
   myCloseBtn  = new QPushButton(tr("SMESH_BUT_CLOSE"), aFrame);
+  myHelpBtn  = new QPushButton(tr("SMESH_BUT_HELP"), aFrame);
 
   QSpacerItem* aSpacer = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum);
 
@@ -131,11 +137,13 @@ QFrame* SMESHGUI_DeleteGroupDlg::createButtonFrame (QWidget* theParent)
   aLay->addWidget(myApplyBtn);
   aLay->addItem(aSpacer);
   aLay->addWidget(myCloseBtn);
+  aLay->addWidget(myHelpBtn);
 
   // connect signals and slots
   connect(myOkBtn,    SIGNAL(clicked()), SLOT(onOk()));
   connect(myCloseBtn, SIGNAL(clicked()), SLOT(onClose()));
   connect(myApplyBtn, SIGNAL(clicked()), SLOT(onApply()));
+  connect(myHelpBtn,  SIGNAL(clicked()), SLOT(onHelp()));
 
   return aFrame;
 }
@@ -241,6 +249,23 @@ void SMESHGUI_DeleteGroupDlg::onClose()
   reject();
 }
 
+//=================================================================================
+// function : onHelp()
+// purpose  :
+//=================================================================================
+void SMESHGUI_DeleteGroupDlg::onHelp()
+{
+  SalomeApp_Application* app = (SalomeApp_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 : onSelectionDone()
 // purpose  : SLOT called when selection changed
index f944b302040573dfa0217c238bdf4d954841f94d..baf88c398c57936d77e26b51d6225c48935afbef 100644 (file)
@@ -67,6 +67,7 @@ private slots:
   void                    onOk();
   bool                    onApply();
   void                    onClose();
+  void                    onHelp();
 
   void                    onDeactivate();
 
@@ -83,6 +84,7 @@ private:
   QPushButton*            myOkBtn;
   QPushButton*            myApplyBtn;
   QPushButton*            myCloseBtn;
+  QPushButton*            myHelpBtn;
   QListBox*               myListBox;
 
   SMESHGUI*               mySMESHGUI;
@@ -90,6 +92,8 @@ private:
 
   QValueList<SMESH::SMESH_GroupBase_var> myListGrp;
   bool                                   myBlockSelection;
+
+  QString                 myHelpFileName;
 };
 
 #endif
index 73c92abe2aeb1baf463d9a564c19b5ec26dc3f14..00a2b4e7e8678e718eb7097ce2a93997fe532ac9 100644 (file)
@@ -44,7 +44,7 @@ class SMESHGUI_Dialog : public LightApp_Dialog
   Q_OBJECT
   
 public:
-  SMESHGUI_Dialog( QWidget* = 0, const bool = false, const bool = false, const int = OK | Close | Apply );
+  SMESHGUI_Dialog( QWidget* = 0, const bool = false, const bool = false, const int = OK | Close | Apply | Help );
   virtual ~SMESHGUI_Dialog();
 
   virtual void show();
diff --git a/src/SMESHGUI/SMESHGUI_EditHypothesesDlg.cxx b/src/SMESHGUI/SMESHGUI_EditHypothesesDlg.cxx
deleted file mode 100644 (file)
index 9c16af4..0000000
+++ /dev/null
@@ -1,960 +0,0 @@
-//  SMESH SMESHGUI : GUI for SMESH component
-//
-//  Copyright (C) 2003  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
-//
-//
-//
-//  File   : SMESHGUI_EditHypothesesDlg.cxx
-//  Author : Nicolas REJNERI
-//  Module : SMESH
-//  $Header$
-
-#include "SMESHGUI_EditHypothesesDlg.h"
-
-#include "SMESHGUI.h"
-#include "SMESHGUI_Utils.h"
-#include "SMESHGUI_GEOMGenUtils.h"
-#include "SMESHGUI_HypothesesUtils.h"
-
-#include "SMESH_TypeFilter.hxx"
-#include "SMESH_NumberFilter.hxx"
-
-#include "SALOME_ListIO.hxx"
-#include "SALOME_ListIteratorOfListIO.hxx"
-
-#include "SALOMEDSClient_Study.hxx"
-#include "SALOMEDSClient_AttributeIOR.hxx"
-#include "SALOMEDSClient_AttributeName.hxx"
-
-#include "SUIT_Session.h"
-#include "SUIT_OverrideCursor.h"
-#include "SUIT_Operation.h"
-#include "SUIT_Desktop.h"
-
-#include "utilities.h"
-
-#include "SVTK_ViewModel.h"
-
-// QT Includes
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qpixmap.h>
-
-using namespace std;
-
-//VRV: porting on Qt 3.0.5
-#if QT_VERSION >= 0x030005
-#include <qlistbox.h>
-#endif
-//VRV: porting on Qt 3.0.5
-
-class ListBoxIOR : public QListBoxText
-{
-public:
-  enum { RTTI_IOR = 1000 };
-
-public:
-  ListBoxIOR (QListBox* listbox,
-              const char* ior,
-              const QString& text = QString::null)
-  : QListBoxText(listbox, text), myIOR(ior) {}
-  virtual ~ListBoxIOR() {};
-  virtual int rtti() const { return RTTI_IOR; }
-  const char* GetIOR() { return myIOR.c_str(); }
-
-private:
-  string myIOR;
-};
-
-#define ALLOW_CHANGE_SHAPE 0
-
-int findItem (QListBox* listBox, const string& ior)
-{
-  for (int i = 0; i < listBox->count(); i++) {
-    if (listBox->item(i)->rtti() == ListBoxIOR::RTTI_IOR) {
-      ListBoxIOR* anItem = (ListBoxIOR*)(listBox->item(i));
-      if (anItem && ior == string(anItem->GetIOR()))
-       return i;
-    }
-  }
-  return -1;
-}
-
-//=================================================================================
-// function : SMESHGUI_EditHypothesesDlg()
-// purpose  : Constructs a SMESHGUI_EditHypothesesDlg which is a child of 'parent', with the
-//            name 'name' and widget flags set to 'f'.
-//            The dialog will by default be modeless, unless you set 'modal' to
-//            TRUE to construct a modal dialog.
-//=================================================================================
-SMESHGUI_EditHypothesesDlg::SMESHGUI_EditHypothesesDlg (SMESHGUI* theModule, const char* name,
-                                                        bool modal, WFlags fl)
-     : QDialog( SMESH::GetDesktop( theModule ), name, modal, WStyle_Customize | WStyle_NormalBorder |
-                WStyle_Title | WStyle_SysMenu | WDestructiveClose),
-    myImportedMesh(false),
-    mySMESHGUI( theModule ),
-    mySelectionMgr( SMESH::GetSelectionMgr( theModule ) )
-{
-    QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT")));
-    if (!name)
-      setName("SMESHGUI_EditHypothesesDlg");
-    setCaption(tr("SMESH_EDIT_HYPOTHESES"));
-    setSizeGripEnabled(TRUE);
-    QGridLayout* SMESHGUI_EditHypothesesDlgLayout = new QGridLayout(this);
-    SMESHGUI_EditHypothesesDlgLayout->setSpacing(6);
-    SMESHGUI_EditHypothesesDlgLayout->setMargin(11);
-
-    /***************************************************************/
-    GroupC1 = new QGroupBox(tr("SMESH_ARGUMENTS"), this, "GroupC1");
-    GroupC1->setColumnLayout(0, Qt::Vertical);
-    GroupC1->layout()->setSpacing(0);
-    GroupC1->layout()->setMargin(0);
-    QGridLayout* GroupC1Layout = new QGridLayout(GroupC1->layout());
-    GroupC1Layout->setAlignment(Qt::AlignTop);
-    GroupC1Layout->setSpacing(6);
-    GroupC1Layout->setMargin(11);
-
-    TextLabelC1A1 = new QLabel(tr("SMESH_OBJECT_MESHorSUBMESH"), GroupC1, "TextLabelC1A1");
-    GroupC1Layout->addWidget(TextLabelC1A1, 0, 0);
-    SelectButtonC1A1 = new QPushButton(GroupC1, "SelectButtonC1A1");
-    SelectButtonC1A1->setPixmap(image0);
-    GroupC1Layout->addWidget(SelectButtonC1A1, 0, 1);
-    LineEditC1A1 = new QLineEdit(GroupC1, "LineEditC1A1");
-    LineEditC1A1->setReadOnly(true);
-    GroupC1Layout->addWidget(LineEditC1A1, 0, 2);
-
-    TextLabelC1A2 = new QLabel(tr("SMESH_OBJECT_GEOM"), GroupC1, "TextLabelC1A2");
-    GroupC1Layout->addWidget(TextLabelC1A2, 1, 0);
-    SelectButtonC1A2 = new QPushButton(GroupC1, "SelectButtonC1A2");
-    SelectButtonC1A2->setPixmap(image0);
-    SelectButtonC1A2->setToggleButton(FALSE);
-    GroupC1Layout->addWidget(SelectButtonC1A2, 1, 1);
-    LineEditC1A2 = new QLineEdit(GroupC1, "LineEditC1A2");
-    LineEditC1A2->setReadOnly(true);
-    GroupC1Layout->addWidget(LineEditC1A2, 1, 2);
-
-    SMESHGUI_EditHypothesesDlgLayout->addWidget(GroupC1, 0, 0);
-
-    /***************************************************************/
-    GroupHypotheses = new QGroupBox(tr("SMESH_HYPOTHESES"), this, "GroupHypotheses");
-    GroupHypotheses->setColumnLayout(0, Qt::Vertical);
-    GroupHypotheses->layout()->setSpacing(0);
-    GroupHypotheses->layout()->setMargin(0);
-    QGridLayout* grid_3 = new QGridLayout(GroupHypotheses->layout());
-    grid_3->setAlignment(Qt::AlignTop);
-    grid_3->setSpacing(6);
-    grid_3->setMargin(11);
-
-    TextHypDefinition = new QLabel(tr("SMESH_AVAILABLE"), GroupHypotheses, "TextHypDefinition");
-    grid_3->addWidget(TextHypDefinition, 0, 0);
-
-    ListHypDefinition = new QListBox(GroupHypotheses, "ListHypDefinition");
-    ListHypDefinition->setMinimumSize(100, 100);
-    grid_3->addWidget(ListHypDefinition, 1, 0);
-
-    TextHypAssignation = new QLabel(tr("SMESH_EDIT_USED"), GroupHypotheses, "TextHypAssignation");
-    grid_3->addWidget(TextHypAssignation, 0, 1);
-
-    ListHypAssignation = new QListBox(GroupHypotheses, "ListHypAssignation");
-    ListHypAssignation->setMinimumSize(100, 100);
-    grid_3->addWidget(ListHypAssignation, 1, 1);
-
-    SMESHGUI_EditHypothesesDlgLayout->addWidget(GroupHypotheses, 1, 0);
-
-    /***************************************************************/
-    GroupAlgorithms = new QGroupBox(tr("SMESH_ADD_ALGORITHM"), this, "GroupAlgorithms");
-    GroupAlgorithms->setColumnLayout(0, Qt::Vertical);
-    GroupAlgorithms->layout()->setSpacing(0);
-    GroupAlgorithms->layout()->setMargin(0);
-    QGridLayout* grid_4 = new QGridLayout(GroupAlgorithms->layout());
-    grid_4->setAlignment(Qt::AlignTop);
-    grid_4->setSpacing(6);
-    grid_4->setMargin(11);
-
-    TextAlgoDefinition = new QLabel(tr("SMESH_AVAILABLE"), GroupAlgorithms, "TextAlgoDefinition");
-    grid_4->addWidget(TextAlgoDefinition, 0, 0);
-
-    ListAlgoDefinition = new QListBox(GroupAlgorithms, "ListAlgoDefinition");
-    ListAlgoDefinition->setMinimumSize(100, 100);
-    grid_4->addWidget(ListAlgoDefinition, 1, 0);
-
-    TextAlgoAssignation = new QLabel(tr("SMESH_EDIT_USED"), GroupAlgorithms, "TextAlgoAssignation");
-    grid_4->addWidget(TextAlgoAssignation, 0, 1);
-
-    ListAlgoAssignation = new QListBox(GroupAlgorithms, "ListAlgoAssignation");
-    ListAlgoAssignation ->setMinimumSize(100, 100);
-    grid_4->addWidget(ListAlgoAssignation, 1, 1);
-
-    SMESHGUI_EditHypothesesDlgLayout->addWidget(GroupAlgorithms, 2, 0);
-
-    /***************************************************************/
-    GroupButtons = new QGroupBox(this, "GroupButtons");
-    GroupButtons->setColumnLayout(0, Qt::Vertical);
-    GroupButtons->layout()->setSpacing(0);
-    GroupButtons->layout()->setMargin(0);
-    QGridLayout* GroupButtonsLayout = new QGridLayout(GroupButtons->layout());
-    GroupButtonsLayout->setAlignment(Qt::AlignTop);
-    GroupButtonsLayout->setSpacing(6);
-    GroupButtonsLayout->setMargin(11);
-
-    buttonOk = new QPushButton(tr("SMESH_BUT_OK"), GroupButtons, "buttonOk");
-    buttonOk->setAutoDefault(TRUE);
-    buttonOk->setDefault(FALSE);
-    GroupButtonsLayout->addWidget(buttonOk, 0, 0);
-
-    buttonApply = new QPushButton(tr("SMESH_BUT_APPLY"), GroupButtons, "buttonApply");
-    buttonApply->setAutoDefault(TRUE);
-    buttonApply->setDefault(FALSE);
-    GroupButtonsLayout->addWidget(buttonApply, 0, 1);
-
-    GroupButtonsLayout->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 2);
-
-    buttonCancel = new QPushButton(tr("SMESH_BUT_CLOSE"), GroupButtons, "buttonCancel");
-    buttonCancel->setAutoDefault(TRUE);
-    buttonCancel->setDefault(TRUE);
-    buttonCancel->setEnabled(TRUE);
-    GroupButtonsLayout->addWidget(buttonCancel, 0, 3);
-
-    SMESHGUI_EditHypothesesDlgLayout->addWidget(GroupButtons, 4, 0);
-
-    /***************************************************************/
-    Init();
-}
-
-//=================================================================================
-// function : ~SMESHGUI_EditHypothesesDlg()
-// purpose  : Destroys the object and frees any allocated resources
-//=================================================================================
-SMESHGUI_EditHypothesesDlg::~SMESHGUI_EditHypothesesDlg()
-{
-  // no need to delete child widgets, Qt does it all for us
-}
-
-//=================================================================================
-// function : Init()
-// purpose  :
-//=================================================================================
-void SMESHGUI_EditHypothesesDlg::Init()
-{
-  mySMESHGUI->SetActiveDialogBox((QDialog*)this);
-
-  InitHypDefinition();
-  InitAlgoDefinition();
-
-  //myGeomFilter = new SALOME_TypeFilter ("GEOM");
-  TColStd_MapOfInteger allTypesMap;
-  for (int i = 0; i < 10; i++)
-    allTypesMap.Add(i);
-  myGeomFilter          = new SMESH_NumberFilter ("GEOM", TopAbs_SHAPE, 0, allTypesMap);
-  myMeshOrSubMeshFilter = new SMESH_TypeFilter (MESHorSUBMESH);
-
-  myGeomShape = GEOM::GEOM_Object::_nil();
-  myMesh = SMESH::SMESH_Mesh::_nil();
-  mySubMesh = SMESH::SMESH_subMesh::_nil();
-
-  /* signals and slots connections */
-  connect(buttonOk,     SIGNAL(clicked()), this, SLOT(ClickOnOk()));
-  connect(buttonApply,  SIGNAL(clicked()), this, SLOT(ClickOnApply()));
-  connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
-
-  connect(SelectButtonC1A1, SIGNAL (clicked()), this, SLOT(SetEditCurrentArgument()));
-  connect(SelectButtonC1A2, SIGNAL (clicked()), this, SLOT(SetEditCurrentArgument()));
-
-  connect(mySelectionMgr, SIGNAL(currentSelectionChanged()),      this, SLOT(SelectionIntoArgument()));
-  connect(mySMESHGUI,     SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
-  connect(mySMESHGUI,     SIGNAL(SignalCloseAllDialogs()),        this, SLOT(ClickOnCancel()));
-
-  connect(ListHypAssignation,  SIGNAL(doubleClicked(QListBoxItem*)), this, SLOT(removeItem(QListBoxItem*)));
-  connect(ListAlgoAssignation, SIGNAL(doubleClicked(QListBoxItem*)), this, SLOT(removeItem(QListBoxItem*)));
-
-  connect(ListHypDefinition,  SIGNAL(doubleClicked(QListBoxItem*)), this, SLOT(addItem(QListBoxItem*)));
-  connect(ListAlgoDefinition, SIGNAL(doubleClicked(QListBoxItem*)), this, SLOT(addItem(QListBoxItem*)));
-
-  this->show();
-
-  LineEditC1A1->setFocus();
-  myEditCurrentArgument = LineEditC1A1;
-  mySelectionMgr->clearFilters();
-  mySelectionMgr->installFilter(myMeshOrSubMeshFilter);
-
-  SelectionIntoArgument();
-
-  UpdateControlState();
-}
-
-//=================================================================================
-// function : ClickOnOk()
-// purpose  :
-//=================================================================================
-void SMESHGUI_EditHypothesesDlg::ClickOnOk()
-{
-  if (ClickOnApply())
-    ClickOnCancel();
-}
-
-//=================================================================================
-// function : ClickOnApply()
-// purpose  :
-//=================================================================================
-bool SMESHGUI_EditHypothesesDlg::ClickOnApply()
-{
-  if (mySMESHGUI->isActiveStudyLocked())
-    return false;
-
-  bool aRes = false;
-
-  SUIT_OverrideCursor wc;
-
-  SUIT_Operation* op = new SUIT_Operation
-    (SUIT_Session::session()->activeApplication());
-
-  // start transaction
-  op->start();
-
-  if (!myMesh->_is_nil())
-    aRes = StoreMesh();
-  else if (!mySubMesh->_is_nil())
-    aRes = StoreSubMesh();
-
-  if (true/*aRes*/) { // abort desynchronizes contents of a Study and a mesh on server
-    // commit transaction
-    op->commit();
-    InitHypAssignation();
-    InitAlgoAssignation();
-  } else {
-    // abort transaction
-    op->abort();
-  }
-
-  UpdateControlState();
-  mySMESHGUI->updateObjBrowser();
-
-  return aRes;
-}
-
-//=================================================================================
-// function : ClickOnCancel()
-// purpose  :
-//=================================================================================
-void SMESHGUI_EditHypothesesDlg::ClickOnCancel()
-{
-  close();
-}
-
-//=================================================================================
-// function : SelectionIntoArgument()
-// purpose  : Called when selection as changed or other case
-//=================================================================================
-void SMESHGUI_EditHypothesesDlg::SelectionIntoArgument()
-{
-  QString aString = "";
-
-  SALOME_ListIO aList;
-  mySelectionMgr->selectedObjects(aList,SVTK_Viewer::Type());
-
-  int nbSel = SMESH::GetNameOfSelectedIObjects(mySelectionMgr, aString);
-
-  if (myEditCurrentArgument == LineEditC1A1) {
-    if (nbSel != 1) {
-      myMesh    = SMESH::SMESH_Mesh::_nil();
-      mySubMesh = SMESH::SMESH_subMesh::_nil();
-      aString   = "";
-    } else {
-      Handle(SALOME_InteractiveObject) IO = aList.First();
-      myMesh = SMESH::IObjectToInterface<SMESH::SMESH_Mesh>(IO);
-      if (myMesh->_is_nil()) {
-       mySubMesh = SMESH::IObjectToInterface<SMESH::SMESH_subMesh>(IO);
-       if (mySubMesh->_is_nil()) {
-         aString = "";
-       }
-      }
-    }
-    myEditCurrentArgument->setText(aString);
-
-    // InitGeom() will try to retrieve a shape from myMesh or mySubMesh
-    myGeomShape = GEOM::GEOM_Object::_nil();
-    InitGeom();
-
-    myImportedMesh = myGeomShape->_is_nil();
-
-    InitHypAssignation();
-    InitAlgoAssignation();
-
-  } else if (myEditCurrentArgument == LineEditC1A2) {
-    if (nbSel != 1) {
-      myGeomShape = GEOM::GEOM_Object::_nil();
-    } else {
-      Handle(SALOME_InteractiveObject) IO = aList.First();
-      myGeomShape = SMESH::IObjectToInterface<GEOM::GEOM_Object>(IO);
-    }
-    InitGeom();
-  }
-
-  UpdateControlState();
-}
-
-//=================================================================================
-// function : SetEditCurrentArgument()
-// purpose  :
-//=================================================================================
-void SMESHGUI_EditHypothesesDlg::SetEditCurrentArgument()
-{
-  QPushButton* send = (QPushButton*)sender();
-  if(send == SelectButtonC1A1) {
-    LineEditC1A1->setFocus();
-    myEditCurrentArgument = LineEditC1A1;
-    mySelectionMgr->clearFilters();
-    mySelectionMgr->installFilter(myMeshOrSubMeshFilter);
-  } else if (send == SelectButtonC1A2) {
-    LineEditC1A2->setFocus();
-    myEditCurrentArgument = LineEditC1A2;
-    mySelectionMgr->clearFilters();
-    mySelectionMgr->installFilter(myGeomFilter);
-  }
-  SelectionIntoArgument();
-}
-
-//=================================================================================
-// function : DeactivateActiveDialog()
-// purpose  :
-//=================================================================================
-void SMESHGUI_EditHypothesesDlg::DeactivateActiveDialog()
-{
-  if (GroupC1->isEnabled()) {
-    disconnect(mySelectionMgr, 0, this, 0);
-    GroupC1->setEnabled(false);
-    GroupButtons->setEnabled(false);
-  }
-}
-
-//=================================================================================
-// function : ActivateThisDialog()
-// purpose  :
-//=================================================================================
-void SMESHGUI_EditHypothesesDlg::ActivateThisDialog()
-{
-  mySMESHGUI->EmitSignalDeactivateDialog();
-  GroupC1->setEnabled(true);
-  GroupButtons->setEnabled(true);
-  connect (mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
-}
-
-//=================================================================================
-// function : enterEvent()
-// purpose  :
-//=================================================================================
-void SMESHGUI_EditHypothesesDlg::enterEvent (QEvent*)
-{
-  if (!GroupC1->isEnabled())
-    ActivateThisDialog();
-}
-
-//=================================================================================
-// function : closeEvent()
-// purpose  :
-//=================================================================================
-void SMESHGUI_EditHypothesesDlg::closeEvent (QCloseEvent* e)
-{
-  disconnect(mySelectionMgr, 0, this, 0);
-  mySMESHGUI->ResetState();
-  mySelectionMgr->clearFilters();
-  QDialog::closeEvent(e);
-}
-
-//=======================================================================
-// function : IsOld()
-// purpose  :
-//=======================================================================
-bool SMESHGUI_EditHypothesesDlg::IsOld (QListBoxItem* hypItem)
-{
-  if (hypItem->rtti() == ListBoxIOR::RTTI_IOR) {
-    ListBoxIOR* hyp = (ListBoxIOR*) hypItem;
-    return (myMapOldHypos.find(hyp->GetIOR()) != myMapOldHypos.end() ||
-            myMapOldAlgos.find(hyp->GetIOR()) != myMapOldAlgos.end());
-  }
-
-  return false;
-}
-
-//=================================================================================
-// function : removeItem()
-// purpose  :
-//=================================================================================
-void SMESHGUI_EditHypothesesDlg::removeItem (QListBoxItem* item)
-{
-  const QObject* aSender = sender();
-
-  if (!item) return;
-
-  if (aSender == ListHypAssignation) {
-    myNbModification += IsOld(item) ? 1 : -1;
-    ListHypAssignation->removeItem(ListHypAssignation->index(item));
-  }
-  else if (aSender == ListAlgoAssignation) {
-    myNbModification += IsOld(item) ? 1 : -1;
-    ListAlgoAssignation->removeItem(ListAlgoAssignation->index(item));
-  }
-
-  UpdateControlState();
-}
-
-//=================================================================================
-// function : addItem()
-// purpose  :
-//=================================================================================
-void SMESHGUI_EditHypothesesDlg::addItem (QListBoxItem* item)
-{
-  const QObject* aSender = sender();
-
-  if (!item) return;
-
-  ListBoxIOR* i = 0;
-  if (item->rtti() == ListBoxIOR::RTTI_IOR)
-    i = (ListBoxIOR*)item;
-  if (!i) return;
-
-  bool isFound = false;
-
-  ListBoxIOR* anItem;
-  if (aSender == ListHypDefinition) {
-    for (int j = 0, n = ListHypAssignation->count(); !isFound && j < n; j++) {
-      if (ListHypAssignation->item(j)->rtti() == ListBoxIOR::RTTI_IOR) {
-       anItem = (ListBoxIOR*)ListHypAssignation->item(j);
-       isFound = !strcmp(anItem->GetIOR(), i->GetIOR());
-      }
-    }
-    if (!isFound)
-      anItem = new ListBoxIOR (ListHypAssignation,
-                               CORBA::string_dup(i->GetIOR()),
-                               CORBA::string_dup(i->text().latin1()));
-
-  } else if (aSender == ListAlgoDefinition) {
-    for (int j = 0, n = ListAlgoAssignation->count(); !isFound && j < n; j++) {
-      if (ListAlgoAssignation->item(j)->rtti() == ListBoxIOR::RTTI_IOR) {
-       anItem = (ListBoxIOR*)ListAlgoAssignation->item(j);
-       isFound = !strcmp(anItem->GetIOR(), i->GetIOR());
-      }
-    }
-    if (!isFound)
-      anItem = new ListBoxIOR (ListAlgoAssignation,
-                               CORBA::string_dup(i->GetIOR()),
-                               CORBA::string_dup(i->text().latin1()));
-  } else {
-  }
-
-  if (!isFound)
-    myNbModification += IsOld(item) ? -1 : 1;
-
-  UpdateControlState();
-}
-
-//=================================================================================
-// function : InitHypDefinition()
-// purpose  :
-//=================================================================================
-void SMESHGUI_EditHypothesesDlg::InitHypDefinition()
-{
-  ListHypDefinition->clear();
-
-  _PTR(SComponent) father = SMESH::GetActiveStudyDocument()->FindComponent("SMESH");
-  if (!father)
-    return;
-
-  _PTR(SObject)          HypothesisRoot;
-  _PTR(GenericAttribute) anAttr;
-  _PTR(AttributeName)    aName;
-  _PTR(AttributeIOR)     anIOR;
-
-  //int Tag_HypothesisRoot = 1;
-  if (father->FindSubObject(1, HypothesisRoot)) {
-    _PTR(ChildIterator) it =
-      SMESH::GetActiveStudyDocument()->NewChildIterator(HypothesisRoot);
-    ListBoxIOR* anItem;
-    for (; it->More();it->Next()) {
-      _PTR(SObject) Obj = it->Value();
-      if (Obj->FindAttribute(anAttr, "AttributeName")) {
-        aName = anAttr;
-        if (Obj->FindAttribute(anAttr, "AttributeIOR")) {
-          anIOR = anAttr;
-          anItem = new ListBoxIOR (ListHypDefinition,
-                                   anIOR->Value().c_str(),
-                                   aName->Value().c_str());
-        }
-      }
-    }
-  }
-}
-
-//=================================================================================
-// function : InitHypAssignation()
-// purpose  :
-//=================================================================================
-void SMESHGUI_EditHypothesesDlg::InitHypAssignation()
-{
-  myNbModification = 0;
-
-  myMapOldHypos.clear();
-  ListHypAssignation->clear();
-  if (myImportedMesh)
-    return;
-
-  _PTR(SObject)          aMorSM, AHR, aRef;
-  _PTR(GenericAttribute) anAttr;
-  _PTR(AttributeName)    aName;
-  _PTR(AttributeIOR)     anIOR;
-
-  if (!myMesh->_is_nil())
-    aMorSM = SMESH::FindSObject(myMesh);
-  else if (!mySubMesh->_is_nil())
-    aMorSM = SMESH::FindSObject(mySubMesh);
-
-  if (aMorSM && aMorSM->FindSubObject(2, AHR)) {
-    _PTR(ChildIterator) it =
-      SMESH::GetActiveStudyDocument()->NewChildIterator(AHR);
-    for (; it->More();it->Next()) {
-      _PTR(SObject) Obj = it->Value();
-      if (Obj->ReferencedObject(aRef)) {
-        if (aRef->FindAttribute(anAttr, "AttributeName")) {
-          aName = anAttr;
-         if (aRef->FindAttribute(anAttr, "AttributeIOR")) {
-            anIOR = anAttr;
-           ListBoxIOR* anItem = new ListBoxIOR (ListHypAssignation,
-                                                anIOR->Value().c_str(),
-                                                aName->Value().c_str());
-           myMapOldHypos[ anIOR->Value() ] = ListHypAssignation->index(anItem);
-         }
-       }
-      }
-    }
-  }
-}
-
-//=================================================================================
-// function : InitAlgoDefinition()
-// purpose  :
-//=================================================================================
-void SMESHGUI_EditHypothesesDlg::InitAlgoDefinition()
-{
-  ListAlgoDefinition->clear();
-
-  _PTR(SComponent) father = SMESH::GetActiveStudyDocument()->FindComponent("SMESH");
-  if (!father)
-    return;
-
-  _PTR(SObject)          AlgorithmsRoot;
-  _PTR(GenericAttribute) anAttr;
-  _PTR(AttributeName)    aName;
-  _PTR(AttributeIOR)     anIOR;
-
-  if (father->FindSubObject (2, AlgorithmsRoot)) {
-    _PTR(ChildIterator) it =
-      SMESH::GetActiveStudyDocument()->NewChildIterator(AlgorithmsRoot);
-    ListBoxIOR* anItem;
-    for (; it->More();it->Next()) {
-      _PTR(SObject) Obj = it->Value();
-      if (Obj->FindAttribute(anAttr, "AttributeName")) {
-        aName = anAttr;
-        if (Obj->FindAttribute(anAttr, "AttributeIOR")) {
-          anIOR = anAttr;
-          anItem = new ListBoxIOR (ListAlgoDefinition,
-                                   anIOR->Value().c_str(),
-                                   aName->Value().c_str());
-        }
-      }
-    }
-  }
-}
-
-//=================================================================================
-// function : InitAlgoAssignation()
-// purpose  :
-//=================================================================================
-void SMESHGUI_EditHypothesesDlg::InitAlgoAssignation()
-{
-  myMapOldAlgos.clear();
-  ListAlgoAssignation->clear();
-  if (myImportedMesh)
-    return;
-
-  _PTR(SObject)          aMorSM, AHR, aRef;
-  _PTR(GenericAttribute) anAttr;
-  _PTR(AttributeName)    aName;
-  _PTR(AttributeIOR)     anIOR;
-
-  if (!myMesh->_is_nil())
-    aMorSM = SMESH::FindSObject(myMesh);
-  else if (!mySubMesh->_is_nil())
-    aMorSM = SMESH::FindSObject(mySubMesh);
-
-  if (aMorSM && aMorSM->FindSubObject(3, AHR)) {
-    _PTR(ChildIterator) it =
-      SMESH::GetActiveStudyDocument()->NewChildIterator(AHR);
-    for (; it->More();it->Next()) {
-      _PTR(SObject) Obj = it->Value();
-      if (Obj->ReferencedObject(aRef)) {
-        if (aRef->FindAttribute(anAttr, "AttributeName")) {
-         aName = anAttr;
-         if (aRef->FindAttribute(anAttr, "AttributeIOR")) {
-           anIOR = anAttr;
-           ListBoxIOR* anItem = new ListBoxIOR (ListAlgoAssignation,
-                                                anIOR->Value().c_str(),
-                                                aName->Value().c_str());
-           myMapOldAlgos[ anIOR->Value() ] = ListAlgoAssignation->index(anItem);
-         }
-       }
-      }
-    }
-  }
-}
-
-//=================================================================================
-// function : InitGeom()
-// purpose  :
-//=================================================================================
-void SMESHGUI_EditHypothesesDlg::InitGeom()
-{
-  LineEditC1A2->setText("");
-
-  if (myGeomShape->_is_nil() && !myMesh->_is_nil()) {
-    _PTR(SObject) aMesh = SMESH::FindSObject(myMesh);
-    if (aMesh)
-      myGeomShape = SMESH::GetShapeOnMeshOrSubMesh(aMesh);
-  }
-  if (myGeomShape->_is_nil() && !mySubMesh->_is_nil()) {
-    _PTR(SObject) aSubMesh = SMESH::FindSObject(mySubMesh);
-    if (aSubMesh)
-      myGeomShape = SMESH::GetShapeOnMeshOrSubMesh(aSubMesh);
-  }
-
-  _PTR(GenericAttribute) anAttr;
-  _PTR(AttributeName)    aName;
-  if (!myGeomShape->_is_nil() && (!myMesh->_is_nil() || !mySubMesh->_is_nil())) {
-    _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
-    //_PTR(SObject) aSO = aStudy->FindObjectIOR(aStudy->ConvertObjectToIOR(myGeomShape));
-    _PTR(SObject) aSO = aStudy->FindObjectID(myGeomShape->GetStudyEntry());
-    if (aSO) {
-      if (aSO->FindAttribute(anAttr, "AttributeName")) {
-       aName = anAttr;
-       LineEditC1A2->setText(QString(aName->Value().c_str()));
-      }
-    }
-  }
-}
-
-//=================================================================================
-// function : UpdateControlState()
-// purpose  :
-//=================================================================================
-void SMESHGUI_EditHypothesesDlg::UpdateControlState()
-{
-  // asl the check of "count" is commented because of PAL9787
-  bool isEnabled = (!myMesh->_is_nil() && !myGeomShape->_is_nil() /*&&
-                    ListHypAssignation->count() && ListAlgoAssignation->count()*/ )
-    ||
-      (!mySubMesh->_is_nil() && !myGeomShape->_is_nil() /*&&
-       (ListHypAssignation->count() || ListAlgoAssignation->count())*/);
-
-  buttonOk   ->setEnabled(myNbModification && isEnabled && !myImportedMesh);
-  buttonApply->setEnabled(myNbModification && isEnabled && !myImportedMesh);
-
-  SelectButtonC1A2   ->setEnabled(ALLOW_CHANGE_SHAPE && !myImportedMesh);
-  LineEditC1A2       ->setEnabled(ALLOW_CHANGE_SHAPE && !myImportedMesh);
-  ListHypDefinition  ->setEnabled(!myImportedMesh);
-  ListHypAssignation ->setEnabled(!myImportedMesh);
-  ListAlgoDefinition ->setEnabled(!myImportedMesh);
-  ListAlgoAssignation->setEnabled(!myImportedMesh);
-}
-
-//=================================================================================
-// function : StoreMesh()
-// purpose  :
-//=================================================================================
-bool SMESHGUI_EditHypothesesDlg::StoreMesh()
-{
-  MapIOR anOldHypos, aNewHypos;
-  if (myGeomShape->_is_nil())
-    return false;
-
-  // 1. Check whether the geometric shape has changed
-  _PTR(SObject) aMeshSO = SMESH::FindSObject(myMesh);
-  GEOM::GEOM_Object_var aIniGeomShape = SMESH::GetShapeOnMeshOrSubMesh(aMeshSO);
-  bool bShapeChanged = aIniGeomShape->_is_nil() ||
-                       !aIniGeomShape->_is_equivalent(myGeomShape);
-  if (bShapeChanged) {
-    // VSR : TODO : Set new shape - not supported yet by SMESH engine
-    // 1. remove all old hypotheses and algorithms and also submeshes
-    // 2. set new shape
-  }
-
-  int nbFail = 0;
-  MapIOR::iterator it;
-
-  // 2. remove not used hypotheses from the mesh
-  for (it = myMapOldHypos.begin(); it != myMapOldHypos.end(); ++it) {
-    string ior = it->first;
-    int index = findItem(ListHypAssignation, ior);
-    if (index < 0) {
-      SMESH::SMESH_Hypothesis_var aHyp =
-        SMESH::IORToInterface<SMESH::SMESH_Hypothesis>(ior.c_str());
-      if (!aHyp->_is_nil()) {
-       if (!SMESH::RemoveHypothesisOrAlgorithmOnMesh(aMeshSO, aHyp))
-         nbFail++;
-      }
-    }
-  }
-
-  // 3. remove not used algorithms from the mesh
-  for (it = myMapOldAlgos.begin(); it != myMapOldAlgos.end(); ++it) {
-    string ior = it->first;
-    int index = findItem(ListAlgoAssignation, ior);
-    if (index < 0) {
-      SMESH::SMESH_Hypothesis_var aHyp =
-        SMESH::IORToInterface<SMESH::SMESH_Hypothesis>(ior.c_str());
-      if (!aHyp->_is_nil()) {
-       if (!SMESH::RemoveHypothesisOrAlgorithmOnMesh(aMeshSO, aHyp))
-         nbFail++;
-      }
-    }
-  }
-
-  // 4. Add new algorithms
-  for (int i = 0; i < ListAlgoAssignation->count(); i++) {
-    if (ListAlgoAssignation->item(i)->rtti() == ListBoxIOR::RTTI_IOR) {
-      ListBoxIOR* anItem = (ListBoxIOR*)(ListAlgoAssignation->item(i));
-      if (anItem) {
-       string ior = anItem->GetIOR();
-       if (myMapOldAlgos.find(ior) == myMapOldAlgos.end()) {
-         SMESH::SMESH_Hypothesis_var aHyp =
-            SMESH::IORToInterface<SMESH::SMESH_Hypothesis>(ior.c_str());
-         if (!aHyp->_is_nil()) {
-           if (!SMESH::AddHypothesisOnMesh(myMesh, aHyp))
-             nbFail++;
-         }
-       }
-      }
-    }
-  }
-
-  // 5. Add new hypotheses
-  for (int i = 0; i < ListHypAssignation->count(); i++) {
-    if (ListHypAssignation->item(i)->rtti() == ListBoxIOR::RTTI_IOR) {
-      ListBoxIOR* anItem = (ListBoxIOR*)(ListHypAssignation->item(i));
-      if (anItem) {
-       string ior = anItem->GetIOR();
-       if (myMapOldHypos.find(ior) == myMapOldHypos.end()) {
-         SMESH::SMESH_Hypothesis_var aHyp =
-            SMESH::IORToInterface<SMESH::SMESH_Hypothesis>(ior.c_str());
-         if (!aHyp->_is_nil()) {
-           if (!SMESH::AddHypothesisOnMesh(myMesh, aHyp))
-             nbFail++;
-         }
-       }
-      }
-    }
-  }
-  return (nbFail == 0);
-}
-
-//=================================================================================
-// function : StoreSubMesh()
-// purpose  :
-//=================================================================================
-bool SMESHGUI_EditHypothesesDlg::StoreSubMesh()
-{
-  MapIOR anOldHypos, aNewHypos;
-  if (myGeomShape->_is_nil())
-    return false;
-
-  // 1. Check whether the geometric shape has changed
-  _PTR(SObject) aSubMeshSO = SMESH::FindSObject(mySubMesh);
-  GEOM::GEOM_Object_var aIniGeomShape = SMESH::GetShapeOnMeshOrSubMesh(aSubMeshSO);
-  bool bShapeChanged = aIniGeomShape->_is_nil() || !aIniGeomShape->_is_equivalent(myGeomShape);
-  if (bShapeChanged) {
-    // VSR : TODO : Set new shape - not supported yet by engine
-    // 1. remove all old hypotheses and algorithms
-    // 2. set new shape
-  }
-  int nbFail = 0;
-  MapIOR::iterator it;
-
-  // 2. remove not used hypotheses from the submesh
-  for (it = myMapOldHypos.begin(); it != myMapOldHypos.end(); ++it) {
-    string ior = it->first;
-    int index = findItem(ListHypAssignation, ior);
-    if (index < 0) {
-      SMESH::SMESH_Hypothesis_var aHyp = SMESH::IORToInterface<SMESH::SMESH_Hypothesis>(ior.c_str());
-      if (!aHyp->_is_nil()) {
-       if (!SMESH::RemoveHypothesisOrAlgorithmOnMesh(aSubMeshSO, aHyp))
-         nbFail++;
-      }
-    }
-  }
-
-  // 3. remove not used algorithms from the submesh
-  for (it = myMapOldAlgos.begin(); it != myMapOldAlgos.end(); ++it) {
-    string ior = it->first;
-    int index = findItem(ListAlgoAssignation, ior);
-    if (index < 0) {
-      SMESH::SMESH_Hypothesis_var aHyp = SMESH::IORToInterface<SMESH::SMESH_Hypothesis>(ior.c_str());
-      if (!aHyp->_is_nil()){
-       if (!SMESH::RemoveHypothesisOrAlgorithmOnMesh(aSubMeshSO, aHyp))
-         nbFail++;
-      }
-    }
-  }
-
-  // 4. Add new algorithms
-  for (int i = 0; i < ListAlgoAssignation->count(); i++) {
-    if (ListAlgoAssignation->item(i)->rtti() == ListBoxIOR::RTTI_IOR) {
-      ListBoxIOR* anItem = (ListBoxIOR*)(ListAlgoAssignation->item(i));
-      if (anItem) {
-       string ior = anItem->GetIOR();
-       if (myMapOldAlgos.find(ior) == myMapOldAlgos.end()) {
-         SMESH::SMESH_Hypothesis_var aHyp = SMESH::IORToInterface<SMESH::SMESH_Hypothesis>(ior.c_str());
-         if (!aHyp->_is_nil()){
-           if (!SMESH::AddHypothesisOnSubMesh(mySubMesh, aHyp))
-             nbFail++;
-         }
-       }
-      }
-    }
-  }
-
-  // 5. Add new hypotheses
-  for (int i = 0; i < ListHypAssignation->count(); i++) {
-    if (ListHypAssignation->item(i)->rtti() == ListBoxIOR::RTTI_IOR) {
-      ListBoxIOR* anItem = (ListBoxIOR*)(ListHypAssignation->item(i));
-      if (anItem) {
-       string ior = anItem->GetIOR();
-       if (myMapOldHypos.find(ior) == myMapOldHypos.end()) {
-         SMESH::SMESH_Hypothesis_var aHyp = SMESH::IORToInterface<SMESH::SMESH_Hypothesis>(ior.c_str());
-         if (!aHyp->_is_nil()){
-           if (!SMESH::AddHypothesisOnSubMesh(mySubMesh, aHyp))
-             nbFail++;
-         }
-       }
-      }
-    }
-  }
-  return (nbFail == 0);
-}
diff --git a/src/SMESHGUI/SMESHGUI_EditHypothesesDlg.h b/src/SMESHGUI/SMESHGUI_EditHypothesesDlg.h
deleted file mode 100644 (file)
index 6fe085d..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-//  SMESH SMESHGUI : GUI for SMESH component
-//
-//  Copyright (C) 2003  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
-//
-//
-//
-//  File   : SMESHGUI_EditHypothesesDlg.h
-//  Author : Nicolas REJNERI
-//  Module : SMESH
-//  $Header$
-
-#ifndef DIALOGBOX_EDIT_HYPOTHESES_H
-#define DIALOGBOX_EDIT_HYPOTHESES_H
-
-//#include "SMESH_TypeFilter.hxx"
-#include "SUIT_SelectionFilter.h"
-#include "LightApp_SelectionMgr.h"
-
-// QT Includes
-#include <qdialog.h>
-
-// IDL Headers
-#include <SALOMEconfig.h>
-#include CORBA_SERVER_HEADER(GEOM_Gen)
-#include CORBA_SERVER_HEADER(SMESH_Mesh)
-
-#include <map>
-#include <string>
-
-class QGroupBox;
-class QLabel;
-class QLineEdit;
-class QPushButton;
-class QListBox;
-class QListBoxItem;
-class SMESHGUI;
-
-typedef map<std::string, int> MapIOR;
-
-//=================================================================================
-// class    : SMESHGUI_EditHypothesesDlg
-// purpose  :
-//=================================================================================
-class SMESHGUI_EditHypothesesDlg : public QDialog
-{
-    Q_OBJECT
-
-public:
-    SMESHGUI_EditHypothesesDlg (SMESHGUI*,
-                               const char* name = 0,
-                               bool modal = FALSE,
-                               WFlags fl = 0);
-    ~SMESHGUI_EditHypothesesDlg();
-
-protected:
-    virtual void closeEvent (QCloseEvent*);
-    virtual void enterEvent (QEvent*);
-
-private:
-    void Init();
-
-    void InitHypDefinition();
-    void InitAlgoDefinition();
-    void InitHypAssignation();
-    void InitAlgoAssignation();
-
-    void InitGeom();
-
-    void UpdateControlState();
-
-    bool StoreMesh();
-    bool StoreSubMesh();
-
-    bool IsOld(QListBoxItem* hypItem);
-
-private:
-    SMESHGUI*                     mySMESHGUI;
-    LightApp_SelectionMgr*        mySelectionMgr;
-
-    GEOM::GEOM_Object_var         myGeomShape;
-    QLineEdit*                    myEditCurrentArgument; 
-
-    SMESH::SMESH_Mesh_var         myMesh;
-    SMESH::SMESH_subMesh_var      mySubMesh;
-
-    //Handle(SALOME_TypeFilter)     myGeomFilter;
-    //Handle(SMESH_TypeFilter)      myMeshOrSubMeshFilter;
-    SUIT_SelectionFilter*         myGeomFilter;
-    SUIT_SelectionFilter*         myMeshOrSubMeshFilter;
-
-    MapIOR                        myMapOldHypos, myMapOldAlgos;
-    int                           myNbModification;
-
-    bool                          myImportedMesh;
-
-    QGroupBox*    GroupButtons;
-    QPushButton*  buttonOk;
-    QPushButton*  buttonApply;
-    QPushButton*  buttonCancel;
-
-    QGroupBox*    GroupC1;
-    QLabel*       TextLabelC1A1;
-    QPushButton*  SelectButtonC1A1;
-    QLineEdit*    LineEditC1A1;
-    QLabel*       TextLabelC1A2;
-    QPushButton*  SelectButtonC1A2;
-    QLineEdit*    LineEditC1A2;
-
-    QGroupBox*    GroupHypotheses;
-    QLabel*       TextHypDefinition;
-    QListBox*     ListHypDefinition;
-    QLabel*       TextHypAssignation;
-    QListBox*     ListHypAssignation;
-
-    QGroupBox*    GroupAlgorithms;
-    QLabel*       TextAlgoDefinition;
-    QListBox*     ListAlgoDefinition;
-    QLabel*       TextAlgoAssignation;
-    QListBox*     ListAlgoAssignation;
-
-private slots:
-    void ClickOnOk();
-    bool ClickOnApply();
-    void ClickOnCancel();
-    void SetEditCurrentArgument();
-    void SelectionIntoArgument();
-    void DeactivateActiveDialog();
-    void ActivateThisDialog();
-
-    void removeItem(QListBoxItem*);
-    void addItem(QListBoxItem*);
-};
-
-#endif // DIALOGBOX_EDIT_HYPOTHESES_H
index 0109f1da34b62c1952bb9ae3206a1d202f6d857f..46279b662d4e09332c35749b3558a30f7856f642 100644 (file)
@@ -28,6 +28,9 @@
 
 #include "SUIT_Desktop.h"
 #include "SUIT_Session.h"
+#include "SUIT_MessageBox.h"
+
+#include "SalomeApp_Application.h"
 
 #include "SALOME_ListIO.hxx"
 
@@ -103,6 +106,10 @@ SMESHGUI_EditMeshDlg::SMESHGUI_EditMeshDlg (SMESHGUI* theModule,
   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);
@@ -149,6 +156,8 @@ SMESHGUI_EditMeshDlg::SMESHGUI_EditMeshDlg (SMESHGUI* theModule,
   GroupMeshLayout->addWidget(LineEditMesh, 0, 2);
   DlgLayout->addWidget(GroupMesh, 1, 0);
 
+  myHelpFileName = "/files/merging_nodes.htm";// merging_elements.htm
+
   Init(); // Initialisations
 }
 
@@ -178,6 +187,7 @@ void SMESHGUI_EditMeshDlg::Init()
   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()));
 
@@ -242,6 +252,23 @@ void SMESHGUI_EditMeshDlg::ClickOnCancel()
   reject();
 }
 
+//=================================================================================
+// function : ClickOnHelp()
+// purpose  :
+//=================================================================================
+void SMESHGUI_EditMeshDlg::ClickOnHelp()
+{
+  SalomeApp_Application* app = (SalomeApp_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
index 839b3fd7c4665f3d4a8174ef1032ea5dfa6ffdd3..19069bf21bc15f686ec7eaf5859db63d3ee6d363 100644 (file)
@@ -80,6 +80,7 @@ class SMESHGUI_EditMeshDlg : public QDialog
   QPushButton* buttonOk;
   QPushButton* buttonCancel;
   QPushButton* buttonApply;
+  QPushButton* buttonHelp;
 
   QGroupBox* GroupMesh;
   QLabel* TextLabelMesh;
@@ -92,10 +93,13 @@ class SMESHGUI_EditMeshDlg : public QDialog
   QGridLayout* GroupButtonsLayout;
   QGridLayout* GroupMeshLayout;
 
+  QString myHelpFileName;
+
  private slots:
   void ClickOnOk();
   void ClickOnCancel();
   void ClickOnApply();
+  void ClickOnHelp();
   void SelectionIntoArgument();
   void DeactivateActiveDialog();
   void ActivateThisDialog();
index 47b8e91ed8e82df4b16e0fac65d3d6110bfd5416..7cdd7f86a6f3c3a54f63cea28cb1f6da0227412d 100644 (file)
@@ -48,6 +48,9 @@
 #include "SUIT_OverrideCursor.h"
 #include "SUIT_Desktop.h"
 #include "SUIT_MessageBox.h"
+#include "SUIT_Session.h"
+
+#include "SalomeApp_Application.h"
 
 #include "SVTK_ViewModel.h"
 #include "SVTK_ViewWindow.h"
@@ -295,10 +298,14 @@ SMESHGUI_ExtrusionAlongPathDlg::SMESHGUI_ExtrusionAlongPathDlg( SMESHGUI* theMod
   CloseButton = new QPushButton(tr("SMESH_BUT_CLOSE"), GroupButtons);
   CloseButton->setAutoDefault(true);
 
+  HelpButton = new QPushButton(tr("SMESH_BUT_HELP"), GroupButtons);
+  HelpButton->setAutoDefault(true);
+
   // layouting
   GroupButtonsLayout->addWidget(OkButton,    0, 0);
   GroupButtonsLayout->addWidget(ApplyButton, 0, 1);
   GroupButtonsLayout->addWidget(CloseButton, 0, 3);
+  GroupButtonsLayout->addWidget(HelpButton, 0, 4);
   GroupButtonsLayout->addColSpacing(2, 10);
   GroupButtonsLayout->setColStretch(2, 10);
 
@@ -330,6 +337,8 @@ SMESHGUI_ExtrusionAlongPathDlg::SMESHGUI_ExtrusionAlongPathDlg( SMESHGUI* theMod
   myElementsFilter = new SMESH_LogicalFilter (aListOfFilters, SMESH_LogicalFilter::LO_OR);
   myPathMeshFilter = new SMESH_TypeFilter (MESH);
 
+  myHelpFileName = "extrusion_along_a_path.htm";
+
   Init();
 
   /***************************************************************/
@@ -337,6 +346,7 @@ SMESHGUI_ExtrusionAlongPathDlg::SMESHGUI_ExtrusionAlongPathDlg( SMESHGUI* theMod
   connect(OkButton,     SIGNAL(clicked()), this, SLOT(ClickOnOk()));
   connect(CloseButton,  SIGNAL(clicked()), this, SLOT(reject()));
   connect(ApplyButton,  SIGNAL(clicked()), this, SLOT(ClickOnApply()));
+  connect(HelpButton,   SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
 
   connect(AddAngleButton,    SIGNAL(clicked()), this, SLOT(OnAngleAdded()));
   connect(RemoveAngleButton, SIGNAL(clicked()), this, SLOT(OnAngleRemoved()));
@@ -654,6 +664,23 @@ void SMESHGUI_ExtrusionAlongPathDlg::ClickOnOk()
     reject();
 }
 
+//=================================================================================
+// function : ClickOnHelp()
+// purpose  :
+//=================================================================================
+void SMESHGUI_ExtrusionAlongPathDlg::ClickOnHelp()
+{
+  SalomeApp_Application* app = (SalomeApp_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 : reject()
 // purpose  : Called when dialog box is closed
index 57f7be3b7f22b17474be87d974f9be3fd0a2ec2f..7bbb8ce23fe2aae406ee7430c19f57e2e00cc469 100644 (file)
@@ -142,6 +142,9 @@ private:
   QPushButton*      OkButton;
   QPushButton*      ApplyButton;
   QPushButton*      CloseButton;
+  QPushButton*      HelpButton;
+
+  QString           myHelpFileName;
 
 protected slots:
   void reject();
@@ -150,6 +153,7 @@ private slots:
   void ConstructorsClicked (int);
   void ClickOnOk();
   bool ClickOnApply();
+  void ClickOnHelp();
   void SetEditCurrentArgument();
   void SelectionIntoArgument();
   void DeactivateActiveDialog();
index 4dd94bcf21c55cd4cdd415c7809e0aee2286c93b..804daba55677bbf9c55cbeca050b4174d7069b9f 100644 (file)
@@ -46,6 +46,9 @@
 #include "SUIT_OverrideCursor.h"
 #include "SUIT_Desktop.h"
 #include "SUIT_MessageBox.h"
+#include "SUIT_Session.h"
+
+#include "SalomeApp_Application.h"
 
 #include "SVTK_ViewModel.h"
 #include "SVTK_ViewWindow.h"
@@ -134,6 +137,10 @@ SMESHGUI_ExtrusionDlg::SMESHGUI_ExtrusionDlg (SMESHGUI* theModule,
   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);
@@ -246,6 +253,8 @@ SMESHGUI_ExtrusionDlg::SMESHGUI_ExtrusionDlg (SMESHGUI* theModule,
   myMeshOrSubMeshOrGroupFilter =
     new SMESH_LogicalFilter (aListOfFilters, SMESH_LogicalFilter::LO_OR);
 
+  myHelpFileName = "extrusion.htm";
+
   Init();
 
   /***************************************************************/
@@ -253,6 +262,7 @@ SMESHGUI_ExtrusionDlg::SMESHGUI_ExtrusionDlg (SMESHGUI* theModule,
   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()));
 
   // to update state of the Ok & Apply buttons
   connect(SpinBox_Dx, SIGNAL(valueChanged(double)), SLOT(CheckIsEnable()));
@@ -438,6 +448,23 @@ void SMESHGUI_ExtrusionDlg::ClickOnCancel()
   reject();
 }
 
+//=================================================================================
+// function : ClickOnHelp()
+// purpose  :
+//=================================================================================
+void SMESHGUI_ExtrusionDlg::ClickOnHelp()
+{
+  SalomeApp_Application* app = (SalomeApp_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 : onTextChange()
 // purpose  :
index 0c0d6778ada35d102981c9028e60ed8ceb18d6ea..3e2d421c0519c555d52c0caa4a24dbb06f12f832 100644 (file)
@@ -111,6 +111,9 @@ private:
   QPushButton*      buttonOk;
   QPushButton*      buttonCancel;
   QPushButton*      buttonApply;
+  QPushButton*      buttonHelp;
+
+  QString           myHelpFileName;
 
 private slots:
   void ConstructorsClicked (int);
@@ -118,6 +121,7 @@ private slots:
   void ClickOnOk();
   bool ClickOnApply();
   void ClickOnCancel();
+  void ClickOnHelp();
   void SetEditCurrentArgument();
   void SelectionIntoArgument();
   void DeactivateActiveDialog();
index 547eae30bdd6738d74cdb75442be1e0f6775b83d..eba123836e4e998b6d1d1e2e8f311515fc833210 100755 (executable)
@@ -44,6 +44,8 @@
 
 #include "SUIT_Desktop.h"
 #include "SUIT_ResourceMgr.h"
+#include "SUIT_Session.h"
+#include "SUIT_MessageBox.h"
 
 #include "SalomeApp_Application.h"
 #include "SalomeApp_Tools.h"
@@ -1695,6 +1697,8 @@ void SMESHGUI_FilterDlg::construct (const QValueList<int>& theTypes)
 
   aDlgLay->setStretchFactor(myMainFrame, 1);
 
+  myHelpFileName = "selection_filter_library.htm";
+
   Init(myTypes);
 }
 
@@ -1790,11 +1794,13 @@ QFrame* SMESHGUI_FilterDlg::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()));
 
   updateMainButtons();
 
@@ -1939,6 +1945,23 @@ void SMESHGUI_FilterDlg::onClose()
   return;
 }
 
+//=================================================================================
+// function : onHelp()
+// purpose  :
+//=================================================================================
+void SMESHGUI_FilterDlg::onHelp()
+{
+  SalomeApp_Application* app = (SalomeApp_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_FilterDlg::onDeactivate
 // Purpose : SLOT called when dialog must be deativated
index d74fc689cb59f590c4a9e101adc4f9e419083e76..5c1cfd5b56aad8d9934eb542d241ebf4ae667b04 100755 (executable)
@@ -221,7 +221,7 @@ class SMESHGUI_FilterDlg : public QDialog
   enum { Mesh, Selection, Dialog, None };
 
   // Buttons
-  enum { BTN_OK, BTN_Cancel, BTN_Apply, BTN_Close };
+  enum { BTN_OK, BTN_Cancel, BTN_Apply, BTN_Close, BTN_Help };
 
 public:
                             SMESHGUI_FilterDlg( SMESHGUI*,
@@ -251,6 +251,7 @@ private slots:
   void                      onOk();
   bool                      onApply();
   void                      onClose();
+  void                      onHelp();
   void                      onDeactivate();
   void                      onSelectionDone();
   void                      onCriterionChanged (const int, const int);
@@ -309,6 +310,8 @@ private:
   QMap< int, SMESH::Filter_var > myFilter;
   QMap< int, bool >              myInsertState;
   QMap< int, int  >              myApplyToState;
+
+  QString                   myHelpFileName;
 };
 
 #endif
index 75b97b4c6819313313dfcee59ba6936ea3feb996..96fa90b0623553d69977e4be8f9fc9180433664f 100644 (file)
@@ -34,6 +34,9 @@
 #include "SUIT_Session.h"
 #include "SUIT_Desktop.h"
 #include "SUIT_FileDlg.h"
+#include "SUIT_MessageBox.h"
+
+#include "SalomeApp_Application.h"
 
 // QT Includes
 #include <qapplication.h>
@@ -144,6 +147,8 @@ void SMESHGUI_FilterLibraryDlg::construct (const QValueList<int>& 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<int, QPushButton*>::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()
+{
+  SalomeApp_Application* app = (SalomeApp_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
index 8fbc6f9981cc6cc7a0d5525442cd43f8c96281a5..8fd9700b062d9496e2935a45e96fdf323313f685 100644 (file)
@@ -53,7 +53,7 @@ class SMESHGUI_FilterLibraryDlg : public QDialog
   Q_OBJECT
   
   // Buttons
-  enum { BTN_OK, BTN_Cancel, BTN_Apply, BTN_Close };
+  enum { BTN_OK, BTN_Cancel, BTN_Apply, BTN_Close, BTN_Help };
 
   class Dialog;
   
@@ -94,6 +94,7 @@ private slots:
   void                        onOk();
   bool                        onApply();
   void                        onClose();
+  void                        onHelp();
 
   void                        onDeactivate();
   
@@ -152,6 +153,7 @@ private:
   QString                     myCurrFilterName;
   int                         myCurrFilter;
 
+  QString                     myHelpFileName;
 };
 
 #endif
index a38692b5b722e5ddea0d098141f74dac719a11a4..5d261dbbbdfbcc8b5314a90970dbd788b9f65a62 100644 (file)
 
 #include "SUIT_Desktop.h"
 #include "SUIT_ResourceMgr.h"
+#include "SUIT_Session.h"
+#include "SUIT_MessageBox.h"
 
 #include "SalomeApp_Tools.h"
+#include "SalomeApp_Application.h"
 #include "SALOMEDSClient_Study.hxx"
 #include "SALOME_ListIO.hxx"
 #include "SALOME_ListIteratorOfListIO.hxx"
@@ -130,6 +133,9 @@ SMESHGUI_GroupDlg::SMESHGUI_GroupDlg( SMESHGUI* theModule, const char* name,
     myCurrentLineEdit = myMeshGroupLine;
     setSelectionMode(5);
   }
+
+  bool isEditMode = !CORBA::is_nil( myGroupOnGeom );
+  myHelpFileName = isEditMode ? "/files/editing_groups.htm" : "/files/creating_groups.htm";
 }
 
 //=================================================================================
@@ -332,11 +338,15 @@ void SMESHGUI_GroupDlg::initDialog(bool create)
   QPushButton* aCloseBtn = new QPushButton(aButtons, "close");
   aCloseBtn->setText(tr("SMESH_BUT_CLOSE"));
   aCloseBtn->setAutoDefault(true);
+  QPushButton* aHelpBtn = new QPushButton(aButtons, "help");
+  aHelpBtn->setText(tr("SMESH_BUT_HELP"));
+  aHelpBtn->setAutoDefault(true);
 
   aBtnLayout->addWidget(aOKBtn);
   aBtnLayout->addWidget(aApplyBtn);
   aBtnLayout->addStretch();
   aBtnLayout->addWidget(aCloseBtn);
+  aBtnLayout->addWidget(aHelpBtn);
 
   /***************************************************************/
   aMainLayout->addWidget(meshGroupLab,    0, 0);
@@ -377,6 +387,7 @@ void SMESHGUI_GroupDlg::initDialog(bool create)
   connect(aOKBtn, SIGNAL(clicked()), this, SLOT(onOK()));
   connect(aApplyBtn, SIGNAL(clicked()), this, SLOT(onApply()));
   connect(aCloseBtn, SIGNAL(clicked()), this, SLOT(onClose()));
+  connect(aHelpBtn, SIGNAL(clicked()), this, SLOT(onHelp()));
 
   /* Init selection */
   mySMESHGUI->SetActiveDialogBox(this);
@@ -1544,6 +1555,23 @@ void SMESHGUI_GroupDlg::onClose()
   reject();
 }
 
+//=================================================================================
+// function : onHelp()
+// purpose  :
+//=================================================================================
+void SMESHGUI_GroupDlg::onHelp()
+{
+  SalomeApp_Application* app = (SalomeApp_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 : SMESHGUI_GroupDlg::onDeactivate
 // purpose  : SLOT called when dialog must be deativated
index 3d741d43d0eb6a25034436d7842262ee24349272..b0b33e8911e3520d9470d91b4713dc0f20ee1630 100644 (file)
@@ -87,6 +87,7 @@ private slots:
     void onOK();
     void onClose();
     bool onApply();
+    void onHelp();
     void onDeactivate();
 
     void onListSelectionChanged();
@@ -167,6 +168,8 @@ private:
     SMESHGUI_FilterDlg*           myFilterDlg;
 
     bool                          myCreate, myIsBusy;
+
+    QString                       myHelpFileName;
 };
 
 #endif // DIALOGBOX_GROUP_H
index a43bb38ade2de02fb51af301ddd4476f6359396d..cb9272ddc406d610adc826db0460363429855287 100644 (file)
 
 #include "SUIT_ResourceMgr.h"
 #include "SUIT_Desktop.h"
+#include "SUIT_Session.h"
+#include "SUIT_MessageBox.h"
+
+#include "SalomeApp_Application.h"
 
 #include "LightApp_SelectionMgr.h"
 #include "SVTK_Selection.h"
@@ -72,9 +76,18 @@ SMESHGUI_GroupOpDlg::SMESHGUI_GroupOpDlg( SMESHGUI* theModule, const int theMode
 {
   myMode = theMode;
 
-  if (myMode == UNION) setCaption(tr("UNION_OF_TWO_GROUPS"));
-  else if (myMode == INTERSECT) setCaption(tr("INTERSECTION_OF_TWO_GROUPS"));
-  else setCaption(tr("CUT_OF_TWO_GROUPS"));
+  if (myMode == UNION) {
+    setCaption(tr("UNION_OF_TWO_GROUPS"));
+    myHelpFileName = "/files/using_operations_on_groups.htm#Union";
+  }
+  else if (myMode == INTERSECT) {
+    setCaption(tr("INTERSECTION_OF_TWO_GROUPS"));
+    myHelpFileName = "/files/using_operations_on_groups.htm#Intersection";
+  }
+  else {
+    setCaption(tr("CUT_OF_TWO_GROUPS"));
+    myHelpFileName = "/files/using_operations_on_groups.htm#Cut";
+  }
 
   mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
 
@@ -139,6 +152,7 @@ QFrame* SMESHGUI_GroupOpDlg::createButtonFrame (QWidget* theParent)
   myOkBtn     = new QPushButton(tr("SMESH_BUT_OK"   ), aFrame);
   myApplyBtn  = new QPushButton(tr("SMESH_BUT_APPLY"), aFrame);
   myCloseBtn  = new QPushButton(tr("SMESH_BUT_CLOSE"), aFrame);
+  myHelpBtn  = new QPushButton(tr("SMESH_BUT_HELP"), aFrame);
 
   QSpacerItem* aSpacer = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum);
 
@@ -148,11 +162,13 @@ QFrame* SMESHGUI_GroupOpDlg::createButtonFrame (QWidget* theParent)
   aLay->addWidget(myApplyBtn);
   aLay->addItem(aSpacer);
   aLay->addWidget(myCloseBtn);
+  aLay->addWidget(myHelpBtn);
 
   // connect signals and slots
   connect(myOkBtn,    SIGNAL(clicked()), SLOT(onOk()));
   connect(myCloseBtn, SIGNAL(clicked()), SLOT(onClose()));
   connect(myApplyBtn, SIGNAL(clicked()), SLOT(onApply()));
+  connect(myHelpBtn, SIGNAL(clicked()), SLOT(onHelp()));
 
   return aFrame;
 }
@@ -291,6 +307,23 @@ void SMESHGUI_GroupOpDlg::onClose()
   reject();
 }
 
+//=================================================================================
+// function : onHelp()
+// purpose  :
+//=================================================================================
+void SMESHGUI_GroupOpDlg::onHelp()
+{
+  SalomeApp_Application* app = (SalomeApp_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_GroupOpDlg::onSelectionDone
 // Purpose : SLOT called when selection changed
index 7a62a35b31bb2ba2d0e3524c38b045cce633423b..6d4bb2f91b8dc83532ba08fc01068b743feada06 100644 (file)
@@ -70,6 +70,7 @@ private slots:
   void                      onOk();
   bool                      onApply();
   void                      onClose();
+  void                      onHelp();
 
   void                      onDeactivate();
   void                      onSelectionDone();
@@ -87,6 +88,7 @@ private:
   QPushButton*              myOkBtn;
   QPushButton*              myApplyBtn;
   QPushButton*              myCloseBtn;
+  QPushButton*              myHelpBtn;
   
   QLineEdit*                myNameEdit;
   QLineEdit*                myEdit1;
@@ -104,6 +106,8 @@ private:
   SMESH::SMESH_GroupBase_var    myGroup1;
   SMESH::SMESH_GroupBase_var    myGroup2;
   
+  QString                   myHelpFileName;
+  
 };
 
 #endif
index 6926df448de536fb44cb2805724580b9a1310c81..2a115951b4d596c5ff1e00609ea1230cb97435d6 100644 (file)
@@ -8,8 +8,15 @@
 #include <SALOMEDSClient_Study.hxx>
 #include <utilities.h>
 
+#include <SMESHGUI.h>
+
 #include <QtxIntSpinBox.h>
 
+#include <SUIT_Session.h>
+#include <SUIT_MessageBox.h>
+
+#include <SalomeApp_Application.h>
+
 #include <qframe.h>
 #include <qlayout.h>
 #include <qlineedit.h>
@@ -344,7 +351,7 @@ bool SMESHGUI_GenericHypothesisCreator::getParamFromCustomWidget( StdParam& , QW
 
 
 SMESHGUI_HypothesisDlg::SMESHGUI_HypothesisDlg( SMESHGUI_GenericHypothesisCreator* creator, QWidget* parent )
-: QtxDialog( parent, "", true, true, QtxDialog::OKCancel ),
+: QtxDialog( parent, "", true, true ),
   myCreator( creator )
 {
   setMinimumSize( 300, height() );
@@ -366,6 +373,29 @@ SMESHGUI_HypothesisDlg::SMESHGUI_HypothesisDlg( SMESHGUI_GenericHypothesisCreato
   titLay->addStretch( 1 );
 
   myLayout->addWidget( titFrame, 0 );
+
+  QString aHypType = creator->hypType();
+  if ( aHypType == "LocalLength" )
+    myHelpFileName = "/files/arithmetic_1d.htm#?";
+  else if ( aHypType == "Arithmetic1D")
+    myHelpFileName = "/files/arithmetic_1d.htm#?";
+  else if ( aHypType == "MaxElementArea")
+    myHelpFileName = "/files/max._element_area_hypothesis.htm";
+  else if ( aHypType == "MaxElementVolume")
+    myHelpFileName = "/files/max._element_volume_hypothsis.htm";
+  else if ( aHypType == "StartEndLength")
+    myHelpFileName = "/files/arithmetic_1d.htm#?";
+  else if ( aHypType == "Deflection1D")
+    myHelpFileName = "/files/arithmetic_1d.htm#?";
+  else if ( aHypType == "AutomaticLength")
+    myHelpFileName = "/files/arithmetic_1d.htm#?";
+  else if ( aHypType == "NumberOfSegments")
+    myHelpFileName = "/files/arithmetic_1d.htm#?";
+  else
+    myHelpFileName = "";
+
+  connect( this, SIGNAL( dlgHelp() ), this, SLOT( onHelp() ) );
+
 }
 
 SMESHGUI_HypothesisDlg::~SMESHGUI_HypothesisDlg()
@@ -387,6 +417,21 @@ void SMESHGUI_HypothesisDlg::accept()
     QtxDialog::accept();
 }
 
+void SMESHGUI_HypothesisDlg::onHelp()
+{
+  SalomeApp_Application* app = (SalomeApp_Application*)(SUIT_Session::session()->activeApplication());
+  if (app) {
+    SMESHGUI* aSMESHGUI = dynamic_cast<SMESHGUI*>( app->activeModule() );
+    app->onHelpContextModule(aSMESHGUI ? app->moduleName(aSMESHGUI->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"));
+  }
+}
+
 void SMESHGUI_HypothesisDlg::setHIcon( const QPixmap& p )
 {
   myIconLabel->setPixmap( p );  
index d47422a4a1c1456c24803f42b90c47c6ac9d5474..b62ccdbd0a7087de42f35a57f3ec8caabe10ba1c 100644 (file)
@@ -113,11 +113,13 @@ public:
 
 protected slots:
   virtual void accept();
+  void onHelp(); 
 
 private:
   SMESHGUI_GenericHypothesisCreator*   myCreator;
   QVBoxLayout*                         myLayout;
   QLabel                              *myIconLabel, *myTypeLabel;
+  QString                              myHelpFileName;
 };
 
 /*!
index d089d8cbd690d64ed7d242303135cadd85d1bb21..d05a145d7c4702b76da8fa4c2507b574b213c342 100644 (file)
 #include "GEOMBase.h"
 
 #include "SUIT_ResourceMgr.h"
+#include "SUIT_Session.h"
+#include "SUIT_MessageBox.h"
+
+#include "SalomeApp_Application.h"
 
 #include "SVTK_ViewModel.h"
 #include "SVTK_ViewWindow.h"
@@ -129,6 +133,10 @@ SMESHGUI_MergeNodesDlg::SMESHGUI_MergeNodesDlg( SMESHGUI* theModule, const char*
   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);
@@ -257,6 +265,7 @@ SMESHGUI_MergeNodesDlg::SMESHGUI_MergeNodesDlg( SMESHGUI* theModule, const char*
   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(SelectMeshButton, SIGNAL (clicked()), this, SLOT(SetEditCurrentArgument()));
   connect(DetectButton, SIGNAL (clicked()), this, SLOT(onDetect()));
@@ -281,6 +290,8 @@ SMESHGUI_MergeNodesDlg::SMESHGUI_MergeNodesDlg( SMESHGUI* theModule, const char*
 
   // Init Mesh field from selection
   SelectionIntoArgument();
+
+  myHelpFileName = "/files/merging_nodes.htm";
 }
 
 //=================================================================================
@@ -364,6 +375,23 @@ void SMESHGUI_MergeNodesDlg::ClickOnCancel()
   reject();
 }
 
+//=================================================================================
+// function : ClickOnHelp()
+// purpose  :
+//=================================================================================
+void SMESHGUI_MergeNodesDlg::ClickOnHelp()
+{
+  SalomeApp_Application* app = (SalomeApp_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 : onEditNodesGroup()
 // purpose  :
index 457259574062e0f0a27e5c72957650ca1cf582f0..151ce9b153ad842bc77cbdf86c4dfc57052eb5ea 100644 (file)
@@ -98,6 +98,7 @@ private:
     QPushButton*      buttonOk;
     QPushButton*      buttonCancel;
     QPushButton*      buttonApply;
+    QPushButton*      buttonHelp;
     QGroupBox*        GroupMesh;
     QGroupBox*        GroupCoincident;
     QGroupBox*        GroupEdit;
@@ -112,12 +113,15 @@ private:
     QListView*        ListCoincident;
     QListBox*         ListEdit;
     SMESHGUI_SpinBox* SpinBoxTolerance;
+
+    QString           myHelpFileName;
    
 private slots:
 
     void ClickOnOk();
     void ClickOnCancel();
     bool ClickOnApply();
+    void ClickOnHelp();
     void updateControls();
     void onDetect();
     void onSelectNodesGroup();
index b1956dce0db591517d2f7762f24296f3299d6049..f9e959623cacd199f6b69873890d72ac17fc0c68 100644 (file)
 #include "SUIT_Desktop.h"
 #include "SUIT_ResourceMgr.h"
 #include "SUIT_OverrideCursor.h"
+#include "SUIT_Session.h"
+#include "SUIT_MessageBox.h"
 
 #include "LightApp_SelectionMgr.h"
+#include "SalomeApp_Application.h"
 #include "SALOMEDSClient_Study.hxx"
 #include "SALOME_ListIO.hxx"
 
@@ -344,12 +347,15 @@ SMESHGUI_MeshInfosDlg::SMESHGUI_MeshInfosDlg (SMESHGUI* theModule,
   myButtonsGroupLayout->setAlignment(Qt::AlignTop);
   myButtonsGroupLayout->setSpacing(6); myButtonsGroupLayout->setMargin(11);
 
-  // buttons --> OK button
+  // buttons --> OK and Help buttons
   myOkBtn = new QPushButton(tr("SMESH_BUT_OK" ), myButtonsGroup, "myOkBtn");
   myOkBtn->setAutoDefault(TRUE); myOkBtn->setDefault(TRUE);
-  myButtonsGroupLayout->addStretch();
+  myHelpBtn = new QPushButton(tr("SMESH_BUT_HELP" ), myButtonsGroup, "myHelpBtn");
+  myHelpBtn->setAutoDefault(TRUE);
+
   myButtonsGroupLayout->addWidget(myOkBtn);
   myButtonsGroupLayout->addStretch();
+  myButtonsGroupLayout->addWidget(myHelpBtn);
 
   aTopLayout->addLayout(aSelectLayout);
   aTopLayout->addWidget(myWGStack);
@@ -359,6 +365,7 @@ SMESHGUI_MeshInfosDlg::SMESHGUI_MeshInfosDlg (SMESHGUI* theModule,
 
   // connect signals
   connect(myOkBtn,                 SIGNAL(clicked()),                      this, SLOT(close()));
+  connect( myHelpBtn,              SIGNAL(clicked()),                      this, SLOT(onHelp()));
   connect(mySelectBtn,             SIGNAL(clicked()),                      this, SLOT(onStartSelection()));
   connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()),        this, SLOT(close()));
   connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
@@ -368,6 +375,8 @@ SMESHGUI_MeshInfosDlg::SMESHGUI_MeshInfosDlg (SMESHGUI* theModule,
 
   // init dialog with current selection
   onSelectionChanged();
+
+  myHelpFileName = "/files/viewing_mesh_info.htm#?";
 }
 
 //=================================================================================
@@ -524,3 +533,20 @@ void SMESHGUI_MeshInfosDlg::onStartSelection()
   myStartSelection = true;
   mySelectLab->setText(tr("INF_SELECT_OBJECT"));
 }
+
+//=================================================================================
+// function : onHelp()
+// purpose  :
+//=================================================================================
+void SMESHGUI_MeshInfosDlg::onHelp()
+{
+  SalomeApp_Application* app = (SalomeApp_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"));
+  }
+}
index 4ff11f1d9c3ea6789eff61fcd9af904c04d656b4..9907bec33e266828f10c000ce8caab8a00edbe02 100644 (file)
@@ -61,6 +61,7 @@ private slots:
     void DeactivateActiveDialog() ;
     void ActivateThisDialog();
     void onStartSelection();
+    void onHelp();
 
 private:
     SMESHGUI*               mySMESHGUI;
@@ -104,8 +105,11 @@ private:
     QLabel*       myGroupType;
     QLabel*       myGroupNb;
 
-    QGroupBox*   myButtonsGroup;
-    QPushButton* myOkBtn;
+    QGroupBox*    myButtonsGroup;
+    QPushButton*  myOkBtn;
+    QPushButton*  myHelpBtn;
+
+    QString       myHelpFileName;
 };
 
 #endif // SMESHGUI_MESHINFOSDLG_H
index 1bf664dfd35217daae8274445f434ecd47a45a9b..ac9183c07b7ecf2f37c724148e4ebbb34abb74b9 100644 (file)
@@ -208,6 +208,11 @@ void SMESHGUI_MeshOp::startOperation()
     }
     connect( myDlg, SIGNAL( hypoSet( const QString& )), SLOT( onHypoSet( const QString& )));
     connect( myDlg, SIGNAL( geomSelectionByMesh( bool )), SLOT( onGeomSelectionByMesh( bool )));
+
+    if ( myToCreate ) 
+      if ( myIsMesh ) myHelpFileName = "/files/constructing_meshes.htm";
+      else myHelpFileName = "/files/constructing_submeshes.htm";
+    else myHelpFileName = "files/reassigning_hypotheses_and_algorithms.htm";
   }
   SMESHGUI_SelectionOp::startOperation();
 
@@ -1501,12 +1506,12 @@ void SMESHGUI_MeshOp::onPublishShapeByMeshDlg()
     if ( !aGeomVar->_is_nil() )
     {
       QString ID = aGeomVar->GetStudyEntry();
-      if ( _PTR(SObject) aGeomSO = studyDS()->FindObjectID( ID )) {
+      if ( _PTR(SObject) aGeomSO = studyDS()->FindObjectID( ID.latin1() )) {
         SMESH::SMESH_Mesh_ptr aMeshPtr = myShapeByMeshDlg->GetMesh();
         if ( !CORBA::is_nil( aMeshPtr )) {
           if (_PTR(SObject) aMeshSO = SMESH::FindSObject( aMeshPtr )) {
             myDlg->activateObject( SMESHGUI_MeshDlg::Mesh );
-            myDlg->selectObject( aMeshSO->GetName(), SMESHGUI_MeshDlg::Mesh, aMeshSO->GetID() );
+            myDlg->selectObject( aMeshSO->GetName().c_str(), SMESHGUI_MeshDlg::Mesh, aMeshSO->GetID().c_str() );
           }
         }
         myDlg->activateObject( SMESHGUI_MeshDlg::Geom );
index 53e8c25a783c7c09a0cb728a9c1ee60ec210b0ca..45ed7b42e106455a6713eba66b3a4f3ba3882875 100755 (executable)
 #include "SUIT_ResourceMgr.h"
 #include "SUIT_Desktop.h"
 #include "SUIT_FileDlg.h"
+#include "SUIT_Session.h"
+#include "SUIT_MessageBox.h"
 
 #include "LightApp_SelectionMgr.h"
 #include "SalomeApp_Tools.h"
 #include "SalomeApp_Study.h"
+#include "SalomeApp_Application.h"
 
 #include "SALOMEDS_SObject.hxx"
 
@@ -129,6 +132,8 @@ SMESHGUI_MeshPatternDlg::SMESHGUI_MeshPatternDlg( SMESHGUI*   theModule,
 
   mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
 
+  myHelpFileName = "pattern_mapping.htm";
+
   Init();
 }
 
@@ -290,6 +295,7 @@ QFrame* SMESHGUI_MeshPatternDlg::createButtonFrame (QWidget* theParent)
   myOkBtn     = new QPushButton(tr("SMESH_BUT_OK"   ), aFrame);
   myApplyBtn  = new QPushButton(tr("SMESH_BUT_APPLY"), aFrame);
   myCloseBtn  = new QPushButton(tr("SMESH_BUT_CLOSE"), aFrame);
+  myHelpBtn   = new QPushButton(tr("SMESH_BUT_HELP"), aFrame);
 
   QSpacerItem* aSpacer = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum);
 
@@ -299,10 +305,12 @@ QFrame* SMESHGUI_MeshPatternDlg::createButtonFrame (QWidget* theParent)
   aLay->addWidget(myApplyBtn);
   aLay->addItem(aSpacer);
   aLay->addWidget(myCloseBtn);
+  aLay->addWidget(myHelpBtn);
 
   connect(myOkBtn,    SIGNAL(clicked()), SLOT(onOk()));
   connect(myCloseBtn, SIGNAL(clicked()), SLOT(onClose()));
   connect(myApplyBtn, SIGNAL(clicked()), SLOT(onApply()));
+  connect(myHelpBtn,  SIGNAL(clicked()), SLOT(onHelp()));
 
   return aFrame;
 }
@@ -472,6 +480,23 @@ void SMESHGUI_MeshPatternDlg::onClose()
   reject();
 }
 
+//=================================================================================
+// function : onHelp()
+// purpose  :
+//=================================================================================
+void SMESHGUI_MeshPatternDlg::onHelp()
+{
+  SalomeApp_Application* app = (SalomeApp_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_MeshPatternDlg::onSelectionDone
 // Purpose : SLOT called when selection changed
index 106dc8b27717173f069e4ced20608d7013c439e5..841bb0bf087e6b27804d795f95f5cdae2d0e309d 100755 (executable)
@@ -82,6 +82,7 @@ private slots:
   void                                onOk();
   bool                                onApply();
   void                                onClose();
+  void                                onHelp();
 
   void                                onDeactivate();
 
@@ -125,6 +126,7 @@ private:
   QPushButton*                        myOkBtn;
   QPushButton*                        myApplyBtn;
   QPushButton*                        myCloseBtn;
+  QPushButton*                        myHelpBtn;
 
   QButtonGroup*                       myTypeGrp;
   QRadioButton*                       mySwitch2d;
@@ -171,6 +173,8 @@ private:
   SMESHGUI_CreatePatternDlg*          myCreationDlg;
   SMESH::SMESH_Pattern_var            myPattern;
   SALOME_Actor*                       myPreviewActor;
+
+  QString                             myHelpFileName;
 };
 
 #endif
index c51f499048722dfcf54946cb890d2835c35ac7fb..e68270916026cd4f7d84a9b7a70e68dc93015914 100644 (file)
 #include "SMDS_MeshNode.hxx"
 
 #include "LightApp_SelectionMgr.h"
+#include "SalomeApp_Application.h"
 #include "SUIT_ResourceMgr.h"
 #include "SUIT_Desktop.h"
+#include "SUIT_Session.h"
+#include "SUIT_MessageBox.h"
 
 #include "SVTK_Selector.h"
 #include "SVTK_ViewModel.h"
@@ -114,6 +117,8 @@ SMESHGUI_MoveNodesDlg::SMESHGUI_MoveNodesDlg (SMESHGUI* theModule,
 
   mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
 
+  myHelpFileName = "/files/displacing_nodes.htm";
+
   Init();
 }
 
@@ -129,6 +134,7 @@ QFrame* SMESHGUI_MoveNodesDlg::createButtonFrame (QWidget* theParent)
   myOkBtn     = new QPushButton(tr("SMESH_BUT_OK"   ), aFrame);
   myApplyBtn  = new QPushButton(tr("SMESH_BUT_APPLY"), aFrame);
   myCloseBtn  = new QPushButton(tr("SMESH_BUT_CLOSE"), aFrame);
+  myHelpBtn   = new QPushButton(tr("SMESH_BUT_HELP"), aFrame);
 
   QSpacerItem* aSpacer = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum);
 
@@ -138,10 +144,12 @@ QFrame* SMESHGUI_MoveNodesDlg::createButtonFrame (QWidget* theParent)
   aLay->addWidget(myApplyBtn);
   aLay->addItem(aSpacer);
   aLay->addWidget(myCloseBtn);
+  aLay->addWidget(myHelpBtn);
 
   connect(myOkBtn,    SIGNAL(clicked()), SLOT(onOk()));
   connect(myCloseBtn, SIGNAL(clicked()), SLOT(onClose()));
   connect(myApplyBtn, SIGNAL(clicked()), SLOT(onApply()));
+  connect(myHelpBtn,  SIGNAL(clicked()), SLOT(onHelp()));
 
   return aFrame;
 }
@@ -331,6 +339,23 @@ void SMESHGUI_MoveNodesDlg::onClose()
   reject();
 }
 
+//=================================================================================
+// function : onHelp()
+// purpose  :
+//=================================================================================
+void SMESHGUI_MoveNodesDlg::onHelp()
+{
+  SalomeApp_Application* app = (SalomeApp_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_MoveNodesDlg::onTextChange
 // Purpose :
index d115e52ff8e222d38108c3beeb25bee6fbb429bb..d87d11e05c4906947d2b3def644a0db797ae6a82 100644 (file)
@@ -66,6 +66,7 @@ private slots:
   void                          onOk();
   bool                          onApply();
   void                          onClose();
+  void                          onHelp();
 
   void                          onDeactivate();
 
@@ -90,6 +91,7 @@ private:
   QPushButton*                  myOkBtn;
   QPushButton*                  myApplyBtn;
   QPushButton*                  myCloseBtn;
+  QPushButton*                  myHelpBtn;
   
   QLineEdit*                    myId;
   SMESHGUI_SpinBox*             myX;
@@ -103,6 +105,8 @@ private:
   SALOME_Actor*                 myPreviewActor;
   SMESH_Actor*                  myMeshActor;
   bool                          myBusy;
+
+  QString                       myHelpFileName;
 };
 
 #endif // DIALOGBOX_MOVE_NODES_H
index 7d1cb98084c17b4c326f064c97c461177cbdf571..b01e6f0742115a64a734e2a6c194950f8e4ca295 100755 (executable)
 
 #include "SUIT_ResourceMgr.h"
 #include "SUIT_Desktop.h"
+#include "SUIT_Session.h"
+#include "SUIT_MessageBox.h"
 
 #include "LightApp_SelectionMgr.h"
+#include "SalomeApp_Application.h"
 #include "SALOME_ListIO.hxx"
 #include "SALOME_ListIteratorOfListIO.hxx"
 
@@ -233,6 +236,7 @@ QFrame* SMESHGUI_MultiEditDlg::createButtonFrame (QWidget* theParent)
   myOkBtn     = new QPushButton (tr("SMESH_BUT_OK"   ), aFrame);
   myApplyBtn  = new QPushButton (tr("SMESH_BUT_APPLY"), aFrame);
   myCloseBtn  = new QPushButton (tr("SMESH_BUT_CLOSE"), aFrame);
+  myHelpBtn   = new QPushButton (tr("SMESH_BUT_HELP"), aFrame);
 
   QSpacerItem* aSpacer = new QSpacerItem (0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum);
 
@@ -242,6 +246,7 @@ QFrame* SMESHGUI_MultiEditDlg::createButtonFrame (QWidget* theParent)
   aLay->addWidget(myApplyBtn);
   aLay->addItem(aSpacer);
   aLay->addWidget(myCloseBtn);
+  aLay->addWidget(myHelpBtn);
 
   return aFrame;
 }
@@ -333,6 +338,7 @@ void SMESHGUI_MultiEditDlg::Init()
   connect(myOkBtn,    SIGNAL(clicked()), SLOT(onOk()));
   connect(myCloseBtn, SIGNAL(clicked()), SLOT(onClose()));
   connect(myApplyBtn, SIGNAL(clicked()), SLOT(onApply()));
+  connect(myHelpBtn,  SIGNAL(clicked()), SLOT(onHelp()));
 
   // selection and SMESHGUI
   connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(onSelectionDone()));
@@ -474,6 +480,23 @@ void SMESHGUI_MultiEditDlg::onClose()
   reject();
 }
 
+//=================================================================================
+// function : onHelp()
+// purpose  :
+//=================================================================================
+void SMESHGUI_MultiEditDlg::onHelp()
+{
+  SalomeApp_Application* app = (SalomeApp_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_MultiEditDlg::onSelectionDone
 // Purpose : SLOT called when selection changed
@@ -1034,6 +1057,7 @@ SMESHGUI_ChangeOrientationDlg
   SMESHGUI_MultiEditDlg(theModule, SMESHGUI_FaceFilter, true, theName)
 {
   setCaption(tr("CAPTION"));
+  myHelpFileName = "/files/changing_orientation_of_elements.htm";
 }
 
 SMESHGUI_ChangeOrientationDlg::~SMESHGUI_ChangeOrientationDlg()
@@ -1072,6 +1096,8 @@ SMESHGUI_UnionOfTrianglesDlg
   myMaxAngleSpin->SetValue(30.0);
 
   myCriterionGrp->show();
+
+  myHelpFileName = "/files/uniting_a_set_of_triangles.htm";
 }
 
 SMESHGUI_UnionOfTrianglesDlg::~SMESHGUI_UnionOfTrianglesDlg()
@@ -1110,6 +1136,8 @@ SMESHGUI_CuttingOfQuadsDlg
   connect(myGroupChoice    , SIGNAL(clicked(int))        , this, SLOT(onCriterionRB()));
   connect(myComboBoxFunctor, SIGNAL(activated(int))      , this, SLOT(onPreviewChk()));
   connect(this             , SIGNAL(ListContensChanged()), this, SLOT(onPreviewChk()));
+
+  myHelpFileName = "/files/cutting_quadrangles.htm";
 }
 
 SMESHGUI_CuttingOfQuadsDlg::~SMESHGUI_CuttingOfQuadsDlg()
index 5e6c663268867ea8e5c1bd2bb7c19bd9a97b8c02..e956292aebbf79a11c253d80177a68ca82eb91ee 100755 (executable)
@@ -86,6 +86,7 @@ protected slots:
   void                      onOk();
   virtual bool              onApply();
   virtual void              onClose();
+  void                      onHelp();
 
   void                      onDeactivate();
   void                      onSelectionDone();
@@ -121,6 +122,7 @@ protected:
   QPushButton*              myOkBtn;
   QPushButton*              myApplyBtn;
   QPushButton*              myCloseBtn;
+  QPushButton*              myHelpBtn;
   SMESH_Actor*              myActor;
   SMESH::SMESH_Mesh_var     myMesh;
 
@@ -156,6 +158,8 @@ protected:
   int                       myFilterType;
   bool                      myBusy;
   int                       myEntityType;
+
+  QString                   myHelpFileName;
 };
 
 /*!
index 9b77ced9f26a0d9a8cfbea6bfa4fdb286c073e48..80e7306599b85e5639bbb6c6b2df6a07c63df43c 100644 (file)
@@ -49,6 +49,7 @@
 #include "SUIT_Desktop.h"
 
 #include "SalomeApp_Study.h"
+#include "SalomeApp_Application.h"
 #include "LightApp_SelectionMgr.h"
 
 #include "SVTK_Selector.h"
@@ -256,6 +257,10 @@ SMESHGUI_NodesDlg::SMESHGUI_NodesDlg (SMESHGUI* theModule,
   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);
@@ -325,6 +330,8 @@ SMESHGUI_NodesDlg::SMESHGUI_NodesDlg (SMESHGUI* theModule,
 
   SMESHGUI_NodesDlgLayout->addWidget(GroupCoordinates, 1, 0);
 
+  myHelpFileName = "/files/adding_nodes_and_elements.htm#Adding_nodes";
+
   /* Initialisation and display */
   Init();
 }
@@ -364,6 +371,7 @@ void SMESHGUI_NodesDlg::Init ()
   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(SpinBox_X, SIGNAL (valueChanged(double)), SLOT(ValueChangedInSpinBox(double)));
   connect(SpinBox_Y, SIGNAL (valueChanged(double)), SLOT(ValueChangedInSpinBox(double)));
@@ -475,6 +483,23 @@ void SMESHGUI_NodesDlg::ClickOnCancel()
   reject();
 }
 
+//=================================================================================
+// function : ClickOnHelp()
+// purpose  :
+//=================================================================================
+void SMESHGUI_NodesDlg::ClickOnHelp()
+{
+  SalomeApp_Application* app = (SalomeApp_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
index 4ec0005a093285e5cfddc84e873c673d7afe90a6..b3bca989601e17b43fbb62b8e4967a9396ebc88e 100644 (file)
@@ -101,12 +101,16 @@ private:
     QPushButton* buttonApply;
     QPushButton* buttonOk;
     QPushButton* buttonCancel;
+    QPushButton* buttonHelp;
+
+    QString      myHelpFileName;
 
 private slots:
 
     void ClickOnOk();
     void ClickOnCancel();
     bool ClickOnApply();
+    void ClickOnHelp();
     void DeactivateActiveDialog() ;
     void ActivateThisDialog() ;
     void SelectionIntoArgument() ;
index 562f4da80b4f97eb8b8a912d71adbf01a7830b33..1002dc536a6c2ff8a5c3e873de8f00f2d1075a7d 100755 (executable)
@@ -13,7 +13,9 @@
 #include <SMESHGUI_Dialog.h>
 
 #include <SalomeApp_Study.h>
+#include <SalomeApp_Application.h>
 
+#include <SUIT_Session.h>
 #include <SUIT_MessageBox.h>
 #include <SUIT_Desktop.h>
 
@@ -31,6 +33,7 @@
 SMESHGUI_Operation::SMESHGUI_Operation()
 : LightApp_Operation()
 {
+  myHelpFileName = "";
 }
 
 //=======================================================================
@@ -62,6 +65,7 @@ void SMESHGUI_Operation::startOperation()
     disconnect( dlg(), SIGNAL( dlgApply() ), this, SLOT( onApply() ) );
     disconnect( dlg(), SIGNAL( dlgCancel() ), this, SLOT( onCancel() ) );
     disconnect( dlg(), SIGNAL( dlgClose() ), this, SLOT( onCancel() ) );
+    disconnect( dlg(), SIGNAL( dlgHelp() ), this, SLOT( onHelp() ) );
     
     if( dlg()->testButtonFlags( QtxDialog::OK ) )
       connect( dlg(), SIGNAL( dlgOk() ), this, SLOT( onOk() ) );
@@ -71,6 +75,9 @@ void SMESHGUI_Operation::startOperation()
       
     if( dlg()->testButtonFlags( QtxDialog::Cancel ) )
       connect( dlg(), SIGNAL( dlgCancel() ), this, SLOT( onCancel() ) );
+
+    if( dlg()->testButtonFlags( QtxDialog::Help ) )
+      connect( dlg(), SIGNAL( dlgHelp() ), this, SLOT( onHelp() ) );
       
     //if( dlg()->testButtonFlags( QtxDialog::Close ) )
     //if dialog hasn't close, cancel, no and etc buttons, dlgClose will be emitted when dialog is closed not by OK
@@ -156,6 +163,23 @@ void SMESHGUI_Operation::onCancel()
   abort();
 }
 
+//=======================================================================
+// name    : onHelp
+// Purpose :
+//=======================================================================
+void SMESHGUI_Operation::onHelp()
+{
+  SalomeApp_Application* app = (SalomeApp_Application*)(SUIT_Session::session()->activeApplication());
+  if (app) 
+    app->onHelpContextModule(getSMESHGUI() ? app->moduleName(getSMESHGUI()->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    : initDialog
 // Purpose :
index 181cb2cc7caeddaeef95fcfd63fd1f879d032ad4..66d75c27cece7883ebb3999b14fca51a77d3883b 100755 (executable)
@@ -47,10 +47,13 @@ protected:
   
   virtual bool      isValid( SUIT_Operation* ) const;
 
+  QString           myHelpFileName;
+
 protected slots:
   virtual void onOk();
   virtual bool onApply();
   virtual void onCancel();
+  void onHelp();
 };
 
 #endif
diff --git a/src/SMESHGUI/SMESHGUI_PrecisionDlg.cxx b/src/SMESHGUI/SMESHGUI_PrecisionDlg.cxx
deleted file mode 100755 (executable)
index b589e15..0000000
+++ /dev/null
@@ -1,202 +0,0 @@
-//  SMESH SMESHGUI : GUI for SMESH component
-//
-//  Copyright (C) 2003  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
-//
-//
-//
-//  File   : SMESHGUI_PrecisionDlg.cxx
-//  Author : Sergey LITONIN
-//  Module : SMESH
-
-#include "SMESHGUI_PrecisionDlg.h"
-
-#include "SMESHGUI.h"
-#include "SMESHGUI_VTKUtils.h"
-#include "SMESHGUI_Utils.h"
-
-#include "SUIT_Desktop.h"
-#include "SUIT_ResourceMgr.h"
-
-#include <qgroupbox.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qspinbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-
-#define SPACING 5
-#define MARGIN  10
-#define DEFAULT_VAL 10
-#define RANGE 128
-
-/*!
- *  Class       : SMESHGUI_PrecisionDlg
- *  Description : Dialog to specify precision of mesh quality controls
- */
-
-//=======================================================================
-// name    : SMESHGUI_PrecisionDlg::SMESHGUI_PrecisionDlg
-// Purpose : Constructor
-//=======================================================================
-SMESHGUI_PrecisionDlg::SMESHGUI_PrecisionDlg ( SMESHGUI* theModule )
-     : QDialog( SMESH::GetDesktop( theModule ), "SMESHGUI_PrecisionDlg", true,
-                WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ),
-     mySMESHGUI( theModule )
-{
-  setCaption(tr("CAPTION"));
-
-  QVBoxLayout* aDlgLay = new QVBoxLayout (this, MARGIN, SPACING);
-
-  QFrame* aMainFrame = createMainFrame  (this);
-  QFrame* aBtnFrame  = createButtonFrame(this);
-
-  aDlgLay->addWidget(aMainFrame);
-  aDlgLay->addWidget(aBtnFrame);
-
-  aDlgLay->setStretchFactor(aMainFrame, 1);
-
-  setMinimumWidth((int)(QFontMetrics(font()).width(tr("CAPTION")) * 1.5));
-
-  Init();
-}
-
-//=======================================================================
-// name    : SMESHGUI_PrecisionDlg::~SMESHGUI_PrecisionDlg
-// Purpose : Destructor
-//=======================================================================
-SMESHGUI_PrecisionDlg::~SMESHGUI_PrecisionDlg()
-{
-}
-
-//=======================================================================
-// name    : SMESHGUI_PrecisionDlg::createButtonFrame
-// Purpose : Create frame containing buttons
-//=======================================================================
-QFrame* SMESHGUI_PrecisionDlg::createButtonFrame (QWidget* theParent)
-{
-  QGroupBox* aGrp = new QGroupBox (1, Qt::Vertical, theParent);
-  aGrp->setFrameStyle(QFrame::NoFrame);
-  aGrp->setInsideMargin(0);
-
-  myOKBtn = new QPushButton (tr("SMESH_BUT_OK"), aGrp);
-
-  QLabel* aLbl = new QLabel (aGrp);
-  aLbl->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
-
-  myCancelBtn = new QPushButton (tr("SMESH_BUT_CANCEL"), aGrp);
-
-  connect(myOKBtn, SIGNAL(clicked()), SLOT(onOk()));
-  connect(myCancelBtn, SIGNAL(clicked()), SLOT(onClose()));
-
-  return aGrp;
-}
-
-//=======================================================================
-// name    : SMESHGUI_PrecisionDlg:: createMainFrame
-// Purpose : Create frame containing dialog's input fields
-//=======================================================================
-QFrame* SMESHGUI_PrecisionDlg::createMainFrame (QWidget* theParent)
-{
-  QGroupBox* aGrp = new QGroupBox(2, Qt::Horizontal, theParent);
-  new QLabel (tr("PRECISION"), aGrp);
-  mySpinBox = new QSpinBox (0, RANGE, 1, aGrp);
-  myNotUseChk = new QCheckBox (tr("NOT_USE"), aGrp);
-
-  connect(myNotUseChk, SIGNAL(toggled(bool)), SLOT(onNotUse()));
-
-  return aGrp;
-}
-
-//=======================================================================
-// name    : SMESHGUI_PrecisionDlg::Init
-// Purpose : Initialize dialog fields
-//=======================================================================
-void SMESHGUI_PrecisionDlg::Init()
-{
-  bool isOk = false;
-  int aVal = DEFAULT_VAL;
-  SUIT_ResourceMgr* mgr = SMESH::GetResourceMgr( mySMESHGUI );
-  if (mgr && mgr->hasValue("SMESH", "controls_precision")) {
-    QString aStr = mgr->stringValue("SMESH", "controls_precision");
-    aVal = aStr.toInt(&isOk);
-  }
-
-  mySpinBox->setValue(isOk ? aVal : DEFAULT_VAL);
-  myNotUseChk->setChecked(!isOk);
-
-  onNotUse();
-
-  mySMESHGUI->SetActiveDialogBox((QDialog*)this);
-  connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(onClose()));
-}
-
-//=======================================================================
-// name    : SMESHGUI_PrecisionDlg::onOk
-// Purpose : SLOT. Called when OK button pressed
-//=======================================================================
-void SMESHGUI_PrecisionDlg::onOk()
-{
-  SUIT_ResourceMgr* mgr = SMESH::GetResourceMgr( mySMESHGUI );
-  if (myNotUseChk->isChecked()) {
-    if (mgr) {
-      mgr->remove("SMESH", "controls_precision");
-    }
-    SMESH::SetControlsPrecision(-1);
-  } else {
-    mySpinBox->clearFocus();
-    int aVal = mySpinBox->value();
-    if (mgr) {
-      mgr->setValue("SMESH", "controls_precision", QString("%1").arg(aVal));
-    }
-    SMESH::SetControlsPrecision(aVal);
-  }
-
-  disconnect(mySMESHGUI, 0, this, 0);
-  mySMESHGUI->ResetState() ;
-  accept();
-}
-
-//=======================================================================
-// name    : SMESHGUI_PrecisionDlg::onClose
-// Purpose : SLOT. Called when "Cancel" button pressed
-//=======================================================================
-void SMESHGUI_PrecisionDlg::onClose()
-{
-  disconnect( mySMESHGUI, 0, this, 0);
-  reject();
-}
-
-//=======================================================================
-// name    : SMESHGUI_PrecisionDlg::closeEvent
-// Purpose :
-//=======================================================================
-void SMESHGUI_PrecisionDlg::closeEvent (QCloseEvent*)
-{
-  onClose();
-}
-
-//=======================================================================
-// name    : SMESHGUI_PrecisionDlg::onNotUse
-// Purpose : SLOT. Called when state of "Do not use" check box changed
-//=======================================================================
-void SMESHGUI_PrecisionDlg::onNotUse()
-{
-  mySpinBox->setEnabled(!myNotUseChk->isChecked());
-}
diff --git a/src/SMESHGUI/SMESHGUI_PrecisionDlg.h b/src/SMESHGUI/SMESHGUI_PrecisionDlg.h
deleted file mode 100755 (executable)
index 976db30..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-//  SMESH SMESHGUI : GUI for SMESH component
-//
-//  Copyright (C) 2003  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
-//
-//
-//
-//  File   : SMESHGUI_PrecisionDlg.h
-//  Author : Sergey LITONIN      
-//  Module : SMESH
-
-
-#ifndef SMESHGUI_PrecisionDlg_H
-#define SMESHGUI_PrecisionDlg_H
-
-#include <qdialog.h>
-
-class QSpinBox;
-class QPushButton;
-class QCheckBox;
-class QFrame;
-class SMESHGUI;
-
-/*
-  Class       : SMESHGUI_PrecisionDlg
-  Description : Dialog to specify precision of mesh quality controls
-*/
-
-class SMESHGUI_PrecisionDlg : public QDialog
-{
-  Q_OBJECT
-
-public:
-                            SMESHGUI_PrecisionDlg( SMESHGUI* );
-
-  virtual                   ~SMESHGUI_PrecisionDlg();
-
-  void                      Init();
-
-private slots:
-
-  void                      onOk();
-  void                      onClose();
-  void                      onNotUse();
-
-private:
-
-  QFrame*                   createButtonFrame( QWidget* );
-  QFrame*                   createMainFrame( QWidget* );
-  void                      closeEvent( QCloseEvent* );
-private:
-  SMESHGUI*                 mySMESHGUI;
-  QSpinBox*                 mySpinBox;
-  QPushButton*              myOKBtn;
-  QPushButton*              myCancelBtn;
-  QCheckBox*                myNotUseChk;
-
-};
-
-#endif
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
index 885fd642c5b98e6f26797df9a3fb312a421f1691..e77ede3c55dbecfaeb7570366f7337e7b69b758f 100644 (file)
@@ -39,6 +39,8 @@
 
 #include "SUIT_ResourceMgr.h"
 #include "SUIT_Desktop.h"
+#include "SUIT_Session.h"
+#include "SUIT_MessageBox.h"
 
 #include "SVTK_Selector.h"
 #include "SVTK_ViewModel.h"
@@ -46,6 +48,7 @@
 #include "SALOME_ListIO.hxx"
 
 #include "SalomeApp_Tools.h"
+#include "SalomeApp_Application.h"
 #include "utilities.h"
 
 // OCCT Includes
@@ -131,6 +134,10 @@ SMESHGUI_RemoveElementsDlg
     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);
@@ -177,6 +184,8 @@ SMESHGUI_RemoveElementsDlg
     GroupC1Layout->addWidget(LineEditC1A1, 0, 2);
     SMESHGUI_RemoveElementsDlgLayout->addWidget(GroupC1, 1, 0);
 
+    myHelpFileName = "/files/removing_nodes_and_elements.htm#?";
+
     Init(); /* Initialisations */
 }
 
@@ -209,6 +218,7 @@ void SMESHGUI_RemoveElementsDlg::Init()
   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(GroupConstructors, SIGNAL(clicked(int)), SLOT(ConstructorsClicked(int)));
 
   connect(SelectButtonC1A1, SIGNAL (clicked()),   this, SLOT(SetEditCurrentArgument()));
@@ -296,6 +306,23 @@ void SMESHGUI_RemoveElementsDlg::ClickOnCancel()
   return;
 }
 
+//=================================================================================
+// function : ClickOnHelp()
+// purpose  :
+//=================================================================================
+void SMESHGUI_RemoveElementsDlg::ClickOnHelp()
+{
+  SalomeApp_Application* app = (SalomeApp_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 : onTextChange
 //purpose  :
index 8300d124c65633fefd9e2483bb83e0a3ed62a38b..69081b2dea2a7057d30e84e0ff28a7ee0a58c280 100644 (file)
@@ -94,17 +94,21 @@ private:
     QPushButton* buttonOk;
     QPushButton* buttonCancel;
     QPushButton* buttonApply;
+    QPushButton* buttonHelp;
     QGroupBox* GroupC1;
     QLabel* TextLabelC1A1;
     QPushButton* SelectButtonC1A1;
     QLineEdit* LineEditC1A1;
 
+    QString myHelpFileName;
+
 private slots:
 
     void ConstructorsClicked(int constructorId);
     void ClickOnOk();
     void ClickOnCancel();
     void ClickOnApply();
+    void ClickOnHelp();
     void SetEditCurrentArgument() ;
     void SelectionIntoArgument() ;
     void DeactivateActiveDialog() ;
index 48cc0dcf17649375e912249f3fa97d3d0c353d37..8333b7ac7b3aea7a131f177787e9248791e2af17 100644 (file)
 
 #include "SUIT_ResourceMgr.h"
 #include "SUIT_Desktop.h"
+#include "SUIT_Session.h"
+#include "SUIT_MessageBox.h"
+
+#include "SalomeApp_Application.h"
 
 #include "SVTK_Selector.h"
 #include "SVTK_ViewModel.h"
@@ -130,6 +134,10 @@ SMESHGUI_RemoveNodesDlg
     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);
@@ -176,6 +184,8 @@ SMESHGUI_RemoveNodesDlg
     GroupC1Layout->addWidget(LineEditC1A1, 0, 2);
     SMESHGUI_RemoveNodesDlgLayout->addWidget(GroupC1, 1, 0);
 
+    myHelpFileName = "/files/removing_nodes_and_elements.htm#?";
+
     Init(); /* Initialisations */
 }
 
@@ -208,6 +218,7 @@ void SMESHGUI_RemoveNodesDlg::Init()
   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(GroupConstructors, SIGNAL(clicked(int)), SLOT(ConstructorsClicked(int)));
 
   connect(SelectButtonC1A1, SIGNAL (clicked()),   this, SLOT(SetEditCurrentArgument()));
@@ -294,6 +305,23 @@ void SMESHGUI_RemoveNodesDlg::ClickOnCancel()
   reject();
 }
 
+//=================================================================================
+// function : ClickOnHelp()
+// purpose  :
+//=================================================================================
+void SMESHGUI_RemoveNodesDlg::ClickOnHelp()
+{
+  SalomeApp_Application* app = (SalomeApp_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 : onTextChange
 //purpose  :
index 68fb7817f2f00e4539a782683c3df5fa5e5a5c1c..e184536d0d7fd74b1602ce3e738a52a2109aee24 100644 (file)
@@ -97,17 +97,21 @@ private:
     QPushButton* buttonOk;
     QPushButton* buttonCancel;
     QPushButton* buttonApply;
+    QPushButton* buttonHelp;
     QGroupBox* GroupC1;
     QLabel* TextLabelC1A1;
     QPushButton* SelectButtonC1A1;
     QLineEdit* LineEditC1A1;
 
+    QString myHelpFileName;
+
 private slots:
 
     void ConstructorsClicked(int constructorId);
     void ClickOnOk();
     void ClickOnCancel();
     void ClickOnApply();
+    void ClickOnHelp();
     void SetEditCurrentArgument() ;
     void SelectionIntoArgument() ;
     void DeactivateActiveDialog() ;
index c16086f138efd7a58f261fce52c84e804bba421c..20573314ee471961749200a6a44f116df0419772 100644 (file)
@@ -38,6 +38,9 @@
 
 #include "SUIT_Desktop.h"
 #include "SUIT_Session.h"
+#include "SUIT_MessageBox.h"
+
+#include "SalomeApp_Application.h"
 
 #include "SALOME_ListIO.hxx"
 
@@ -92,10 +95,14 @@ SMESHGUI_RenumberingDlg::SMESHGUI_RenumberingDlg( SMESHGUI* theModule, const cha
 
   /***************************************************************/
   GroupConstructors = new QButtonGroup(this, "GroupConstructors");
-  if (unit == 0)
+  if (unit == 0) {
     GroupConstructors->setTitle(tr("SMESH_NODES" ));
-  else if (unit == 1)
+    myHelpFileName = "/files/renumbering_nodes_and_elements.htm#?";
+  }
+  else if (unit == 1) {
     GroupConstructors->setTitle(tr("SMESH_ELEMENTS" ));
+    myHelpFileName = "/files/renumbering_nodes_and_elements.htm#?";
+  }
   GroupConstructors->setExclusive(TRUE);
   GroupConstructors->setColumnLayout(0, Qt::Vertical);
   GroupConstructors->layout()->setSpacing(0);
@@ -126,6 +133,10 @@ SMESHGUI_RenumberingDlg::SMESHGUI_RenumberingDlg( SMESHGUI* theModule, const cha
   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);
@@ -203,6 +214,7 @@ void SMESHGUI_RenumberingDlg::Init()
   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(GroupConstructors, SIGNAL(clicked(int)), SLOT(ConstructorsClicked(int)));
 
   connect(SelectButton, SIGNAL (clicked()),   this, SLOT(SetEditCurrentArgument()));
@@ -298,6 +310,23 @@ void SMESHGUI_RenumberingDlg::ClickOnCancel()
   reject();
 }
 
+//=================================================================================
+// function : ClickOnHelp()
+// purpose  :
+//=================================================================================
+void SMESHGUI_RenumberingDlg::ClickOnHelp()
+{
+  SalomeApp_Application* app = (SalomeApp_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
index 50932fdbc650bcac7826408ad56086c33ce78d11..20b583544ee74500429e5d93057f80e344f5f6bf 100644 (file)
@@ -89,10 +89,13 @@ private:
     QPushButton* buttonOk;
     QPushButton* buttonCancel;
     QPushButton* buttonApply;
+    QPushButton* buttonHelp;
     QGroupBox* GroupMesh;
     QLabel* TextLabelMesh;
     QPushButton* SelectButton;
     QLineEdit* LineEditMesh;
+    
+    QString myHelpFileName;
 
 private slots:
 
@@ -100,6 +103,7 @@ private slots:
     void ClickOnOk();
     void ClickOnCancel();
     void ClickOnApply();
+    void ClickOnHelp();
     void SetEditCurrentArgument() ;
     void SelectionIntoArgument() ;
     void DeactivateActiveDialog() ;
index 57adf2a13fa6ea96bf05f4da25a4de8c897089b4..89db37b738d697835cc0ad95df515627c5f7775a 100644 (file)
 #include "SMDS_Mesh.hxx"
 
 #include "SUIT_ResourceMgr.h"
+#include "SUIT_Session.h"
+#include "SUIT_MessageBox.h"
+
+#include "SalomeApp_Application.h"
 
 #include "SVTK_ViewModel.h"
 #include "SVTK_ViewWindow.h"
@@ -131,6 +135,10 @@ SMESHGUI_RevolutionDlg::SMESHGUI_RevolutionDlg( SMESHGUI* theModule, const char*
   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);
@@ -311,12 +319,15 @@ SMESHGUI_RevolutionDlg::SMESHGUI_RevolutionDlg( SMESHGUI* theModule, const char*
   myMeshOrSubMeshOrGroupFilter =
     new SMESH_LogicalFilter (aListOfFilters, SMESH_LogicalFilter::LO_OR);
 
+  myHelpFileName = "revolution.htm";
+
   Init();
 
   /* signals and slots connections */
   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(GroupConstructors, SIGNAL(clicked(int)), SLOT(ConstructorsClicked(int)));
 
   connect(SelectElementsButton, SIGNAL (clicked()), this, SLOT(SetEditCurrentArgument()));
@@ -499,6 +510,23 @@ void SMESHGUI_RevolutionDlg::ClickOnCancel()
   reject();
 }
 
+//=================================================================================
+// function : ClickOnHelp()
+// purpose  :
+//=================================================================================
+void SMESHGUI_RevolutionDlg::ClickOnHelp()
+{
+  SalomeApp_Application* app = (SalomeApp_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 : onTextChange()
 // purpose  :
index dc1da869d41c7b294aa76f351d2c80c60be4c434..bed182ef559ad7d0974757068f6d4893a453fe35 100644 (file)
@@ -100,6 +100,7 @@ private:
     QPushButton* buttonOk;
     QPushButton* buttonCancel;
     QPushButton* buttonApply;
+    QPushButton* buttonHelp;
     QGroupBox* GroupArguments;
     QGroupBox* GroupAxis;
     QLabel* TextLabelElements;
@@ -131,12 +132,15 @@ private:
     QLabel* TextLabelTolerance;
     SMESHGUI_SpinBox* SpinBox_Tolerance;
 
+    QString myHelpFileName;
+
 private slots:
 
     void ConstructorsClicked (int constructorId);
     void ClickOnOk();
     void ClickOnCancel();
     void ClickOnApply();
+    void ClickOnHelp();
     void SetEditCurrentArgument();
     void SelectionIntoArgument();
     void DeactivateActiveDialog();
index e0578c538dc597ceb17d4c13fdb7a941877174df..df497e63ed11213f81daf14b41d3d9b7cb043545 100644 (file)
@@ -42,6 +42,9 @@
 
 #include "SUIT_Desktop.h"
 #include "SUIT_Session.h"
+#include "SUIT_MessageBox.h"
+
+#include "SalomeApp_Application.h"
 
 #include "SVTK_ViewModel.h"
 #include "SVTK_ViewWindow.h"
@@ -136,6 +139,10 @@ SMESHGUI_RotationDlg::SMESHGUI_RotationDlg( SMESHGUI* theModule, const char* nam
   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);
@@ -300,12 +307,15 @@ SMESHGUI_RotationDlg::SMESHGUI_RotationDlg( SMESHGUI* theModule, const char* nam
   myMeshOrSubMeshOrGroupFilter =
     new SMESH_LogicalFilter (aListOfFilters, SMESH_LogicalFilter::LO_OR);
 
+  myHelpFileName = "/files/rotation.htm";
+
   Init();
 
   /* signals and slots connections */
   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(GroupConstructors, SIGNAL(clicked(int)), SLOT(ConstructorsClicked(int)));
 
   connect(SelectElementsButton, SIGNAL (clicked()), this, SLOT(SetEditCurrentArgument()));
@@ -452,6 +462,23 @@ void SMESHGUI_RotationDlg::ClickOnCancel()
   reject();
 }
 
+//=================================================================================
+// function : ClickOnHelp()
+// purpose  :
+//=================================================================================
+void SMESHGUI_RotationDlg::ClickOnHelp()
+{
+  SalomeApp_Application* app = (SalomeApp_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 : onTextChange()
 // purpose  :
index 75a263154773231b4f4ab56389813972ec278796..31fdaf356b784012b5a2d256ff7d96d9b3f1c907 100644 (file)
@@ -98,6 +98,7 @@ private:
     QPushButton* buttonOk;
     QPushButton* buttonCancel;
     QPushButton* buttonApply;
+    QPushButton* buttonHelp;
     QGroupBox* GroupArguments;
     QGroupBox* GroupAxis;
     QLabel* TextLabelElements;
@@ -126,12 +127,15 @@ private:
     SMESHGUI_SpinBox* SpinBox_Angle;
     QCheckBox* CheckBoxCopy;
 
+    QString myHelpFileName;
+
 private slots:
 
     void ConstructorsClicked (int constructorId);
     void ClickOnOk();
     void ClickOnCancel();
     void ClickOnApply();
+    void ClickOnHelp();
     void SetEditCurrentArgument();
     void SelectionIntoArgument();
     void DeactivateActiveDialog();
index c7fe08a39b05af90f9300d05e644f7c5aee3a402..46715f603a3f57a71f25233f1e2801bcdd854a90 100644 (file)
@@ -293,7 +293,7 @@ QVariant SMESHGUI_Selection::isComputable( int ind ) const
     if ( !io.IsNull() ) {
       SMESH::SMESH_Mesh_var mesh = SMESH::GetMeshByIO(io) ; // m,sm,gr->m
       if ( !mesh->_is_nil() ) {*/
-        _PTR(SObject) so = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ) );
+        _PTR(SObject) so = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).latin1() );
        //FindSObject( mesh );
         if ( so ) {
           GEOM::GEOM_Object_var shape = SMESH::GetShapeOnMeshOrSubMesh( so );
index 014c89344647b5aa662a84b50dbfe915fcdf1347..90348da8ae207b62411119c7d5fc77e39e0a75a0 100644 (file)
 #include "SMESH_Actor.h"
 #include "SMDS_Mesh.hxx"
 
+#include "SUIT_Session.h"
 #include "SUIT_ResourceMgr.h"
 #include "SUIT_Desktop.h"
 #include "SUIT_MessageBox.h"
 
+#include "SalomeApp_Application.h"
+
 #include "SVTK_ViewModel.h"
 #include "SVTK_ViewWindow.h"
 #include "SVTK_Selector.h"
@@ -141,6 +144,10 @@ SMESHGUI_SewingDlg::SMESHGUI_SewingDlg( SMESHGUI* theModule, const char* name,
   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);
@@ -286,12 +293,15 @@ SMESHGUI_SewingDlg::SMESHGUI_SewingDlg( SMESHGUI* theModule, const char* name,
 
   mySMESHGUI->SetActiveDialogBox((QDialog*)this);
 
+  myHelpFileName = "/files/sewing_meshes.htm";
+
   Init();
 
   /* signals and slots connections */
   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(GroupConstructors, SIGNAL(clicked(int)), SLOT(ConstructorsClicked(int)));
 
   connect(SelectButton1, SIGNAL (clicked()),   this, SLOT(SetEditCurrentArgument()));
@@ -601,6 +611,23 @@ void SMESHGUI_SewingDlg::ClickOnCancel()
   reject();
 }
 
+//=================================================================================
+// function : ClickOnHelp()
+// purpose  :
+//=================================================================================
+void SMESHGUI_SewingDlg::ClickOnHelp()
+{
+  SalomeApp_Application* app = (SalomeApp_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 : onTextChange
 //purpose  :
index 425a928532ca81408375d89bacef893487fb6f0b..17920a9c85efdf4bc92df5d84f197c5fa6a65cbe 100644 (file)
@@ -94,6 +94,7 @@ private:
     QPushButton* buttonOk;
     QPushButton* buttonCancel;
     QPushButton* buttonApply;
+    QPushButton* buttonHelp;
     QGroupBox* GroupArguments;
     QGroupBox* SubGroup1;
     QGroupBox* SubGroup2;
@@ -119,12 +120,15 @@ private:
     QCheckBox* CheckBoxPolygons;
     QCheckBox* CheckBoxPolyedrs;
 
+    QString myHelpFileName;
+
 private slots:
 
     void ConstructorsClicked(int constructorId);
     void ClickOnOk();
     void ClickOnCancel();
     bool ClickOnApply();
+    void ClickOnHelp();
     void SetEditCurrentArgument() ;
     void SelectionIntoArgument(bool isSelectionChanged = true) ;
     void DeactivateActiveDialog() ;
index 3cf3f2b2f7b0b5294efbd74ce52e208bb236f7c7..dc0cb1c25112f496cf3f63b6404cb6fac31e9b2c 100755 (executable)
 #include "SMDS_Mesh.hxx"
 
 #include "LightApp_SelectionMgr.h"
+#include "SalomeApp_Application.h"
 #include "SUIT_ResourceMgr.h"
 #include "SUIT_MessageBox.h"
 #include "SUIT_Desktop.h"
+#include "SUIT_Session.h"
 
 #include "SVTK_Selector.h"
 #include "SVTK_ViewWindow.h"
@@ -158,6 +160,7 @@ QFrame* SMESHGUI_SingleEditDlg::createButtonFrame (QWidget* theParent)
   myOkBtn     = new QPushButton(tr("SMESH_BUT_OK"   ), aFrame);
   myApplyBtn  = new QPushButton(tr("SMESH_BUT_APPLY"), aFrame);
   myCloseBtn  = new QPushButton(tr("SMESH_BUT_CLOSE"), aFrame);
+  myHelpBtn   = new QPushButton (tr("SMESH_BUT_HELP"), aFrame);
 
   QSpacerItem* aSpacer = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum);
 
@@ -167,6 +170,7 @@ QFrame* SMESHGUI_SingleEditDlg::createButtonFrame (QWidget* theParent)
   aLay->addWidget(myApplyBtn);
   aLay->addItem(aSpacer);
   aLay->addWidget(myCloseBtn);
+  aLay->addWidget(myHelpBtn);
 
   return aFrame;
 }
@@ -222,6 +226,7 @@ void SMESHGUI_SingleEditDlg::Init()
   connect(myOkBtn,    SIGNAL(clicked()), SLOT(onOk()));
   connect(myCloseBtn, SIGNAL(clicked()), SLOT(onClose()));
   connect(myApplyBtn, SIGNAL(clicked()), SLOT(onApply()));
+  connect(myHelpBtn,  SIGNAL(clicked()), SLOT(onHelp()));
 
   // selection and SMESHGUI
   connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(onSelectionDone()));
@@ -268,6 +273,23 @@ void SMESHGUI_SingleEditDlg::onClose()
   reject();
 }
 
+//=================================================================================
+// function : onHelp()
+// purpose  :
+//=================================================================================
+void SMESHGUI_SingleEditDlg::onHelp()
+{
+  SalomeApp_Application* app = (SalomeApp_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 : findTriangles()
 //purpose  : find triangles sharing theNode1-theNode2 link
@@ -525,6 +547,7 @@ SMESHGUI_TrianglesInversionDlg
 : SMESHGUI_SingleEditDlg(theModule,theName)
 {
   setCaption(tr("CAPTION"));
+  myHelpFileName = "/files/diagonal_iversion_of_elements.htm";
 }
 
 SMESHGUI_TrianglesInversionDlg::~SMESHGUI_TrianglesInversionDlg()
@@ -549,6 +572,7 @@ SMESHGUI_UnionOfTwoTrianglesDlg
 : SMESHGUI_SingleEditDlg(theModule,theName)
 {
   setCaption(tr("CAPTION"));
+  myHelpFileName = "/files/uniting_two_triangles.htm";
 }
 
 SMESHGUI_UnionOfTwoTrianglesDlg::~SMESHGUI_UnionOfTwoTrianglesDlg()
index 6a1ddc7d275890585b112ac9f3791dea2cd24b2f..5dc56580288c5cf0e3c832adb0c4a014b1df08dc 100755 (executable)
@@ -64,6 +64,7 @@ protected slots:
   void                    onOk();
   virtual bool            onApply();
   void                    onClose();
+  void                    onHelp();
 
   void                    onDeactivate();
 
@@ -85,12 +86,15 @@ protected:
   QPushButton*            myOkBtn;
   QPushButton*            myApplyBtn;
   QPushButton*            myCloseBtn;
+  QPushButton*            myHelpBtn;
   QLineEdit*              myEdge;
   SMESH_Actor*            myActor;
 
   LightApp_SelectionMgr*  mySelectionMgr;
   SVTK_Selector*          mySelector;
   SMESHGUI*               mySMESHGUI;
+  
+  QString                 myHelpFileName;
 };
 
 /*!
index 1b875806bf70e2d9bcfa5b99d109953d68c5821f..41c8c6cb22b14fc146cea975df936657e534a2fb 100644 (file)
 #include "SUIT_ResourceMgr.h"
 #include "SUIT_OverrideCursor.h"
 #include "SUIT_Desktop.h"
+#include "SUIT_Session.h"
 #include "SUIT_MessageBox.h"
 
+#include "SalomeApp_Application.h"
+
 #include "SVTK_ViewModel.h"
 #include "SVTK_Selector.h"
 #include "SVTK_ViewWindow.h"
@@ -138,6 +141,10 @@ SMESHGUI_SmoothingDlg::SMESHGUI_SmoothingDlg( SMESHGUI* theModule, const char* n
   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);
@@ -267,6 +274,8 @@ SMESHGUI_SmoothingDlg::SMESHGUI_SmoothingDlg( SMESHGUI* theModule, const char* n
   myMeshOrSubMeshOrGroupFilter =
     new SMESH_LogicalFilter (aListOfFilters, SMESH_LogicalFilter::LO_OR);
 
+  myHelpFileName = "/files/smoothing.htm";
+
   Init();
 
   /***************************************************************/
@@ -274,6 +283,7 @@ SMESHGUI_SmoothingDlg::SMESHGUI_SmoothingDlg( SMESHGUI* theModule, const char* n
   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(GroupConstructors, SIGNAL(clicked(int)), SLOT(ConstructorsClicked(int)));
 
   connect(SelectElementsButton, SIGNAL (clicked()), this, SLOT(SetEditCurrentArgument()));
@@ -427,6 +437,23 @@ void SMESHGUI_SmoothingDlg::ClickOnCancel()
   reject();
 }
 
+//=================================================================================
+// function : ClickOnHelp()
+// purpose  :
+//=================================================================================
+void SMESHGUI_SmoothingDlg::ClickOnHelp()
+{
+  SalomeApp_Application* app = (SalomeApp_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 : onTextChange()
 // purpose  :
index 5cccb1b223fff9357bd06ca35d704e6b71ec9da1..34a2b66eb76888979ab8233dc6c97095c7a95134 100644 (file)
@@ -100,6 +100,7 @@ private:
     QPushButton* buttonOk;
     QPushButton* buttonCancel;
     QPushButton* buttonApply;
+    QPushButton* buttonHelp;
     QGroupBox* GroupArguments;
     QLabel* TextLabelElements;
     QPushButton* SelectElementsButton;
@@ -115,6 +116,8 @@ private:
     QLabel* TextLabelAspectRatio;
     SMESHGUI_SpinBox* SpinBox_AspectRatio;
     QCheckBox       * CheckBoxParametric;
+
+    QString myHelpFileName;
     
 private slots:
 
@@ -122,6 +125,7 @@ private slots:
     void ClickOnOk();
     void ClickOnCancel();
     void ClickOnApply();
+    void ClickOnHelp();
     void SetEditCurrentArgument() ;
     void SelectionIntoArgument() ;
     void DeactivateActiveDialog() ;
index 02c5c042f7b295c188ace1460b4cbb07b7d82314..3d0b2e0e3165394a06f6b1a456322bda923a94ce 100644 (file)
@@ -41,6 +41,9 @@
 #include "SUIT_Desktop.h"
 #include "SUIT_Session.h"
 #include "SUIT_OverrideCursor.h"
+#include "SUIT_MessageBox.h"
+
+#include "SalomeApp_Application.h"
 
 #include "LightApp_SelectionMgr.h"
 #include "SALOME_ListIO.hxx"
@@ -144,12 +147,15 @@ SMESHGUI_StandardMeshInfosDlg::SMESHGUI_StandardMeshInfosDlg( SMESHGUI* theModul
   myButtonsGroupLayout->setAlignment(Qt::AlignTop);
   myButtonsGroupLayout->setSpacing(6); myButtonsGroupLayout->setMargin(11);
 
-  // buttons --> OK button
+  // buttons --> OK and Help buttons
   myOkBtn = new QPushButton(tr("SMESH_BUT_OK" ), myButtonsGroup, "myOkBtn");
   myOkBtn->setAutoDefault(TRUE); myOkBtn->setDefault(TRUE);
-  myButtonsGroupLayout->addStretch();
+  myHelpBtn = new QPushButton(tr("SMESH_BUT_HELP" ), myButtonsGroup, "myHelpBtn");
+  myHelpBtn->setAutoDefault(TRUE);
+
   myButtonsGroupLayout->addWidget(myOkBtn);
   myButtonsGroupLayout->addStretch();
+  myButtonsGroupLayout->addWidget(myHelpBtn);
 
   aDlgLayout->addWidget(myButtonsGroup, 2, 0);
 
@@ -157,6 +163,7 @@ SMESHGUI_StandardMeshInfosDlg::SMESHGUI_StandardMeshInfosDlg( SMESHGUI* theModul
 
   // connect signals
   connect( myOkBtn,         SIGNAL(clicked()),                      this, SLOT(close()));
+  connect( myHelpBtn,       SIGNAL(clicked()),                      this, SLOT(onHelp()));
   connect( mySelectBtn,     SIGNAL(clicked()),                      this, SLOT(onStartSelection()));
   connect( mySMESHGUI,      SIGNAL(SignalCloseAllDialogs()),        this, SLOT(close()));
   connect( mySMESHGUI,      SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
@@ -170,6 +177,8 @@ SMESHGUI_StandardMeshInfosDlg::SMESHGUI_StandardMeshInfosDlg( SMESHGUI* theModul
   myMeshFilter = new SMESH_TypeFilter (MESH);
   mySelectionMgr->installFilter(myMeshFilter);
   onSelectionChanged();
+
+  myHelpFileName = "/files/viewing_mesh_info.htm#?";
 }
 
 //=================================================================================
@@ -441,3 +450,20 @@ void SMESHGUI_StandardMeshInfosDlg::onStartSelection()
   onSelectionChanged();
   myStartSelection = true;
 }
+
+//=================================================================================
+// function : onHelp()
+// purpose  :
+//=================================================================================
+void SMESHGUI_StandardMeshInfosDlg::onHelp()
+{
+  SalomeApp_Application* app = (SalomeApp_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"));
+  }
+}
index 28a6dfbc71eb40808fd7433223df8514f4b7a1c7..b93b35a6a6739cf3fdf13940216bbd549b380eaa 100644 (file)
@@ -62,6 +62,7 @@ private slots:
     void DeactivateActiveDialog() ;
     void ActivateThisDialog();
     void onStartSelection();
+    void onHelp();
 
 private:
     SMESHGUI*                mySMESHGUI;
@@ -83,6 +84,9 @@ private:
     
     QGroupBox*    myButtonsGroup;
     QPushButton*  myOkBtn;
+    QPushButton*  myHelpBtn;
+    
+    QString       myHelpFileName;
 };
 
 #endif // SMESHGUI_STANDARDMESHINFOSDLG_H
index 158df488abf647d7df8405f781b321c0f80b7f41..df8b8089ac2483958921dfde331e2ee88f0b0f2f 100644 (file)
 
 #include "SUIT_Desktop.h"
 #include "SUIT_ResourceMgr.h"
+#include "SUIT_Session.h"
+#include "SUIT_MessageBox.h"
+
+#include "SalomeApp_Application.h"
 
 #include "SVTK_ViewModel.h"
 #include "SVTK_ViewWindow.h"
@@ -142,6 +146,10 @@ SMESHGUI_SymmetryDlg::SMESHGUI_SymmetryDlg( SMESHGUI* theModule, const char* nam
   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);
@@ -294,12 +302,15 @@ SMESHGUI_SymmetryDlg::SMESHGUI_SymmetryDlg( SMESHGUI* theModule, const char* nam
   myMeshOrSubMeshOrGroupFilter =
     new SMESH_LogicalFilter (aListOfFilters, SMESH_LogicalFilter::LO_OR);
 
+  myHelpFileName = "/files/symmetry.htm";
+
   Init();
 
   /* signals and slots connections */
   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(GroupConstructors, SIGNAL(clicked(int)), SLOT(ConstructorsClicked(int)));
 
   connect(SelectElementsButton, SIGNAL (clicked()), this, SLOT(SetEditCurrentArgument()));
@@ -515,6 +526,23 @@ void SMESHGUI_SymmetryDlg::ClickOnCancel()
   reject();
 }
 
+//=================================================================================
+// function : ClickOnHelp()
+// purpose  :
+//=================================================================================
+void SMESHGUI_SymmetryDlg::ClickOnHelp()
+{
+  SalomeApp_Application* app = (SalomeApp_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 : onTextChange()
 // purpose  :
index ba49ca860fd63dca2e54c3d264242d6d164ee647..b0ec7a97910f933aace84141b21f211cfdc2ad35 100644 (file)
@@ -100,6 +100,7 @@ private:
     QPushButton* buttonOk;
     QPushButton* buttonCancel;
     QPushButton* buttonApply;
+    QPushButton* buttonHelp;
     QGroupBox* GroupArguments;
     QGroupBox* GroupMirror;
     QLabel* TextLabelElements;
@@ -125,6 +126,8 @@ private:
     SMESHGUI_SpinBox* SpinBox_DZ;
     
     QCheckBox* CheckBoxCopy;
+
+    QString myHelpFileName;
    
     private slots:
 
@@ -132,6 +135,7 @@ private:
     void ClickOnOk();
     void ClickOnCancel();
     void ClickOnApply();
+    void ClickOnHelp();
     void SetEditCurrentArgument() ;
     void SelectionIntoArgument() ;
     void DeactivateActiveDialog() ;
index c6e9b5e08aa7bae6b41dfcbde131372429b9355f..49bd76b732f16af85454ef3a12f8d965bc17bb0c 100644 (file)
 
 #include "SUIT_Desktop.h"
 #include "SUIT_ResourceMgr.h"
+#include "SUIT_Session.h"
+#include "SUIT_MessageBox.h"
+
+#include "SalomeApp_Application.h"
 
 #include "SVTK_ViewModel.h"
 #include "SVTK_Selection.h"
@@ -132,6 +136,10 @@ SMESHGUI_TranslationDlg::SMESHGUI_TranslationDlg( SMESHGUI* theModule, const cha
   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);
@@ -274,12 +282,15 @@ SMESHGUI_TranslationDlg::SMESHGUI_TranslationDlg( SMESHGUI* theModule, const cha
   myMeshOrSubMeshOrGroupFilter =
     new SMESH_LogicalFilter(aListOfFilters, SMESH_LogicalFilter::LO_OR);
 
+  myHelpFileName = "/files/translation.htm";
+
   Init();
 
   /* signals and slots connections */
   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(GroupConstructors, SIGNAL(clicked(int)), SLOT(ConstructorsClicked(int)));
 
   connect(SelectElementsButton, SIGNAL (clicked()), this, SLOT(SetEditCurrentArgument()));
@@ -477,6 +488,23 @@ void SMESHGUI_TranslationDlg::ClickOnCancel()
   reject();
 }
 
+//=================================================================================
+// function : ClickOnHelp()
+// purpose  :
+//=================================================================================
+void SMESHGUI_TranslationDlg::ClickOnHelp()
+{
+  SalomeApp_Application* app = (SalomeApp_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 : onTextChange()
 // purpose  :
index a101c7182a5e2ddf86cc510f1977187d0545c5a9..deb3586f37d1a137ee6d7d71b5ac6a768fec9396 100644 (file)
@@ -98,6 +98,7 @@ private:
     QPushButton* buttonOk;
     QPushButton* buttonCancel;
     QPushButton* buttonApply;
+    QPushButton* buttonHelp;
     QGroupBox* GroupArguments;
     QLabel* TextLabelElements;
     QPushButton* SelectElementsButton;
@@ -120,6 +121,8 @@ private:
     QLabel* TextLabel2_3;
     SMESHGUI_SpinBox* SpinBox2_3;
     QCheckBox* CheckBoxCopy;
+
+    QString myHelpFileName;
    
     private slots:
 
@@ -127,6 +130,7 @@ private:
     void ClickOnOk();
     void ClickOnCancel();
     void ClickOnApply();
+    void ClickOnHelp();
     void SetEditCurrentArgument() ;
     void SelectionIntoArgument() ;
     void DeactivateActiveDialog() ;
index 4e2a41b7a032c592595edd8b1f7d60230b4cf237..360ed03852adfc615d98530821ab1b9ba83fe4ea 100644 (file)
 
 #include "SUIT_Desktop.h"
 #include "SUIT_OverrideCursor.h"
+#include "SUIT_Session.h"
+#include "SUIT_MessageBox.h"
 
 #include "SALOME_ListIO.hxx"
 #include "SALOME_ListIteratorOfListIO.hxx"
 #include "SALOME_InteractiveObject.hxx"
 
 #include "SalomeApp_Study.h"
+#include "SalomeApp_Application.h"
 #include "LightApp_SelectionMgr.h"
 
 #include "SVTK_ViewWindow.h"
@@ -129,9 +132,15 @@ SMESHGUI_TransparencyDlg::SMESHGUI_TransparencyDlg( SMESHGUI* theModule,
   buttonOk->setText(tr("SMESH_BUT_CLOSE"));
   buttonOk->setAutoDefault(TRUE);
   buttonOk->setDefault(TRUE);
-  GroupButtonsLayout->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 0);
-  GroupButtonsLayout->addWidget(buttonOk, 0, 1);
-  GroupButtonsLayout->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 2);
+  buttonHelp = new QPushButton(GroupButtons, "buttonHelp");
+  buttonHelp->setText(tr("SMESH_BUT_HELP"));
+  buttonHelp->setAutoDefault(TRUE);
+
+  //GroupButtonsLayout->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 0);
+  GroupButtonsLayout->addWidget(buttonOk, 0, 0);
+  GroupButtonsLayout->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 1);
+  GroupButtonsLayout->addWidget(buttonHelp, 0, 2);  
+  //GroupButtonsLayout->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 2);
 
   SMESHGUI_TransparencyDlgLayout->addWidget(GroupC1,      0, 0);
   SMESHGUI_TransparencyDlgLayout->addWidget(GroupButtons, 1, 0);
@@ -141,11 +150,14 @@ SMESHGUI_TransparencyDlg::SMESHGUI_TransparencyDlg( SMESHGUI* theModule,
 
   // signals and slots connections : after ValueHasChanged()
   connect(buttonOk, SIGNAL(clicked()),         this, SLOT(ClickOnOk()));
+  connect(buttonHelp, SIGNAL(clicked()),       this, SLOT(ClickOnHelp()));
   connect(Slider1,  SIGNAL(valueChanged(int)), this, SLOT(SetTransparency()));
   connect(Slider1,  SIGNAL(sliderMoved(int)),  this, SLOT(ValueHasChanged()));
   connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnOk()));
   connect(mySelectionMgr,  SIGNAL(currentSelectionChanged()), this, SLOT(onSelectionChanged()));
 
+  myHelpFileName = "transparency.htm";
+
   this->show();
 }
 
@@ -167,6 +179,23 @@ void SMESHGUI_TransparencyDlg::ClickOnOk()
   close();
 }
 
+//=================================================================================
+// function : ClickOnHelp()
+// purpose  :
+//=================================================================================
+void SMESHGUI_TransparencyDlg::ClickOnHelp()
+{
+  SalomeApp_Application* app = (SalomeApp_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 : SetTransparency()
 // purpose  : Called when value of slider change
index d41385430ee75b7fcea946bc92d4adc8b62bbb4d..c26614e61b957e5f8edf7bd0e6bf21047bfbc5b0 100644 (file)
@@ -63,14 +63,18 @@ private :
   SVTK_ViewWindow*        myViewWindow;
 
   QPushButton*      buttonOk;
+  QPushButton*      buttonHelp;
   QLabel*           TextLabelOpaque;
   QLabel*           ValueLab;
   QLabel*           TextLabelTransparent;
   QSlider*          Slider1;
 
+  QString           myHelpFileName;
+
 public slots:
       
     void ClickOnOk();
+    void ClickOnHelp();
     void ValueHasChanged();
     void SetTransparency();
     void onSelectionChanged();
index ecf738528fe8b96ebadb57a6c66fb1d631f10bab..33306c10092f9ded38dc3e63f051045787343fab 100644 (file)
@@ -32,6 +32,7 @@
 
 #include <qxml.h>
 #include <map>
+#include <list>
 
 class SMESHGUI_XmlHandler : public QXmlDefaultHandler
 {
index 3fcce77aebce24b9e3b4e0831be08ab10a056efd..93111139ee0a31b2b396a5e098bc23babb9c5c78 100644 (file)
@@ -52,6 +52,10 @@ msgstr "&No"
 msgid "SMESH_BUT_CANCEL"
 msgstr "&Cancel"
 
+#Help
+msgid "SMESH_BUT_HELP"
+msgstr "&Help"
+
 #Add
 msgid "SMESH_BUT_ADD"
 msgstr "A&dd"