From: ouv Date: Mon, 30 Nov 2009 13:22:20 +0000 (+0000) Subject: Preparation of intermediate revision X-Git-Tag: PHASE_17_Part1_V1~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a86e82800026fb6762a41d2821d93db89188f8f7;p=modules%2Fgeom.git Preparation of intermediate revision --- diff --git a/src/BasicGUI/BasicGUI_CircleDlg.cxx b/src/BasicGUI/BasicGUI_CircleDlg.cxx index 51e63bbe1..67ed1d620 100644 --- a/src/BasicGUI/BasicGUI_CircleDlg.cxx +++ b/src/BasicGUI/BasicGUI_CircleDlg.cxx @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -648,11 +649,9 @@ bool BasicGUI_CircleDlg::execute( ObjectList& objects ) switch ( getConstructorId() ) { case 0 : { - QStringList aParameters; - aParameters << GroupPntVecR->SpinBox_DX->text(); anObj = anOper->MakeCirclePntVecR( myPoint, myDir, getRadius() ); if ( !anObj->_is_nil() && !IsPreview() ) - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + myNoteBook->setParameters(anObj, 1, GroupPntVecR->SpinBox_DX); res = true; break; } diff --git a/src/BasicGUI/BasicGUI_EllipseDlg.cxx b/src/BasicGUI/BasicGUI_EllipseDlg.cxx index a57188c08..61340d3be 100644 --- a/src/BasicGUI/BasicGUI_EllipseDlg.cxx +++ b/src/BasicGUI/BasicGUI_EllipseDlg.cxx @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -455,17 +456,13 @@ bool BasicGUI_EllipseDlg::execute( ObjectList& objects ) double aMajorR = GroupPoints->SpinBox_DX->value(); double aMinorR = GroupPoints->SpinBox_DY->value(); - QStringList aParameters; - aParameters<SpinBox_DX->text(); - aParameters<SpinBox_DY->text(); - GEOM::GEOM_ICurvesOperations_var anOper = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() ); GEOM::GEOM_Object_var anObj = myMajor->_is_nil() ? anOper->MakeEllipse ( myPoint, myDir, aMajorR, aMinorR ) : anOper->MakeEllipseVec( myPoint, myDir, aMajorR, aMinorR, myMajor ); if ( !anObj->_is_nil() ) { if ( !IsPreview() ) - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + myNoteBook->setParameters(anObj, 2, GroupPoints->SpinBox_DX, GroupPoints->SpinBox_DY); objects.push_back( anObj._retn() ); } return true; diff --git a/src/BasicGUI/BasicGUI_MarkerDlg.cxx b/src/BasicGUI/BasicGUI_MarkerDlg.cxx index 6c1ff31b9..e99553a59 100644 --- a/src/BasicGUI/BasicGUI_MarkerDlg.cxx +++ b/src/BasicGUI/BasicGUI_MarkerDlg.cxx @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -730,20 +731,18 @@ bool BasicGUI_MarkerDlg::execute( ObjectList& objects ) myData[ DX2 ]->value(), myData[ DY2 ]->value(), myData[ DZ2 ]->value() ); - QStringList aParameters; - aParameters<text(); - aParameters<text(); - aParameters<text(); - aParameters<text(); - aParameters<text(); - aParameters<text(); - aParameters<text(); - aParameters<text(); - aParameters<text(); - if ( !anObj->_is_nil() ) { if ( !IsPreview() ) - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + myNoteBook->setParameters(anObj, 9, + myData[ X ], + myData[ Y ], + myData[ Z ], + myData[ DX1 ], + myData[ DY1 ], + myData[ DZ1 ], + myData[ DX2 ], + myData[ DY2 ], + myData[ DZ2 ]); objects.push_back( anObj._retn() ); } diff --git a/src/BasicGUI/BasicGUI_PlaneDlg.cxx b/src/BasicGUI/BasicGUI_PlaneDlg.cxx index feca255ea..924ad265f 100644 --- a/src/BasicGUI/BasicGUI_PlaneDlg.cxx +++ b/src/BasicGUI/BasicGUI_PlaneDlg.cxx @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -712,7 +713,7 @@ double BasicGUI_PlaneDlg::getSize() const } //================================================================================= -// function : getSize() +// function : getSizeAsString() // purpose : //================================================================================= QString BasicGUI_PlaneDlg::getSizeAsString() const @@ -722,6 +723,7 @@ QString BasicGUI_PlaneDlg::getSizeAsString() const case 1 : return Group3Pnts->SpinBox_DX->text(); case 2 : return GroupFace->SpinBox_DX->text(); case 3 : return Group2Vec->SpinBox_DX->text(); + case 4 : return GroupLCS->SpinBox_DX->text(); } return QString(); } @@ -815,7 +817,7 @@ bool BasicGUI_PlaneDlg::execute( ObjectList& objects ) if ( !anObj->_is_nil() ) { if ( !IsPreview() ) - anObj->SetParameters(getSizeAsString().toLatin1().constData()); + myNoteBook->setParameters(anObj, QStringList(getSizeAsString())); objects.push_back( anObj._retn() ); } return res; diff --git a/src/BasicGUI/BasicGUI_PointDlg.cxx b/src/BasicGUI/BasicGUI_PointDlg.cxx index 972c39dfa..dfcc38456 100644 --- a/src/BasicGUI/BasicGUI_PointDlg.cxx +++ b/src/BasicGUI/BasicGUI_PointDlg.cxx @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -868,11 +869,11 @@ bool BasicGUI_PointDlg::execute( ObjectList& objects ) } const int id = getConstructorId(); - if(!anObj->_is_nil() && !IsPreview() && (id == GEOM_POINT_XYZ || + if(!anObj->_is_nil() && !IsPreview() && (id == GEOM_POINT_XYZ || id == GEOM_POINT_REF || id == GEOM_POINT_EDGE || id == GEOM_POINT_SURF) ) { - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + myNoteBook->setParameters(anObj, aParameters); } diff --git a/src/BasicGUI/BasicGUI_VectorDlg.cxx b/src/BasicGUI/BasicGUI_VectorDlg.cxx index 829f636da..612557ff2 100644 --- a/src/BasicGUI/BasicGUI_VectorDlg.cxx +++ b/src/BasicGUI/BasicGUI_VectorDlg.cxx @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -491,14 +492,13 @@ bool BasicGUI_VectorDlg::execute( ObjectList& objects ) double dy = GroupDimensions->SpinBox_DY->value(); double dz = GroupDimensions->SpinBox_DZ->value(); - QStringList aParameters; - aParameters << GroupDimensions->SpinBox_DX->text(); - aParameters << GroupDimensions->SpinBox_DY->text(); - aParameters << GroupDimensions->SpinBox_DZ->text(); anObj = anOper->MakeVectorDXDYDZ( dx, dy, dz ); if ( !anObj->_is_nil() && !IsPreview() ) - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + myNoteBook->setParameters(anObj, 3, + GroupDimensions->SpinBox_DX, + GroupDimensions->SpinBox_DY, + GroupDimensions->SpinBox_DZ); res = true; break; diff --git a/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx b/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx index 6db2e767a..347600849 100644 --- a/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx +++ b/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -426,10 +427,6 @@ bool BlocksGUI_ExplodeDlg::execute( ObjectList& objects ) return objects.size() > 0; } - QStringList aParameters; - aParameters << myGrp1->SpinBox1->text(); - aParameters << myGrp1->SpinBox2->text(); - // Throw away sub-shapes not selected by user if not in preview mode // and manual selection is active if ( !isAllSubShapes() ) { @@ -453,7 +450,7 @@ bool BlocksGUI_ExplodeDlg::execute( ObjectList& objects ) if ( selected.contains( QString( objStr.in() ) ) ) { if ( !IsPreview() ) - (*anIter)->SetParameters(aParameters.join(":").toLatin1().constData()); + myNoteBook->setParameters((*anIter), 2, myGrp1->SpinBox1, myGrp1->SpinBox2); objects.push_back( *anIter ); } else @@ -473,7 +470,7 @@ bool BlocksGUI_ExplodeDlg::execute( ObjectList& objects ) { GEOM::GEOM_Object_var anObj = GEOM::GEOM_Object::_duplicate( aList[i] ); if ( !IsPreview() ) - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + myNoteBook->setParameters(anObj, 2, myGrp1->SpinBox1, myGrp1->SpinBox2); objects.push_back( anObj._retn() ); } } diff --git a/src/BlocksGUI/BlocksGUI_TrsfDlg.cxx b/src/BlocksGUI/BlocksGUI_TrsfDlg.cxx index b5d681c4e..cf6c2afef 100644 --- a/src/BlocksGUI/BlocksGUI_TrsfDlg.cxx +++ b/src/BlocksGUI/BlocksGUI_TrsfDlg.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -584,12 +585,7 @@ bool BlocksGUI_TrsfDlg::execute (ObjectList& objects) myFaces[Face1], myFaces[Face2], mySpinBox[SpinBox1]->value()); if (!anObj->_is_nil() && !IsPreview()) - { - QStringList aParameters; - aParameters << "" << ""; - aParameters << mySpinBox[SpinBox1]->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); - } + myNoteBook->setParameters(anObj, 1, mySpinBox[SpinBox1]); res = true; break; case 1: @@ -599,14 +595,7 @@ bool BlocksGUI_TrsfDlg::execute (ObjectList& objects) myFaces[Face1V], myFaces[Face2V], mySpinBox[SpinBox2V]->value()); if (!anObj->_is_nil() && !IsPreview()) - { - QStringList aParameters; - aParameters << "" << ""; - aParameters << mySpinBox[SpinBox2U]->text(); - aParameters << "" << ""; - aParameters << mySpinBox[SpinBox2V]->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); - } + myNoteBook->setParameters(anObj, 2, mySpinBox[SpinBox2U], mySpinBox[SpinBox2V]); res = true; break; default: diff --git a/src/EntityGUI/EntityGUI_SketcherDlg.cxx b/src/EntityGUI/EntityGUI_SketcherDlg.cxx index 0ffb81344..b645a08c4 100644 --- a/src/EntityGUI/EntityGUI_SketcherDlg.cxx +++ b/src/EntityGUI/EntityGUI_SketcherDlg.cxx @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -1489,7 +1490,7 @@ bool EntityGUI_SketcherDlg::execute( ObjectList& objects ) if( !IsPreview() ) { QStringList aCurrentParameters = myParameters; aCurrentParameters << aParameters; - anObj->SetParameters(aCurrentParameters.join(":").toLatin1().constData()); + myNoteBook->setParameters(anObj, aCurrentParameters); } objects.push_back( anObj._retn() ); diff --git a/src/GEOMBase/GEOMBase_Helper.cxx b/src/GEOMBase/GEOMBase_Helper.cxx index 926868a41..ed25af099 100755 --- a/src/GEOMBase/GEOMBase_Helper.cxx +++ b/src/GEOMBase/GEOMBase_Helper.cxx @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -84,8 +85,11 @@ GEOM::GEOM_Gen_ptr GEOMBase_Helper::getGeomEngine() // Purpose : //================================================================ GEOMBase_Helper::GEOMBase_Helper( SUIT_Desktop* desktop ) - : myDesktop( desktop ), myViewWindow( 0 ), myDisplayer( 0 ), myCommand( 0 ), isPreview( false ) + : myDesktop( desktop ), myViewWindow( 0 ), myDisplayer( 0 ), myCommand( 0 ), myNoteBook( 0 ), isPreview( false ) { + if( SalomeApp_Application* app = (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) ) + if( SalomeApp_Study* appStudy = dynamic_cast( app->activeStudy() ) ) + myNoteBook = new SalomeApp_Notebook( appStudy ); } //================================================================ @@ -112,6 +116,12 @@ GEOMBase_Helper::~GEOMBase_Helper() delete myDisplayer; if ( !CORBA::is_nil( myOperation ) ) myOperation->Destroy(); + + if( myNoteBook ) + { + delete myNoteBook; + myNoteBook = 0; + } } //================================================================ diff --git a/src/GEOMBase/GEOMBase_Helper.h b/src/GEOMBase/GEOMBase_Helper.h index d8bc391d4..5aa304374 100755 --- a/src/GEOMBase/GEOMBase_Helper.h +++ b/src/GEOMBase/GEOMBase_Helper.h @@ -40,6 +40,7 @@ typedef std::list ObjectList; +class SalomeApp_Notebook; class SalomeApp_Study; class SUIT_Desktop; class SUIT_ViewWindow; @@ -174,6 +175,10 @@ protected: GEOM_Displayer* getDisplayer(); SUIT_Desktop* getDesktop() const; +protected: + // To do: make this field private and add method getNoteBook() + SalomeApp_Notebook* myNoteBook; + private: char* getEntry ( GEOM::GEOM_Object_ptr ) const; void clearShapeBuffer( GEOM::GEOM_Object_ptr ); diff --git a/src/GEOMBase/GEOMBase_Skeleton.cxx b/src/GEOMBase/GEOMBase_Skeleton.cxx index 56768d709..731a67ca0 100644 --- a/src/GEOMBase/GEOMBase_Skeleton.cxx +++ b/src/GEOMBase/GEOMBase_Skeleton.cxx @@ -31,7 +31,6 @@ #include #include -#include #include #include #include @@ -56,7 +55,6 @@ GEOMBase_Skeleton::GEOMBase_Skeleton( GeometryGUI* theGeometryGUI, QWidget* pare : QDialog( parent, fl ), GEOMBase_Helper( dynamic_cast( parent ) ), myGeomGUI( theGeometryGUI ), - myNoteBook( 0 ), myRBGroup( 0 ) { setAttribute( Qt::WA_DeleteOnClose ); @@ -99,12 +97,6 @@ GEOMBase_Skeleton::~GEOMBase_Skeleton() { if ( myGeomGUI ) myGeomGUI->SetActiveDialogBox( 0 ); - - if( myNoteBook ) - { - delete myNoteBook; - myNoteBook = 0; - } } //================================================================================= @@ -117,10 +109,6 @@ void GEOMBase_Skeleton::Init() if ( !myGeomGUI && app ) myGeomGUI = dynamic_cast( app->module( "Geometry" ) ); - if ( !myNoteBook && app ) - if( SalomeApp_Study* appStudy = dynamic_cast( app->activeStudy() ) ) - myNoteBook = new SalomeApp_Notebook( appStudy ); - /* init variables */ if ( myGeomGUI ) myGeomGUI->SetActiveDialogBox( this ); diff --git a/src/GEOMBase/GEOMBase_Skeleton.h b/src/GEOMBase/GEOMBase_Skeleton.h index e91e58379..1d267ffc2 100644 --- a/src/GEOMBase/GEOMBase_Skeleton.h +++ b/src/GEOMBase/GEOMBase_Skeleton.h @@ -32,7 +32,6 @@ #include class SalomeApp_DoubleSpinBox; -class SalomeApp_Notebook; class GeometryGUI; class DlgRef_Skeleton; class QSpinBox; @@ -103,8 +102,6 @@ protected: QButtonGroup* myRBGroup; //!< radio button group DlgRef_Skeleton* myMainFrame; //!< dialog box's mainframe widgetx - SalomeApp_Notebook* myNoteBook; - protected slots: virtual void ClickOnCancel(); void LineEditReturnPressed(); diff --git a/src/GenerationGUI/GenerationGUI_FillingDlg.cxx b/src/GenerationGUI/GenerationGUI_FillingDlg.cxx index fa200559a..69f9d09e8 100644 --- a/src/GenerationGUI/GenerationGUI_FillingDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_FillingDlg.cxx @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -361,15 +362,12 @@ bool GenerationGUI_FillingDlg::execute( ObjectList& objects ) if ( !anObj->_is_nil() ) { if ( !IsPreview() ) - { - QStringList aParameters; - aParameters << GroupPoints->SpinBox1->text(); - aParameters << GroupPoints->SpinBox2->text(); - aParameters << GroupPoints->SpinBox3->text(); - aParameters << GroupPoints->SpinBox4->text(); - aParameters << GroupPoints->SpinBox5->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); - } + myNoteBook->setParameters(anObj, 5, + GroupPoints->SpinBox1, + GroupPoints->SpinBox2, + GroupPoints->SpinBox3, + GroupPoints->SpinBox4, + GroupPoints->SpinBox5); objects.push_back( anObj._retn() ); } diff --git a/src/GenerationGUI/GenerationGUI_PrismDlg.cxx b/src/GenerationGUI/GenerationGUI_PrismDlg.cxx index b540d1979..f8f4b677d 100644 --- a/src/GenerationGUI/GenerationGUI_PrismDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_PrismDlg.cxx @@ -32,6 +32,7 @@ #include #include #include +#include #include // OCCT Includes @@ -650,7 +651,6 @@ bool GenerationGUI_PrismDlg::isValid (QString& msg) //================================================================================= bool GenerationGUI_PrismDlg::execute (ObjectList& objects) { - QStringList aParameters; GEOM::GEOM_Object_var anObj; GEOM::GEOM_I3DPrimOperations_var anOper = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation()); @@ -665,10 +665,7 @@ bool GenerationGUI_PrismDlg::execute (ObjectList& objects) } if (!anObj->_is_nil() && !IsPreview()) - { - aParameters << GroupPoints->SpinBox_DX->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); - } + myNoteBook->setParameters(anObj, 1, GroupPoints->SpinBox_DX ); break; case 1: @@ -692,12 +689,10 @@ bool GenerationGUI_PrismDlg::execute (ObjectList& objects) } if (!anObj->_is_nil() && !IsPreview()) - { - aParameters << GroupPoints3->SpinBox_DX->text(); - aParameters << GroupPoints3->SpinBox_DY->text(); - aParameters << GroupPoints3->SpinBox_DZ->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); - } + myNoteBook->setParameters(anObj, 3, + GroupPoints3->SpinBox_DX, + GroupPoints3->SpinBox_DY, + GroupPoints3->SpinBox_DZ); break; } diff --git a/src/GenerationGUI/GenerationGUI_RevolDlg.cxx b/src/GenerationGUI/GenerationGUI_RevolDlg.cxx index 0004ec356..57057dd49 100644 --- a/src/GenerationGUI/GenerationGUI_RevolDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_RevolDlg.cxx @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -417,11 +418,7 @@ bool GenerationGUI_RevolDlg::execute (ObjectList& objects) if (!anObj->_is_nil()) { if (!IsPreview()) - { - QStringList aParameters; - aParameters << GroupPoints->SpinBox_DX->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); - } + myNoteBook->setParameters(anObj, 1, GroupPoints->SpinBox_DX); objects.push_back(anObj._retn()); } diff --git a/src/OperationGUI/OperationGUI_ArchimedeDlg.cxx b/src/OperationGUI/OperationGUI_ArchimedeDlg.cxx index f1c646c57..d90d8092b 100644 --- a/src/OperationGUI/OperationGUI_ArchimedeDlg.cxx +++ b/src/OperationGUI/OperationGUI_ArchimedeDlg.cxx @@ -33,6 +33,7 @@ #include #include #include +#include #include //================================================================================= @@ -274,13 +275,10 @@ bool OperationGUI_ArchimedeDlg::execute( ObjectList& objects ) if ( !anObj->_is_nil() ) { if ( !IsPreview() ) - { - QStringList aParameters; - aParameters << GroupPoints->SpinBox_DX->text(); - aParameters << GroupPoints->SpinBox_DY->text(); - aParameters << GroupPoints->SpinBox_DZ->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); - } + myNoteBook->setParameters(anObj, 3, + GroupPoints->SpinBox_DX, + GroupPoints->SpinBox_DY, + GroupPoints->SpinBox_DZ); objects.push_back( anObj._retn() ); } diff --git a/src/OperationGUI/OperationGUI_ChamferDlg.cxx b/src/OperationGUI/OperationGUI_ChamferDlg.cxx index ba19442f0..1115e6ea3 100644 --- a/src/OperationGUI/OperationGUI_ChamferDlg.cxx +++ b/src/OperationGUI/OperationGUI_ChamferDlg.cxx @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -898,7 +899,7 @@ bool OperationGUI_ChamferDlg::execute (ObjectList& objects) if (!anObj->_is_nil()) { if (!IsPreview()) - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + myNoteBook->setParameters(anObj, aParameters); objects.push_back(anObj._retn()); } diff --git a/src/OperationGUI/OperationGUI_FilletDlg.cxx b/src/OperationGUI/OperationGUI_FilletDlg.cxx index e6986bf03..0c8517e38 100644 --- a/src/OperationGUI/OperationGUI_FilletDlg.cxx +++ b/src/OperationGUI/OperationGUI_FilletDlg.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -687,7 +688,7 @@ bool OperationGUI_FilletDlg::execute (ObjectList& objects) if (!anObj->_is_nil()) { if (!IsPreview()) - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + myNoteBook->setParameters(anObj, aParameters); objects.push_back(anObj._retn()); } diff --git a/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx index 00f0b3d99..1409fae4f 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx @@ -32,6 +32,7 @@ #include #include #include +#include #include // OCCT Includes @@ -467,13 +468,10 @@ bool PrimitiveGUI_BoxDlg::execute (ObjectList& objects) anObj = anOper->MakeBoxDXDYDZ(x, y, z); if (!anObj->_is_nil() && !IsPreview()) - { - QStringList aParameters; - aParameters << GroupDimensions->SpinBox_DX->text(); - aParameters << GroupDimensions->SpinBox_DY->text(); - aParameters << GroupDimensions->SpinBox_DZ->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); - } + myNoteBook->setParameters(anObj, 3, + GroupDimensions->SpinBox_DX, + GroupDimensions->SpinBox_DY, + GroupDimensions->SpinBox_DZ); res = true; } break; diff --git a/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx index 91807dfc6..1f3ad9113 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx @@ -32,6 +32,7 @@ #include #include #include +#include #include // OCCT Includes @@ -477,26 +478,20 @@ bool PrimitiveGUI_ConeDlg::execute (ObjectList& objects) if (!CORBA::is_nil(myPoint) && !CORBA::is_nil(myDir)) { anObj = anOper->MakeConePntVecR1R2H(myPoint, myDir, getRadius1(), getRadius2(), getHeight()); if (!anObj->_is_nil() && !IsPreview()) - { - QStringList aParameters; - aParameters << GroupPoints->SpinBox_DX->text(); - aParameters << GroupPoints->SpinBox_DY->text(); - aParameters << GroupPoints->SpinBox_DZ->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); - } + myNoteBook->setParameters(anObj, 3, + GroupPoints->SpinBox_DX, + GroupPoints->SpinBox_DY, + GroupPoints->SpinBox_DZ); res = true; } break; case 1: anObj = anOper->MakeConeR1R2H(getRadius1(), getRadius2(), getHeight()); if (!anObj->_is_nil() && !IsPreview()) - { - QStringList aParameters; - aParameters << GroupDimensions->SpinBox_DX->text(); - aParameters << GroupDimensions->SpinBox_DY->text(); - aParameters << GroupDimensions->SpinBox_DZ->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); - } + myNoteBook->setParameters(anObj, 3, + GroupDimensions->SpinBox_DX, + GroupDimensions->SpinBox_DY, + GroupDimensions->SpinBox_DZ); res = true; break; } diff --git a/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx index b7123270b..4fab51638 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx @@ -32,6 +32,7 @@ #include #include #include +#include #include // OCCT Includes @@ -468,24 +469,14 @@ bool PrimitiveGUI_CylinderDlg::execute (ObjectList& objects) if (!CORBA::is_nil(myPoint) && !CORBA::is_nil(myDir)) { anObj = anOper->MakeCylinderPntVecRH(myPoint, myDir, getRadius(), getHeight()); if (!anObj->_is_nil() && !IsPreview()) - { - QStringList aParameters; - aParameters << GroupPoints->SpinBox_DX->text(); - aParameters << GroupPoints->SpinBox_DY->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); - } + myNoteBook->setParameters(anObj, 2, GroupPoints->SpinBox_DX, GroupPoints->SpinBox_DY); res = true; } break; case 1: anObj = anOper->MakeCylinderRH(getRadius(), getHeight()); if (!anObj->_is_nil() && !IsPreview()) - { - QStringList aParameters; - aParameters << GroupDimensions->SpinBox_DX->text(); - aParameters << GroupDimensions->SpinBox_DY->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); - } + myNoteBook->setParameters(anObj, 2, GroupDimensions->SpinBox_DX, GroupDimensions->SpinBox_DY); res = true; break; } diff --git a/src/PrimitiveGUI/PrimitiveGUI_DiskDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_DiskDlg.cxx index ab40eb1bd..3c98df4bb 100755 --- a/src/PrimitiveGUI/PrimitiveGUI_DiskDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_DiskDlg.cxx @@ -32,6 +32,7 @@ #include #include #include +#include #include // OCCT Includes @@ -568,7 +569,6 @@ bool PrimitiveGUI_DiskDlg::isValid (QString& msg) bool PrimitiveGUI_DiskDlg::execute (ObjectList& objects) { bool res = false; - QStringList aParameters; GEOM::GEOM_Object_var anObj; @@ -578,19 +578,13 @@ bool PrimitiveGUI_DiskDlg::execute (ObjectList& objects) case 0: anObj = anOper->MakeDiskR(getRadius(), myOrientationType); if (!anObj->_is_nil() && !IsPreview()) - { - aParameters << GroupDimensions->SpinBox_DX->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); - } + myNoteBook->setParameters(anObj, 1, GroupDimensions->SpinBox_DX); res = true; break; case 1: anObj = anOper->MakeDiskPntVecR(myPoint, myDir, getRadius()); if (!anObj->_is_nil() && !IsPreview()) - { - aParameters << GroupPntVecR->SpinBox_DX->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); - } + myNoteBook->setParameters(anObj, 1, GroupPntVecR->SpinBox_DX); res = true; break; case 2: diff --git a/src/PrimitiveGUI/PrimitiveGUI_FaceDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_FaceDlg.cxx index 49d47717f..0ac3a49a8 100755 --- a/src/PrimitiveGUI/PrimitiveGUI_FaceDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_FaceDlg.cxx @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -490,7 +491,6 @@ bool PrimitiveGUI_FaceDlg::isValid( QString& msg ) bool PrimitiveGUI_FaceDlg::execute (ObjectList& objects) { bool res = false; - QStringList aParameters; GEOM::GEOM_Object_var anObj; GEOM::GEOM_I3DPrimOperations_var anOper = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation()); @@ -500,11 +500,7 @@ bool PrimitiveGUI_FaceDlg::execute (ObjectList& objects) anObj = anOper->MakeFaceHW(GroupDimensions->SpinBox_DX->value(), GroupDimensions->SpinBox_DY->value(), myOrientationType); if (!anObj->_is_nil() && !IsPreview()) - { - aParameters << GroupDimensions->SpinBox_DX->text(); - aParameters << GroupDimensions->SpinBox_DY->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); - } + myNoteBook->setParameters(anObj, 2, GroupDimensions->SpinBox_DX, GroupDimensions->SpinBox_DY); res = true; break; case 1: @@ -512,11 +508,7 @@ bool PrimitiveGUI_FaceDlg::execute (ObjectList& objects) anOper->MakeFaceObjHW(myEdge, GroupPlane->SpinBox_DX->value(), GroupPlane->SpinBox_DY->value()) : anOper->MakeFaceObjHW(myFace, GroupPlane->SpinBox_DX->value(), GroupPlane->SpinBox_DY->value()); if (!anObj->_is_nil() && !IsPreview()) - { - aParameters << GroupPlane->SpinBox_DX->text(); - aParameters << GroupPlane->SpinBox_DY->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); - } + myNoteBook->setParameters(anObj, 2, GroupPlane->SpinBox_DX, GroupPlane->SpinBox_DY); res = true; break; } diff --git a/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx index 70ad0500b..65a3d2958 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -404,11 +405,7 @@ bool PrimitiveGUI_SphereDlg::execute( ObjectList& objects ) if ( !CORBA::is_nil( myPoint ) ) { anObj = anOper->MakeSpherePntR( myPoint, getRadius() ); if (!anObj->_is_nil() && !IsPreview()) - { - QStringList aParameters; - aParameters << GroupPoints->SpinBox_DX->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); - } + myNoteBook->setParameters(anObj, 1, GroupPoints->SpinBox_DX); res = true; } break; @@ -417,11 +414,7 @@ bool PrimitiveGUI_SphereDlg::execute( ObjectList& objects ) { anObj = anOper->MakeSphereR( getRadius() ); if (!anObj->_is_nil() && !IsPreview()) - { - QStringList aParameters; - aParameters << GroupDimensions->SpinBox_DX->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); - } + myNoteBook->setParameters(anObj, 1, GroupDimensions->SpinBox_DX); res = true; break; } diff --git a/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx index 849e5d1a9..f286e5c5f 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx @@ -32,6 +32,7 @@ #include #include #include +#include #include // OCCT Includes @@ -464,24 +465,14 @@ bool PrimitiveGUI_TorusDlg::execute (ObjectList& objects) if (!CORBA::is_nil(myPoint) && !CORBA::is_nil(myDir)) { anObj = anOper->MakeTorusPntVecRR(myPoint, myDir, getRadius1(), getRadius2()); if (!anObj->_is_nil() && !IsPreview()) - { - QStringList aParameters; - aParameters << GroupPoints->SpinBox_DX->text(); - aParameters << GroupPoints->SpinBox_DY->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); - } + myNoteBook->setParameters(anObj, 2, GroupPoints->SpinBox_DX, GroupPoints->SpinBox_DY); res = true; } break; case 1: anObj = anOper->MakeTorusRR(getRadius1(), getRadius2()); if (!anObj->_is_nil() && !IsPreview()) - { - QStringList aParameters; - aParameters << GroupDimensions->SpinBox_DX->text(); - aParameters << GroupDimensions->SpinBox_DY->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); - } + myNoteBook->setParameters(anObj, 2, GroupDimensions->SpinBox_DX, GroupDimensions->SpinBox_DY); res = true; break; } diff --git a/src/RepairGUI/RepairGUI_DivideEdgeDlg.cxx b/src/RepairGUI/RepairGUI_DivideEdgeDlg.cxx index 142e5b3b7..d104c80b9 100644 --- a/src/RepairGUI/RepairGUI_DivideEdgeDlg.cxx +++ b/src/RepairGUI/RepairGUI_DivideEdgeDlg.cxx @@ -31,6 +31,7 @@ #include #include +#include #include #include #include @@ -368,13 +369,7 @@ bool RepairGUI_DivideEdgeDlg::execute( ObjectList& objects ) if ( aResult ) { if ( !IsPreview() ) - { - QStringList aParameters; - aParameters << ""; - aParameters << myValEdt->text(); - aParameters << ""; - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); - } + myNoteBook->setParameters(anObj, 1, myValEdt); objects.push_back( anObj._retn() ); } diff --git a/src/RepairGUI/RepairGUI_GlueDlg.cxx b/src/RepairGUI/RepairGUI_GlueDlg.cxx index 9c6bdd49e..a9d20a4ac 100644 --- a/src/RepairGUI/RepairGUI_GlueDlg.cxx +++ b/src/RepairGUI/RepairGUI_GlueDlg.cxx @@ -31,6 +31,7 @@ #include #include +#include #include #include #include @@ -415,10 +416,7 @@ bool RepairGUI_GlueDlg::execute( ObjectList& objects ) aResult = !anObj->_is_nil(); if ( aResult && !IsPreview() ) { - QStringList aParameters; - aParameters << myTolEdt->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); - + myNoteBook->setParameters(anObj, 1, myTolEdt); objects.push_back( anObj._retn() ); } break; @@ -468,11 +466,7 @@ bool RepairGUI_GlueDlg::execute( ObjectList& objects ) if ( aResult ) { if ( !IsPreview() ) - { - QStringList aParameters; - aParameters << myTolEdt2->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); - } + myNoteBook->setParameters(anObj, 1, myTolEdt2); objects.push_back( anObj._retn() ); } diff --git a/src/RepairGUI/RepairGUI_SewingDlg.cxx b/src/RepairGUI/RepairGUI_SewingDlg.cxx index 2b0d66551..019d77f0e 100644 --- a/src/RepairGUI/RepairGUI_SewingDlg.cxx +++ b/src/RepairGUI/RepairGUI_SewingDlg.cxx @@ -31,6 +31,7 @@ #include #include +#include #include #include #include @@ -303,11 +304,7 @@ bool RepairGUI_SewingDlg::execute( ObjectList& objects ) if ( aResult ) { if ( !IsPreview() ) - { - QStringList aParameters; - aParameters << myTolEdt->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); - } + myNoteBook->setParameters(anObj, 1, myTolEdt); objects.push_back( anObj._retn() ); } } diff --git a/src/RepairGUI/RepairGUI_ShapeProcessDlg.cxx b/src/RepairGUI/RepairGUI_ShapeProcessDlg.cxx index 570df5381..2dec5a40b 100755 --- a/src/RepairGUI/RepairGUI_ShapeProcessDlg.cxx +++ b/src/RepairGUI/RepairGUI_ShapeProcessDlg.cxx @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -638,7 +639,7 @@ bool RepairGUI_ShapeProcessDlg::execute( ObjectList& objects ) aParameters << QString( aParams[i] ); aParameters << getTexts( aParams ); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + myNoteBook->setParameters(anObj, aParameters); } objects.push_back( anObj._retn() ); } diff --git a/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx b/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx index 9f4ae0478..9ff7f31e0 100644 --- a/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx @@ -32,6 +32,7 @@ #include #include #include +#include #include // OCCT Includes @@ -592,7 +593,7 @@ bool TransformationGUI_MultiRotationDlg::execute (ObjectList& objects) if (!anObj->_is_nil()) { if(!IsPreview()) - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + myNoteBook->setParameters(anObj, aParameters); objects.push_back(anObj._retn()); } diff --git a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx index 0e992818c..518fa32ea 100644 --- a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx @@ -32,6 +32,7 @@ #include #include #include +#include #include // OCCT Includes @@ -702,7 +703,7 @@ bool TransformationGUI_MultiTranslationDlg::execute (ObjectList& objects) if (!anObj->_is_nil()) { if(!IsPreview()) - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + myNoteBook->setParameters(anObj, aParameters); objects.push_back(anObj._retn()); } diff --git a/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx b/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx index e3bacd73e..5121b3bc9 100644 --- a/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx @@ -32,6 +32,7 @@ #include #include #include +#include #include //================================================================================= @@ -300,7 +301,7 @@ bool TransformationGUI_OffsetDlg::execute( ObjectList& objects ) anObj = anOper->OffsetShapeCopy( myObjects[i], GetOffset() ); if ( !anObj->_is_nil() ) { if(!IsPreview()) { - anObj->SetParameters(GroupPoints->SpinBox_DX->text().toLatin1().constData()); + myNoteBook->setParameters(anObj, 1, GroupPoints->SpinBox_DX); } objects.push_back( anObj._retn() ); } diff --git a/src/TransformationGUI/TransformationGUI_RotationDlg.cxx b/src/TransformationGUI/TransformationGUI_RotationDlg.cxx index 1ff684460..c87556f4c 100644 --- a/src/TransformationGUI/TransformationGUI_RotationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_RotationDlg.cxx @@ -551,7 +551,7 @@ bool TransformationGUI_RotationDlg::execute (ObjectList& objects) anObj = anOper->RotateCopy(myObjects[i], myAxis, GetAngle() * PI180); if (!anObj->_is_nil()) { if(!IsPreview()) { - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + //anObj->SetParameters(aParameters.join(":").toLatin1().constData()); } objects.push_back(anObj._retn()); } @@ -563,7 +563,7 @@ bool TransformationGUI_RotationDlg::execute (ObjectList& objects) anObj = anOper->Rotate(myObjects[i], myAxis, GetAngle() * PI180); if (!anObj->_is_nil()) { if(!IsPreview()) { - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + //anObj->SetParameters(aParameters.join(":").toLatin1().constData()); updateAttributes(anObj, aParameters); } objects.push_back(anObj._retn()); diff --git a/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx b/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx index 6ad61b4ec..63ba25638 100644 --- a/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx @@ -33,6 +33,7 @@ #include #include #include +#include #include // OCCT Includes @@ -502,7 +503,7 @@ bool TransformationGUI_ScaleDlg::execute (ObjectList& objects) anObj = anOper->ScaleShapeCopy(myObjects[i], myPoint, SpinBox_FX->value()); if (!anObj->_is_nil()) { if(!IsPreview()) - anObj->SetParameters(SpinBox_FX->text().toLatin1().constData()); + myNoteBook->setParameters(anObj, 1, SpinBox_FX); objects.push_back(anObj._retn()); } } @@ -528,11 +529,7 @@ bool TransformationGUI_ScaleDlg::execute (ObjectList& objects) SpinBox_FY->value(), SpinBox_FZ->value()); if (!anObj->_is_nil()) if(!IsPreview()) { - QStringList aParameters; - aParameters<text(); - aParameters<text(); - aParameters<text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + myNoteBook->setParameters(anObj, 3, SpinBox_FX, SpinBox_FY, SpinBox_FZ); } objects.push_back(anObj._retn()); } diff --git a/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx b/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx index 5bdd8ee5f..d2067f3bc 100644 --- a/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx @@ -574,8 +574,8 @@ bool TransformationGUI_TranslationDlg::execute (ObjectList& objects) myCurrObject = myObjects[i]; anObj = anOper->TranslateDXDYDZCopy(myObjects[i], dx, dy, dz); if (!anObj->_is_nil()) { - if(!IsPreview()) - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + //if(!IsPreview()) + // anObj->SetParameters(aParameters.join(":").toLatin1().constData()); objects.push_back(anObj._retn()); } } @@ -586,7 +586,7 @@ bool TransformationGUI_TranslationDlg::execute (ObjectList& objects) anObj = anOper->TranslateDXDYDZ(myObjects[i], dx, dy, dz); if (!anObj->_is_nil()) { if(!IsPreview()) { - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + //anObj->SetParameters(aParameters.join(":").toLatin1().constData()); updateAttributes(anObj, aParameters); } objects.push_back(anObj._retn()); @@ -629,7 +629,7 @@ bool TransformationGUI_TranslationDlg::execute (ObjectList& objects) anObj = anOper->TranslateVectorDistance(myObjects[i], myVector, aDistance, toCreateCopy); if (!anObj->_is_nil()) { if(!IsPreview()) { - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + //anObj->SetParameters(aParameters.join(":").toLatin1().constData()); if (!toCreateCopy) updateAttributes(anObj, aParameters); }