Salome HOME
updated copyright message
[modules/geom.git] / src / GenerationGUI / GenerationGUI_PipePathDlg.cxx
index b2d2d8d6bcd6ef3f720b854b8708e74ac1d29c5e..5445234470bc85a69f0aa268a81f31d6d57dd285 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,6 +18,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
 
 // GEOM GEOMGUI : GUI for Geometry component
 // File   : GenerationGUI_PipePathDlg.cxx
@@ -147,7 +148,7 @@ void GenerationGUI_PipePathDlg::SelectionTypeButtonClicked()
 {
   globalSelection();
   if (GroupPoints->CheckButton1->isChecked()) {
-    localSelection(GEOM::GEOM_Object::_nil(), TopAbs_EDGE);
+    localSelection(TopAbs_EDGE);
   }
   else {
     TColStd_MapOfInteger aMap;
@@ -202,9 +203,9 @@ void GenerationGUI_PipePathDlg::SelectionIntoArgument()
       QString aName = GEOMBase::GetName(myShape.get());
       myEditCurrentArgument->setText(aName);
       if (myBase1Objects.isEmpty())
-       GroupPoints->PushButton2->click();
+        GroupPoints->PushButton2->click();
       else if (myBase2Objects.isEmpty())
-       GroupPoints->PushButton3->click();
+        GroupPoints->PushButton3->click();
     }
   }
   else if (myEditCurrentArgument == GroupPoints->LineEdit2) {
@@ -268,7 +269,7 @@ void GenerationGUI_PipePathDlg::SetEditCurrentArgument()
     myEditCurrentArgument = GroupPoints->LineEdit2;
 
     if (GroupPoints->CheckButton1->isChecked()) {
-      localSelection(GEOM::GEOM_Object::_nil(), TopAbs_EDGE);
+      localSelection(TopAbs_EDGE);
     }
     else {
       TColStd_MapOfInteger aMap;
@@ -283,7 +284,7 @@ void GenerationGUI_PipePathDlg::SetEditCurrentArgument()
     myEditCurrentArgument = GroupPoints->LineEdit3;
 
     if (GroupPoints->CheckButton1->isChecked()) {
-      localSelection(GEOM::GEOM_Object::_nil(), TopAbs_EDGE);
+      localSelection(TopAbs_EDGE);
     }
     else {
       TColStd_MapOfInteger aMap;
@@ -338,7 +339,7 @@ void GenerationGUI_PipePathDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr GenerationGUI_PipePathDlg::createOperation()
 {
-  return getGeomEngine()->GetI3DPrimOperations(getStudyId());
+  return getGeomEngine()->GetI3DPrimOperations();
 }
 
 //=================================================================================
@@ -390,3 +391,16 @@ void GenerationGUI_PipePathDlg::addSubshapesToStudy()
   for (i = 0; i < myBase2Objects.count(); i++)
     GEOMBase::PublishSubObject(myBase2Objects[i].get());
 }
+
+//=================================================================================
+// function : getSourceObjects
+// purpose  : virtual method to get source objects
+//=================================================================================
+QList<GEOM::GeomObjPtr> GenerationGUI_PipePathDlg::getSourceObjects()
+{
+  QList<GEOM::GeomObjPtr> res(myBase1Objects);
+  res << myShape ;
+  for (int i = 0; i < myBase2Objects.count(); i++)
+    res << myBase2Objects[i];
+  return res;
+}