Salome HOME
Update GUI documentation for bugs 16559
[modules/geom.git] / src / BuildGUI / BuildGUI_FaceDlg.cxx
index dc1d3cd4ed59adb91c39fea969e46ef9233f623c..a008a721f30411cdcf15e6d70909e72a26f740e9 100644 (file)
@@ -17,7 +17,7 @@
 //  License along with this library; if not, write to the Free Software 
 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
 // 
-//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 //
 //
 //  Module : GEOM
 //  $Header$
 
-using namespace std;
 #include "BuildGUI_FaceDlg.h"
 #include "GEOMImpl_Types.hxx"
+#include "TColStd_MapOfInteger.hxx"
 
 #include "SUIT_Session.h"
 #include "SalomeApp_Application.h"
-#include "SalomeApp_SelectionMgr.h"
+#include "LightApp_SelectionMgr.h"
 
 //Qt includes
 #include <qcheckbox.h>
 #include <qlabel.h>
 
+using namespace std;
+
 //=================================================================================
 // class    : BuildGUI_FaceDlg()
 // purpose  : Constructs a BuildGUI_FaceDlg which is a child of 'parent', with the 
@@ -45,8 +47,10 @@ using namespace std;
 //            The dialog will by default be modeless, unless you set 'modal' to
 //            TRUE to construct a modal dialog.
 //=================================================================================
-BuildGUI_FaceDlg::BuildGUI_FaceDlg(QWidget* parent, const char* name, bool modal, WFlags fl)
-  :GEOMBase_Skeleton(parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
+BuildGUI_FaceDlg::BuildGUI_FaceDlg(GeometryGUI* theGeometryGUI, QWidget* parent,
+                                   const char* name, bool modal, WFlags fl)
+  :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, WStyle_Customize |
+                     WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
 {
   QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_BUILD_FACE")));
   QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
@@ -61,13 +65,15 @@ BuildGUI_FaceDlg::BuildGUI_FaceDlg(QWidget* parent, const char* name, bool modal
 
   GroupWire = new DlgRef_1Sel1Check_QTD(this, "GroupWire");
   GroupWire->GroupBox1->setTitle(tr("GEOM_FACE_FFW"));
-  GroupWire->TextLabel1->setText(tr("GEOM_WIRES"));
+  GroupWire->TextLabel1->setText(tr("GEOM_OBJECTS"));
   GroupWire->CheckButton1->setText(tr("GEOM_FACE_OPT"));
   GroupWire->PushButton1->setPixmap(image1);
 
   Layout1->addWidget(GroupWire, 2, 0);
   /***************************************************************/
 
+  setHelpFileName("create_face_page.html");
+
   /* Initialisations */
   Init();
 }
@@ -95,7 +101,10 @@ void BuildGUI_FaceDlg::Init()
 
   GroupWire->CheckButton1->setChecked(TRUE);
 
-  globalSelection( GEOM_WIRE );
+  TColStd_MapOfInteger aMap;
+  aMap.Add( GEOM_EDGE );
+  aMap.Add( GEOM_WIRE );
+  globalSelection( aMap );
 
   /* signals and slots connections */
   connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
@@ -155,7 +164,7 @@ void BuildGUI_FaceDlg::SelectionIntoArgument()
   if (!myWires.length())
     return;
   if(aNbSel != 1)
-    aName = tr("%1_wires").arg(aNbSel);
+    aName = tr("%1_objects").arg(aNbSel);
   
   myEditCurrentArgument->setText( aName );
   
@@ -173,7 +182,11 @@ void BuildGUI_FaceDlg::SetEditCurrentArgument()
   if (send != GroupWire->PushButton1)
     return;
   
-  globalSelection( GEOM_WIRE );
+  TColStd_MapOfInteger aMap;
+  aMap.Add( GEOM_EDGE );
+  aMap.Add( GEOM_WIRE );
+  globalSelection( aMap );
+
   myEditCurrentArgument = GroupWire->LineEdit1;
 
   myEditCurrentArgument->setFocus();
@@ -190,7 +203,10 @@ void BuildGUI_FaceDlg::ActivateThisDialog()
   GEOMBase_Skeleton::ActivateThisDialog();
   connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 
          SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ;
-  globalSelection( GEOM_WIRE );
+  TColStd_MapOfInteger aMap;
+  aMap.Add( GEOM_EDGE );
+  aMap.Add( GEOM_WIRE );
+  globalSelection( aMap );
 }