]> SALOME platform Git repositories - modules/geom.git/blobdiff - src/BasicGUI/BasicGUI_CurveDlg.cxx
Salome HOME
[bos #39942] EDF 25230 - New problem with XYZtoUV
[modules/geom.git] / src / BasicGUI / BasicGUI_CurveDlg.cxx
old mode 100755 (executable)
new mode 100644 (file)
index e3b9104..5f57c81
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  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
@@ -37,7 +37,6 @@
 #include <SalomeApp_Study.h>
 #include <LightApp_SelectionMgr.h>
 
-#include <SALOME_ListIteratorOfListIO.hxx>
 #include <SALOME_ListIO.hxx>
 
 #include <TopoDS_Shape.hxx>
@@ -48,6 +47,8 @@
 
 #include <GEOMImpl_Types.hxx>
 
+#include <QButtonGroup>
+
 //=================================================================================
 // class    : BasicGUI_CurveDlg()
 // purpose  : Constructs a BasicGUI_CurveDlg which is a child of 'parent', with the
@@ -281,15 +282,15 @@ void BasicGUI_CurveDlg::SetEditCurrentArgument()
 
   if (sender() == myGroupPoints->PushButton1) {
     myEditCurrentArgument = myGroupPoints->LineEdit1;
-    localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX);
+    localSelection(TopAbs_VERTEX);
   }
   else if (sender() == myPushBtnV1) {
     myEditCurrentArgument = myLineEditV1;
-    localSelection(GEOM::GEOM_Object::_nil(), TopAbs_EDGE);
+    localSelection(TopAbs_EDGE);
   }
   else if (sender() == myPushBtnV2) {
     myEditCurrentArgument = myLineEditV2;
-    localSelection(GEOM::GEOM_Object::_nil(), TopAbs_EDGE);
+    localSelection(TopAbs_EDGE);
   }
 
   myEditCurrentArgument->setFocus();
@@ -419,7 +420,7 @@ void BasicGUI_CurveDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BasicGUI_CurveDlg::createOperation()
 {
-  return myGeomGUI->GetGeomGen()->GetICurvesOperations(getStudyId());
+  return myGeomGUI->GetGeomGen()->GetICurvesOperations();
 }
 
 //=================================================================================
@@ -473,9 +474,9 @@ bool BasicGUI_CurveDlg::execute (ObjectList& objects)
     if (myBySelectionBtn->isChecked())
       anObj = anOper->MakePolyline(points.in(), myGroupPoints->CheckButton1->isChecked());
     else
-      anObj = anOper->MakeCurveParametricNew(qPrintable(myGroupParams->myXExpr->text()),
-                                             qPrintable(myGroupParams->myYExpr->text()),
-                                             qPrintable(myGroupParams->myZExpr->text()),
+      anObj = anOper->MakeCurveParametricNew(qUtf8Printable(myGroupParams->myXExpr->text()),
+                                             qUtf8Printable(myGroupParams->myYExpr->text()),
+                                             qUtf8Printable(myGroupParams->myZExpr->text()),
                                              myGroupParams->myPMin->value(),
                                              myGroupParams->myPMax->value(),
                                              myGroupParams->myPStep->value(),
@@ -486,9 +487,9 @@ bool BasicGUI_CurveDlg::execute (ObjectList& objects)
     if (myBySelectionBtn->isChecked())
       anObj = anOper->MakeSplineBezier(points.in(), myGroupPoints->CheckButton1->isChecked());
     else
-      anObj = anOper->MakeCurveParametricNew(qPrintable(myGroupParams->myXExpr->text()),
-                                             qPrintable(myGroupParams->myYExpr->text()),
-                                             qPrintable(myGroupParams->myZExpr->text()),
+      anObj = anOper->MakeCurveParametricNew(qUtf8Printable(myGroupParams->myXExpr->text()),
+                                             qUtf8Printable(myGroupParams->myYExpr->text()),
+                                             qUtf8Printable(myGroupParams->myZExpr->text()),
                                              myGroupParams->myPMin->value(),
                                              myGroupParams->myPMax->value(),
                                              myGroupParams->myPStep->value(),
@@ -507,9 +508,9 @@ bool BasicGUI_CurveDlg::execute (ObjectList& objects)
                                                 myGroupPoints->CheckButton2->isChecked());
     }
     else
-      anObj = anOper->MakeCurveParametricNew(qPrintable(myGroupParams->myXExpr->text()),
-                                             qPrintable(myGroupParams->myYExpr->text()),
-                                             qPrintable(myGroupParams->myZExpr->text()),
+      anObj = anOper->MakeCurveParametricNew(qUtf8Printable(myGroupParams->myXExpr->text()),
+                                             qUtf8Printable(myGroupParams->myYExpr->text()),
+                                             qUtf8Printable(myGroupParams->myZExpr->text()),
                                              myGroupParams->myPMin->value(),
                                              myGroupParams->myPMax->value(),
                                              myGroupParams->myPStep->value(),
@@ -524,7 +525,7 @@ bool BasicGUI_CurveDlg::execute (ObjectList& objects)
       aParameters<<myGroupParams->myPMin->text();
       aParameters<<myGroupParams->myPMax->text();
       aParameters<<myGroupParams->myPStep->text();
-      anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+      anObj->SetParameters(aParameters.join(":").toUtf8().constData());
     }
     objects.push_back(anObj._retn());
   }
@@ -542,6 +543,14 @@ void BasicGUI_CurveDlg::addSubshapesToStudy()
     GEOMBase::PublishSubObject( myPoints[i].get() );
 }
 
+//=================================================================================
+// function : getSourceObjects
+// purpose  : virtual method to get source objects
+//=================================================================================
+QList<GEOM::GeomObjPtr> BasicGUI_CurveDlg::getSourceObjects()
+{
+  return myPoints;
+}
 //=================================================================================
 // function : CreationModeChanged
 // purpose  :