-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2022 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// 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
#include "RepairGUI_LimitToleranceDlg.h"
-#include <DlgRef.h>
-#include <GeometryGUI.h>
-#include <GEOMBase.h>
-#include <SalomeApp_DoubleSpinBox.h>
+#include "DlgRef.h"
+#include "GeometryGUI.h"
+#include "GEOMBase.h"
+#include "RepairGUI.h"
+#include <SalomeApp_DoubleSpinBox.h>
#include <SalomeApp_Application.h>
#include <LightApp_SelectionMgr.h>
#include <SalomeApp_Study.h>
#include <SUIT_ViewWindow.h>
#include <SUIT_ViewManager.h>
#include <OCCViewer_ViewModel.h>
-#include <SALOME_ListIteratorOfListIO.hxx>
+#include <SALOME_ListIO.hxx>
+#include "utilities.h"
#include <GEOMImpl_Types.hxx>
// function : ConstructorsClicked()
// purpose : Radio button management
//=================================================================================
-void RepairGUI_LimitToleranceDlg::ConstructorsClicked(int constructorId)
+void RepairGUI_LimitToleranceDlg::ConstructorsClicked(int /*constructorId*/)
{
disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
//=================================================================================
GEOM::GEOM_IOperations_ptr RepairGUI_LimitToleranceDlg::createOperation()
{
- return getGeomEngine()->GetIHealingOperations(getStudyId());
+ return getGeomEngine()->GetIHealingOperations();
}
//=================================================================================
if (aResult) {
QStringList aParameters;
aParameters << myTolEdt->text();
- anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+ anObj->SetParameters(aParameters.join(":").toUtf8().constData());
+ if ( !IsPreview() )
+ RepairGUI::ShowStatistics( anOper, this );
objects.push_back(anObj._retn());
}
//================================================================
// Function : onAccept
// Purpose : This method should be called from dialog's slots onOk() and onApply()
-// It perfroms user input validation, then it
+// It performs user input validation, then it
// performs a proper operation and manages transactions, etc.
//================================================================
bool RepairGUI_LimitToleranceDlg::onAcceptLocal()
bool aLocked = aStudy->GetProperties()->IsLocked();
if (aLocked) {
- MESSAGE("GEOMBase_Helper::onAccept - ActiveStudy is locked");
SUIT_MessageBox::warning(this, tr("WRN_WARNING"), tr("WRN_STUDY_LOCKED"), tr("BUT_OK"));
return false;
}
if (aName.isEmpty())
aName = GEOMBase::GetDefaultName(getPrefix(*it));
}
- addInStudy(*it, aName.toLatin1().data());
+ addInStudy(*it, aName.toUtf8().data());
display(*it, false);
}
// function : restoreSubShapes
// purpose :
//=================================================================================
-void RepairGUI_LimitToleranceDlg::restoreSubShapes(SALOMEDS::Study_ptr theStudy,
- SALOMEDS::SObject_ptr theSObject)
+void RepairGUI_LimitToleranceDlg::restoreSubShapes(SALOMEDS::SObject_ptr theSObject)
{
if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
// empty list of arguments means that all arguments should be restored
- getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
+ getGeomEngine()->RestoreSubShapesSO(theSObject, GEOM::ListOfGO(),
GEOM::FSM_GetInPlace, /*theInheritFirstArg=*/true,
mainFrame()->CheckBoxAddPrefix->isChecked());
}
}
+
+//=================================================================================
+// function : getSourceObjects
+// purpose : virtual method to get source objects
+//=================================================================================
+QList<GEOM::GeomObjPtr> RepairGUI_LimitToleranceDlg::getSourceObjects()
+{
+ QList<GEOM::GeomObjPtr> res;
+ GEOM::GeomObjPtr aGeomObjPtr(myObject);
+ res << aGeomObjPtr;
+ return res;
+}