-// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2022 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
#include "AdvancedGUI_PipeTShapeDlg.h"
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(AdvancedGEOM)
+
#include <DlgRef.h>
#include <GeometryGUI.h>
#include <GEOMBase.h>
// 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)
// 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);
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 {
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()));
}
//=================================================================================
GEOM::GEOM_IOperations_ptr AdvancedGUI_PipeTShapeDlg::createOperation()
{
- //return getGeomEngine()->GetIAdvancedOperations(getStudyId());
- return getGeomEngine()->GetPluginOperations(getStudyId(), "AdvancedEngine");
+ return getGeomEngine()->GetPluginOperations("AdvancedEngine");
}
//=================================================================================
// GEOM::GEOM_Object_var anObj;
GEOM::ListOfGO_var anObj;
- GEOM::GEOM_IAdvancedOperations_var anOper = GEOM::GEOM_IAdvancedOperations::_narrow(getOperation());
+ GEOM::IAdvancedOperations_var anOper = GEOM::IAdvancedOperations::_narrow(getOperation());
//@@ retrieve input values from the widgets here @@//
CORBA::Double theR1 = MainTubeGroupParams->SpinBox_DX->value();
}
if (aParameters.count() > 0)
- anObj[0]->SetParameters(aParameters.join(":").toLatin1().constData());
+ anObj[0]->SetParameters(aParameters.join(":").toUtf8().constData());
}
objects.push_back(anObj[0]._retn());
// 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"))
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);
}
}
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 :