Salome HOME
[bos #39942] EDF 25230 - New problem with XYZtoUV
[modules/geom.git] / src / BasicGUI / BasicGUI_CurveDlg.cxx
index 110c80c7f60fd2506590c55c629628d6ea8f94fa..5f57c81528359131fb72af18480c9b60fc05d732 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2015  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
@@ -47,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
@@ -280,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();
@@ -418,7 +420,7 @@ void BasicGUI_CurveDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr BasicGUI_CurveDlg::createOperation()
 {
-  return myGeomGUI->GetGeomGen()->GetICurvesOperations(getStudyId());
+  return myGeomGUI->GetGeomGen()->GetICurvesOperations();
 }
 
 //=================================================================================
@@ -472,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(),
@@ -485,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(),
@@ -506,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(),
@@ -523,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());
   }