X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FTransformationGUI%2FTransformationGUI_MultiTranslationDlg.cxx;h=43be5d91d262c099fe8b45bbd597676d070a7afa;hb=6aa979f7402fb06a6bf5f959726241541b83e839;hp=36f2a54dc729fe47e58df0d638710f19079b1806;hpb=16f91b82f447624718787d47955b307588fa9fa8;p=modules%2Fgeom.git diff --git a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx index 36f2a54dc..43be5d91d 100644 --- a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx @@ -19,11 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// GEOM GEOMGUI : GUI for Geometry component +// File : TransformationGUI_MultiTranslationDlg.cxx +// Author : Damien COQUERET, Open CASCADE S.A.S. -// GEOM GEOMGUI : GUI for Geometry component -// File : TransformationGUI_MultiTranslationDlg.cxx -// Author : Damien COQUERET, Open CASCADE S.A.S. -// #include "TransformationGUI_MultiTranslationDlg.h" #include @@ -197,13 +196,13 @@ void TransformationGUI_MultiTranslationDlg::Init() connect(GroupDimensions->SpinBox_DX2, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); connect(GroupDimensions->SpinBox_DY2, SIGNAL(valueChanged(int)), this, SLOT(ValueChangedInSpinBox(int))); - connect(GroupPoints->SpinBox_DX, SIGNAL(textChanged(const QString& )), + connect(GroupPoints->SpinBox_DX, SIGNAL(textChanged(const QString& )), this, SLOT(TextValueChangedInSpinBox(const QString& ))); - connect(GroupDimensions->SpinBox_DX1, SIGNAL(textChanged(const QString& )), + connect(GroupDimensions->SpinBox_DX1, SIGNAL(textChanged(const QString& )), this, SLOT(TextValueChangedInSpinBox(const QString& ))); - connect(GroupDimensions->SpinBox_DX2, SIGNAL(textChanged(const QString& )), + connect(GroupDimensions->SpinBox_DX2, SIGNAL(textChanged(const QString& )), this, SLOT(TextValueChangedInSpinBox(const QString& ))); - + connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), this, SLOT(SetDoubleSpinBoxStep(double))); connect(GroupPoints->CheckButton1, SIGNAL(toggled(bool)), this, SLOT(ReverseStepU())); @@ -222,9 +221,9 @@ void TransformationGUI_MultiTranslationDlg::Init() void TransformationGUI_MultiTranslationDlg::SetDoubleSpinBoxStep (double step) { GroupPoints->SpinBox_DX->setSingleStep(step); - GroupDimensions->SpinBox_DX1->setSingleStep(step); + GroupDimensions->SpinBox_DX1->setSingleStep(step); GroupDimensions->SpinBox_DX2->setSingleStep(step); - + // san : Commented so as not to override specific step settings //GroupPoints->SpinBox_DY->setSingleStep((int)step); //GroupDimensions->SpinBox_DY1->setSingleStep((int)step); @@ -339,10 +338,9 @@ void TransformationGUI_MultiTranslationDlg::SelectionIntoArgument() return; // nbSel == 1 - Standard_Boolean testResult = Standard_False;; - GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult); + GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( aSelList.First() ); - if (!testResult || CORBA::is_nil(aSelectedObject) || !GEOMBase::IsShape(aSelectedObject)) + if ( !GEOMBase::IsShape(aSelectedObject) ) return; QString aName = GEOMBase::GetName(aSelectedObject); @@ -536,25 +534,25 @@ void TransformationGUI_MultiTranslationDlg::TextValueChangedInSpinBox( const QSt { QObject* send = (QObject*)sender(); bool isDigit = true; - + switch (getConstructorId()) { - case 0: + case 0: GroupPoints->SpinBox_DX->text().toDouble(&isDigit); if(!isDigit){ GroupPoints->CheckButton1->setChecked(false); } GroupPoints->CheckButton1->setEnabled(isDigit); break; - case 1: + case 1: if (send == GroupDimensions->SpinBox_DX1) { GroupDimensions->SpinBox_DX1->text().toDouble(&isDigit); - if(!isDigit) + if(!isDigit) GroupDimensions->CheckButton1->setChecked(false); GroupDimensions->CheckButton1->setEnabled(isDigit); } else if(send == GroupDimensions->SpinBox_DX2){ GroupDimensions->SpinBox_DX2->text().toDouble(&isDigit); - if(!isDigit) + if(!isDigit) GroupDimensions->CheckButton2->setChecked(false); GroupDimensions->CheckButton2->setEnabled(isDigit); } @@ -655,7 +653,7 @@ GEOM::GEOM_IOperations_ptr TransformationGUI_MultiTranslationDlg::createOperatio bool TransformationGUI_MultiTranslationDlg::isValid (QString& msg) { int aConstructorId = getConstructorId(); - + if (aConstructorId == 0) { bool ok = true; ok = GroupPoints->SpinBox_DX->isValid( msg, !IsPreview() ) && ok; @@ -762,7 +760,7 @@ void TransformationGUI_MultiTranslationDlg::restoreSubShapes (SALOMEDS::Study_pt anArgs->length(1); anArgs[0] = myBase; getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, anArgs, - /*theFindMethod=*/GEOM::FSM_Transformed, + /*theFindMethod=*/GEOM::FSM_MultiTransformed, /*theInheritFirstArg=*/true, mainFrame()->CheckBoxAddPrefix->isChecked()); } @@ -784,7 +782,7 @@ void TransformationGUI_MultiTranslationDlg::createPathPreview ( GEOM::GEOM_Objec TopoDS_Shape aVector = BRepBuilderAPI_MakeEdge(BRep_Tool::Pnt(aFirst), BRep_Tool::Pnt(aLast)).Shape(); const char* aName = "tmpVector"; Handle(GEOM_AISVector) anIO = new GEOM_AISVector( aVector, aName ); - + // add Prs to preview SUIT_ViewWindow* vw = SUIT_Session::session()->activeApplication()->desktop()->activeWindow(); SOCC_Prs* aPrs = dynamic_cast(((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->CreatePrs(0));