Salome HOME
updated copyright message
[modules/geom.git] / src / AdvancedGUI / AdvancedGUI_PipeTShapeDlg.cxx
index ee07a99cdcec2663479f4c2295344e6ac0b7f67c..49bd6013a8ea9c6690206b3a3bf1e7c90f13d9a7 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023  CEA, EDF, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -420,7 +420,7 @@ void AdvancedGUI_PipeTShapeDlg::ApplyNewDimensions()
 // function : UpdatePicture()
 // purpose  :
 //=================================================================================
-void AdvancedGUI_PipeTShapeDlg::UpdatePicture (QWidget* old, QWidget* now)
+void AdvancedGUI_PipeTShapeDlg::UpdatePicture (QWidget* /*old*/, QWidget* now)
 {
   if (ChamferGroupParams->GroupBox1->isChecked())
     if (now == MainTubeGroupParams->SpinBox_DX)
@@ -504,7 +504,7 @@ void AdvancedGUI_PipeTShapeDlg::SetPosition (bool isChecked)
 // function : ValueChangedInSpinBox()
 // purpose  :
 //=================================================================================
-void AdvancedGUI_PipeTShapeDlg::ValueChangedInSpinBox (double newValue)
+void AdvancedGUI_PipeTShapeDlg::ValueChangedInSpinBox (double /*newValue*/)
 {
   if (JunctionPointsSel->GroupBox1->isChecked() && myOkPoint1 && myOkPoint2 && myOkPoint3)
     CheckCompatiblePosition(myPoint1, myPoint2, myPoint3, 0.01);
@@ -555,7 +555,7 @@ void AdvancedGUI_PipeTShapeDlg::SelectionIntoArgument()
 
           if (aFindedObject->_is_nil()) { // Object not found in study
             GEOM::GEOM_IShapesOperations_var aShapesOp =
-              getGeomEngine()->GetIShapesOperations(getStudyId());
+              getGeomEngine()->GetIShapesOperations();
             aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
           }
           else {
@@ -642,7 +642,7 @@ void AdvancedGUI_PipeTShapeDlg::SetEditCurrentArgument()
   disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
   //globalSelection(GEOM_POINT);
   globalSelection(); // close local contexts, if any
-  localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
+  localSelection( TopAbs_VERTEX );
   connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
           this, SLOT(SelectionIntoArgument()));
 }
@@ -847,7 +847,7 @@ void AdvancedGUI_PipeTShapeDlg::DisplayPreview (const bool activate, const bool
 //=================================================================================
 GEOM::GEOM_IOperations_ptr AdvancedGUI_PipeTShapeDlg::createOperation()
 {
-  return getGeomEngine()->GetPluginOperations(getStudyId(), "AdvancedEngine");
+  return getGeomEngine()->GetPluginOperations("AdvancedEngine");
 }
 
 //=================================================================================
@@ -1201,7 +1201,7 @@ bool AdvancedGUI_PipeTShapeDlg::executeNoCheck (ObjectList& objects)
     }
 
     if (aParameters.count() > 0)
-      anObj[0]->SetParameters(aParameters.join(":").toLatin1().constData());
+      anObj[0]->SetParameters(aParameters.join(":").toUtf8().constData());
   }
 
   objects.push_back(anObj[0]._retn());
@@ -1217,8 +1217,7 @@ bool AdvancedGUI_PipeTShapeDlg::executeNoCheck (ObjectList& objects)
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void AdvancedGUI_PipeTShapeDlg::restoreSubShapes (SALOMEDS::Study_ptr theStudy,
-                                                  SALOMEDS::SObject_ptr theSObject)
+void AdvancedGUI_PipeTShapeDlg::restoreSubShapes (SALOMEDS::SObject_ptr theSObject)
 {
   SALOMEDS::GenericAttribute_var anAttr;
   if (!theSObject->FindAttribute(anAttr, "AttributeIOR"))
@@ -1236,7 +1235,7 @@ void AdvancedGUI_PipeTShapeDlg::restoreSubShapes (SALOMEDS::Study_ptr theStudy,
   ObjectList::iterator it = pipeTShapeGroupObjects.begin();
 
   for (int i = 0; it != pipeTShapeGroupObjects.end(); it++, i++) {
-    getGeomEngine()->AddInStudy(theStudy, (*it), tr((*it)->GetName()).toStdString().c_str(), theFather);
+    getGeomEngine()->AddInStudy((*it), tr((*it)->GetName()).toStdString().c_str(), theFather);
   }
 }
 
@@ -1252,6 +1251,18 @@ void AdvancedGUI_PipeTShapeDlg::processPreview()
     erasePreview(true);
 }
 
+//=================================================================================
+// function : getSourceObjects
+// purpose  : virtual method to get source objects
+//=================================================================================
+QList<GEOM::GeomObjPtr> AdvancedGUI_PipeTShapeDlg::getSourceObjects()
+{
+  QList<GEOM::GeomObjPtr> res;
+  GEOM::GeomObjPtr aGeomObjPtr1(myPoint1), aGeomObjPtr2(myPoint2), aGeomObjPtr3(myPoint3);
+  res << aGeomObjPtr1 << aGeomObjPtr2 << aGeomObjPtr3;
+  return res;
+}
+
 //=================================================================================
 // function : AdvancedGUI_4Spin
 // purpose  :