Salome HOME
updated copyright message
[modules/geom.git] / src / PrimitiveGUI / PrimitiveGUI_ConeDlg.cxx
index b4734af12712a14ab8a1560cdddf476c4aa83156..e2eb2683aedef49fef78c2bf618816747734896f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023  CEA, EDF, 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
@@ -308,7 +308,7 @@ void PrimitiveGUI_ConeDlg::SetEditCurrentArgument()
     GroupPoints->LineEdit2->setEnabled(false);
 
     globalSelection(GEOM_POINT); // to break previous local selection
-    localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX);
+    localSelection(TopAbs_VERTEX);
   }
   else if (send == GroupPoints->PushButton2) {
     myEditCurrentArgument = GroupPoints->LineEdit2;
@@ -317,7 +317,7 @@ void PrimitiveGUI_ConeDlg::SetEditCurrentArgument()
     GroupPoints->LineEdit1->setEnabled(false);
 
     globalSelection(GEOM_LINE);// to break previous local selection
-    localSelection(GEOM::GEOM_Object::_nil(), TopAbs_EDGE);
+    localSelection(TopAbs_EDGE);
   }
   connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
           this, SLOT(SelectionIntoArgument()));
@@ -371,7 +371,7 @@ void PrimitiveGUI_ConeDlg::ValueChangedInSpinBox()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr  PrimitiveGUI_ConeDlg::createOperation()
 {
-  return getGeomEngine()->GetI3DPrimOperations(getStudyId());
+  return getGeomEngine()->GetI3DPrimOperations();
 }
 
 //=================================================================================
@@ -420,7 +420,7 @@ bool PrimitiveGUI_ConeDlg::execute (ObjectList& objects)
         aParameters << GroupPoints->SpinBox_DX->text();
         aParameters << GroupPoints->SpinBox_DY->text();
         aParameters << GroupPoints->SpinBox_DZ->text();
-        anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+        anObj->SetParameters(aParameters.join(":").toUtf8().constData());
       }
       res = true;
     }
@@ -433,7 +433,7 @@ bool PrimitiveGUI_ConeDlg::execute (ObjectList& objects)
       aParameters << GroupDimensions->SpinBox_DX->text();
       aParameters << GroupDimensions->SpinBox_DY->text();
       aParameters << GroupDimensions->SpinBox_DZ->text();
-      anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+      anObj->SetParameters(aParameters.join(":").toUtf8().constData());
     }
     res = true;
     break;
@@ -498,3 +498,14 @@ void PrimitiveGUI_ConeDlg::addSubshapesToStudy()
     GEOMBase::PublishSubObject( myDir.get() );
   }
 }
+
+//=================================================================================
+// function : getSourceObjects
+// purpose  : virtual method to get source objects
+//=================================================================================
+QList<GEOM::GeomObjPtr> PrimitiveGUI_ConeDlg::getSourceObjects()
+{
+  QList<GEOM::GeomObjPtr> res;
+  res << myPoint << myDir;
+  return res;
+}