Salome HOME
updated copyright message
[modules/geom.git] / src / MeasureGUI / MeasureGUI_NormaleDlg.cxx
index 08144b195395095366cd6000f0adbb04c7be7d3a..90666d369e83f3a181f6d97e694838478198db8e 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  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
 // 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
@@ -80,7 +80,7 @@ MeasureGUI_NormaleDlg::MeasureGUI_NormaleDlg (GeometryGUI* theGeometryGUI, QWidg
   layout->addWidget(GroupArgs);
   /***************************************************************/
 
-  setHelpFileName("using_measurement_tools_page.html#normale_anchor");
+  setHelpFileName("normal_page.html");
 
   Init();
 }
@@ -188,7 +188,7 @@ void MeasureGUI_NormaleDlg::SelectionIntoArgument()
       aSelMgr->GetIndexes(aSelList.First(), aMap);
       if (aMap.Extent() == 1) // Local Selection
       {
-        GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
+        GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations();
         int anIndex = aMap(1);
         aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
         aName += QString(":face_%1").arg(anIndex);
@@ -221,7 +221,7 @@ void MeasureGUI_NormaleDlg::SelectionIntoArgument()
       aSelMgr->GetIndexes(aSelList.First(), aMap);
       if (aMap.Extent() == 1) // Local Selection
       {
-        GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
+        GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations();
         int anIndex = aMap(1);
         aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
         aName += QString(":vertex_%1").arg(anIndex);
@@ -267,7 +267,7 @@ void MeasureGUI_NormaleDlg::SetEditCurrentArgument()
     GroupArgs->PushButton2->setDown(false);
     GroupArgs->LineEdit2->setEnabled(false);
 
-    localSelection(GEOM::GEOM_Object::_nil(), TopAbs_FACE);
+    localSelection(TopAbs_FACE);
   }
   else if (send == GroupArgs->PushButton2) {
     myEditCurrentArgument = GroupArgs->LineEdit2;
@@ -275,7 +275,7 @@ void MeasureGUI_NormaleDlg::SetEditCurrentArgument()
     GroupArgs->PushButton1->setDown(false);
     GroupArgs->LineEdit1->setEnabled(false);
 
-    localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX);
+    localSelection(TopAbs_VERTEX);
   }
   connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
           this, SLOT(SelectionIntoArgument()));
@@ -333,7 +333,7 @@ void MeasureGUI_NormaleDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr MeasureGUI_NormaleDlg::createOperation()
 {
-  return getGeomEngine()->GetIMeasureOperations(getStudyId());
+  return getGeomEngine()->GetIMeasureOperations();
 }
 
 //=================================================================================
@@ -360,3 +360,15 @@ bool MeasureGUI_NormaleDlg::execute (ObjectList& objects)
 
   return true;
 }
+
+//=================================================================================
+// function : getSourceObjects
+// purpose  : virtual method to get source objects
+//=================================================================================
+QList<GEOM::GeomObjPtr> MeasureGUI_NormaleDlg::getSourceObjects()
+{
+  QList<GEOM::GeomObjPtr> res;
+  GEOM::GeomObjPtr aGeomObjPtr1(myFace), aGeomObjPtr2(myPoint);
+  res << aGeomObjPtr1 << aGeomObjPtr2;
+  return res;
+}