From 3588d5b64279bfddf7dda1bd8904f47238ea5875 Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 27 Jun 2006 10:55:21 +0000 Subject: [PATCH] fix bug 9395. set coordinates and displacements limit to interval [-1e+15, 1e+15] --- src/BasicGUI/BasicGUI_CircleDlg.cxx | 2 +- src/BasicGUI/BasicGUI_EllipseDlg.cxx | 4 +- src/BasicGUI/BasicGUI_MarkerDlg.cxx | 2 +- src/BasicGUI/BasicGUI_PlaneDlg.cxx | 6 +-- src/BasicGUI/BasicGUI_PointDlg.cxx | 12 ++--- src/BasicGUI/BasicGUI_VectorDlg.cxx | 6 +-- src/DlgRef/DlgRef_SpinBox.h | 4 ++ src/EntityGUI/EntityGUI_SketcherDlg.cxx | 52 +++++++++---------- src/GenerationGUI/GenerationGUI_PrismDlg.cxx | 2 +- src/GenerationGUI/GenerationGUI_RevolDlg.cxx | 2 +- .../OperationGUI_ArchimedeDlg.cxx | 6 +-- src/OperationGUI/OperationGUI_ChamferDlg.cxx | 2 +- src/OperationGUI/OperationGUI_ClippingDlg.cxx | 4 +- src/OperationGUI/OperationGUI_FilletDlg.cxx | 6 +-- src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx | 6 +-- src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx | 12 ++--- src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx | 8 +-- src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx | 4 +- src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx | 8 +-- .../TransformationGUI_MultiRotationDlg.cxx | 10 ++-- .../TransformationGUI_MultiTranslationDlg.cxx | 12 ++--- .../TransformationGUI_OffsetDlg.cxx | 2 +- .../TransformationGUI_RotationDlg.cxx | 2 +- .../TransformationGUI_ScaleDlg.cxx | 2 +- .../TransformationGUI_TranslationDlg.cxx | 6 +-- 25 files changed, 93 insertions(+), 89 deletions(-) diff --git a/src/BasicGUI/BasicGUI_CircleDlg.cxx b/src/BasicGUI/BasicGUI_CircleDlg.cxx index 5bd907f71..ce76529d0 100644 --- a/src/BasicGUI/BasicGUI_CircleDlg.cxx +++ b/src/BasicGUI/BasicGUI_CircleDlg.cxx @@ -125,7 +125,7 @@ void BasicGUI_CircleDlg::Init() double aStep = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100); /* min, max, step and decimals for spin boxes & initial values */ - GroupPntVecR->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, aStep, 3); + GroupPntVecR->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, aStep, 3); GroupPntVecR->SpinBox_DX->SetValue( 100 ); /* signals and slots connections */ diff --git a/src/BasicGUI/BasicGUI_EllipseDlg.cxx b/src/BasicGUI/BasicGUI_EllipseDlg.cxx index 0aa2d0da7..ba6db7d30 100644 --- a/src/BasicGUI/BasicGUI_EllipseDlg.cxx +++ b/src/BasicGUI/BasicGUI_EllipseDlg.cxx @@ -114,8 +114,8 @@ void BasicGUI_EllipseDlg::Init() double aMajorR( 200. ), aMinorR( 100. ); /* min, max, step and decimals for spin boxes & initial values */ - GroupPoints->SpinBox_DX->RangeStepAndValidator( 0.001, 999.999, step, 3 ); - GroupPoints->SpinBox_DY->RangeStepAndValidator( 0.001, 999.999, step, 3 ); + GroupPoints->SpinBox_DX->RangeStepAndValidator( 0.001, COORD_MAX, step, 3 ); + GroupPoints->SpinBox_DY->RangeStepAndValidator( 0.001, COORD_MAX, step, 3 ); GroupPoints->SpinBox_DX->SetValue( aMajorR ); GroupPoints->SpinBox_DY->SetValue( aMinorR ); diff --git a/src/BasicGUI/BasicGUI_MarkerDlg.cxx b/src/BasicGUI/BasicGUI_MarkerDlg.cxx index 521d2a742..0cb94ee06 100644 --- a/src/BasicGUI/BasicGUI_MarkerDlg.cxx +++ b/src/BasicGUI/BasicGUI_MarkerDlg.cxx @@ -176,7 +176,7 @@ void BasicGUI_MarkerDlg::Init() for ( DataMap::iterator anIter = myData.begin(); anIter != myData.end(); ++anIter ) { - anIter.data()->RangeStepAndValidator( -999.999, 999.999, step, 3 ); + anIter.data()->RangeStepAndValidator( COORD_MIN, COORD_MAX, step, 3 ); connect( anIter.data(), SIGNAL( valueChanged( double ) ), this, SLOT( onValueChanged( double ) ) ); } diff --git a/src/BasicGUI/BasicGUI_PlaneDlg.cxx b/src/BasicGUI/BasicGUI_PlaneDlg.cxx index 22975fe58..42d4b17af 100644 --- a/src/BasicGUI/BasicGUI_PlaneDlg.cxx +++ b/src/BasicGUI/BasicGUI_PlaneDlg.cxx @@ -136,11 +136,11 @@ void BasicGUI_PlaneDlg::Init() double aTrimSize = 2000.0; /* min, max, step and decimals for spin boxes */ - GroupPntDir->SpinBox_DX->RangeStepAndValidator( 0.001, 10000000.0, aStep, 3 ); + GroupPntDir->SpinBox_DX->RangeStepAndValidator( 0.001, COORD_MAX, aStep, 3 ); GroupPntDir->SpinBox_DX->SetValue( aTrimSize ); - Group3Pnts->SpinBox_DX->RangeStepAndValidator(0.001, 10000000.0, aStep, 3); + Group3Pnts->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, aStep, 3); Group3Pnts->SpinBox_DX->SetValue( aTrimSize ); - GroupFace->SpinBox_DX->RangeStepAndValidator(0.001, 10000000.0, aStep, 3); + GroupFace->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, aStep, 3); GroupFace->SpinBox_DX->SetValue( aTrimSize ); /* signals and slots connections */ diff --git a/src/BasicGUI/BasicGUI_PointDlg.cxx b/src/BasicGUI/BasicGUI_PointDlg.cxx index a194408cc..16b642130 100644 --- a/src/BasicGUI/BasicGUI_PointDlg.cxx +++ b/src/BasicGUI/BasicGUI_PointDlg.cxx @@ -157,16 +157,16 @@ void BasicGUI_PointDlg::Init() double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100); /* min, max, step and decimals for spin boxes */ - GroupXYZ->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, step, 3); - GroupXYZ->SpinBox_DY->RangeStepAndValidator(-999.999, 999.999, step, 3); - GroupXYZ->SpinBox_DZ->RangeStepAndValidator(-999.999, 999.999, step, 3); + GroupXYZ->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); + GroupXYZ->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); + GroupXYZ->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); GroupXYZ->SpinBox_DX->SetValue(0.0); GroupXYZ->SpinBox_DY->SetValue(0.0); GroupXYZ->SpinBox_DZ->SetValue(0.0); - GroupRefPoint->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, step, 3); - GroupRefPoint->SpinBox_DY->RangeStepAndValidator(-999.999, 999.999, step, 3); - GroupRefPoint->SpinBox_DZ->RangeStepAndValidator(-999.999, 999.999, step, 3); + GroupRefPoint->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); + GroupRefPoint->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); + GroupRefPoint->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); GroupRefPoint->SpinBox_DX->SetValue(0.0); GroupRefPoint->SpinBox_DY->SetValue(0.0); GroupRefPoint->SpinBox_DZ->SetValue(0.0); diff --git a/src/BasicGUI/BasicGUI_VectorDlg.cxx b/src/BasicGUI/BasicGUI_VectorDlg.cxx index ab7a81556..48fb526cd 100644 --- a/src/BasicGUI/BasicGUI_VectorDlg.cxx +++ b/src/BasicGUI/BasicGUI_VectorDlg.cxx @@ -118,9 +118,9 @@ void BasicGUI_VectorDlg::Init() double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100); /* min, max, step and decimals for spin boxes */ - GroupDimensions->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, step, 3); - GroupDimensions->SpinBox_DY->RangeStepAndValidator(-999.999, 999.999, step, 3); - GroupDimensions->SpinBox_DZ->RangeStepAndValidator(-999.999, 999.999, step, 3); + GroupDimensions->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); + GroupDimensions->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); + GroupDimensions->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); double dx( 0. ), dy( 0. ), dz( 200. ); GroupDimensions->SpinBox_DX->SetValue( dx ); diff --git a/src/DlgRef/DlgRef_SpinBox.h b/src/DlgRef/DlgRef_SpinBox.h index 1525987de..097e1378f 100644 --- a/src/DlgRef/DlgRef_SpinBox.h +++ b/src/DlgRef/DlgRef_SpinBox.h @@ -40,6 +40,10 @@ #else #define DLGREF_WNT_EXPORT #endif + +#define COORD_MIN -1e+15 +#define COORD_MAX +1e+15 + //================================================================================= // class : DlgRef_SpinBox // purpose : Derivated from QSpinBox class and modified to accept floats diff --git a/src/EntityGUI/EntityGUI_SketcherDlg.cxx b/src/EntityGUI/EntityGUI_SketcherDlg.cxx index 4ab7da484..d81b9b85c 100644 --- a/src/EntityGUI/EntityGUI_SketcherDlg.cxx +++ b/src/EntityGUI/EntityGUI_SketcherDlg.cxx @@ -257,16 +257,16 @@ void EntityGUI_SketcherDlg::Init() double step = SUIT_Session::session()->resourceMgr()->doubleValue( "Geometry", "SettingsGeomStep", 100.0 ); /* min, max, step and decimals for spin boxes */ - Group1Spin->SpinBox_DX->RangeStepAndValidator(-999999.999, 999999.999, step, 3); - Group2Spin->SpinBox_DX->RangeStepAndValidator(-999999.999, 999999.999, step, 3); - Group2Spin->SpinBox_DY->RangeStepAndValidator(-999999.999, 999999.999, step, 3); - Group3Spin->SpinBox_DX->RangeStepAndValidator(-999999.999, 999999.999, step, 3); - Group3Spin->SpinBox_DY->RangeStepAndValidator(-999999.999, 999999.999, step, 3); - Group3Spin->SpinBox_DZ->RangeStepAndValidator(-999999.999, 999999.999, step, 3); - Group4Spin->SpinBox_DX->RangeStepAndValidator(-999999.999, 999999.999, 0.1, 3); - Group4Spin->SpinBox_DY->RangeStepAndValidator(-999999.999, 999999.999, 0.1, 3); - Group4Spin->SpinBox_DZ->RangeStepAndValidator(-999999.999, 999999.999, step, 3); - Group4Spin->SpinBox_DS->RangeStepAndValidator(-999999.999, 999999.999, 5., 3); + Group1Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); + Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); + Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); + Group3Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); + Group3Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); + Group3Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); + Group4Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, 3); + Group4Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, 3); + Group4Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); + Group4Spin->SpinBox_DS->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3); /* displays Dialog */ GroupConstructors->setEnabled(false); @@ -364,8 +364,8 @@ void EntityGUI_SketcherDlg::PointClicked(int constructorId) if ( constructorId == 1 ) { // XY mySketchType = PT_ABS; - Group2Spin->SpinBox_DX->RangeStepAndValidator(-999999.999, 999999.999, 100., 3); - Group2Spin->SpinBox_DY->RangeStepAndValidator(-999999.999, 999999.999, 100., 3); + Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3); + Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3); Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_X2")); Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_Y2")); myX = 0.0; @@ -380,8 +380,8 @@ void EntityGUI_SketcherDlg::PointClicked(int constructorId) else if ( constructorId == 0 ) { // DXDY mySketchType = PT_RELATIVE; - Group2Spin->SpinBox_DX->RangeStepAndValidator(-999999.999, 999999.999, 100., 3); - Group2Spin->SpinBox_DY->RangeStepAndValidator(-999999.999, 999999.999, 100., 3); + Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3); + Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3); Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_DX2")); Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_DY2")); myDX = 0.0; @@ -435,8 +435,8 @@ void EntityGUI_SketcherDlg::Dir2Clicked(int constructorId) myLength = 100.0; if ( myConstructorDirId == 2 ) { // Angle - Group2Spin->SpinBox_DX->RangeStepAndValidator(-999999.999, 999999.999, 5., 3); - Group2Spin->SpinBox_DY->RangeStepAndValidator(-999999.999, 999999.999, 100., 3); + Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3); + Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3); Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_ANGLE2")); Group2Spin->SpinBox_DX->SetValue(myAngle); Group2Spin->buttonApply->setFocus(); @@ -511,9 +511,9 @@ void EntityGUI_SketcherDlg::Dir2Clicked(int constructorId) } else if ( myConstructorDirId == 3 ) { // DXDY - Group3Spin->SpinBox_DX->RangeStepAndValidator(-999999.999, 999999.999, 0.1, 3); - Group3Spin->SpinBox_DY->RangeStepAndValidator(-999999.999, 999999.999, 0.1, 3); - Group3Spin->SpinBox_DZ->RangeStepAndValidator(-999999.999, 999999.999, 100., 3); + Group3Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, 3); + Group3Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, 3); + Group3Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3); Group3Spin->TextLabel1->setText(tr("GEOM_SKETCHER_VX2")); Group3Spin->TextLabel2->setText(tr("GEOM_SKETCHER_VY2")); myDX = 0.0; @@ -550,9 +550,9 @@ void EntityGUI_SketcherDlg::Dir2Clicked(int constructorId) if ( constructorId == 2 ) { // Length mySketchType = DIR_ANGLE_LENGTH; - Group3Spin->SpinBox_DX->RangeStepAndValidator(-999999.999, 999999.999, 5., 3); - Group3Spin->SpinBox_DY->RangeStepAndValidator(-999999.999, 999999.999, 100., 3); - Group3Spin->SpinBox_DZ->RangeStepAndValidator(-999999.999, 999999.999, 5., 3); + Group3Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3); + Group3Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3); + Group3Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3); Group3Spin->TextLabel1->setText(tr("GEOM_SKETCHER_ANGLE2")); Group3Spin->TextLabel2->setText(tr("GEOM_SKETCHER_RADIUS2")); Group3Spin->TextLabel3->setText(tr("GEOM_SKETCHER_ANGLE2")); @@ -570,8 +570,8 @@ void EntityGUI_SketcherDlg::Dir2Clicked(int constructorId) if ( constructorId == 2 ) { // Length mySketchType = DIR_PER_LENGTH; - Group2Spin->SpinBox_DY->RangeStepAndValidator(-999999.999, 999999.999, 100., 3); - Group2Spin->SpinBox_DY->RangeStepAndValidator(-999999.999, 999999.999, 5., 3); + Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3); + Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3); Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_RADIUS2")); Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_ANGLE2")); myRadius = 100.0; @@ -587,8 +587,8 @@ void EntityGUI_SketcherDlg::Dir2Clicked(int constructorId) if ( constructorId == 2 ) { // Length mySketchType = DIR_TAN_LENGTH; - Group2Spin->SpinBox_DY->RangeStepAndValidator(-999999.999, 999999.999, 100., 3); - Group2Spin->SpinBox_DY->RangeStepAndValidator(-999999.999, 999999.999, 5., 3); + Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3); + Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3); Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_RADIUS2")); Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_ANGLE2")); myRadius = 100.0; diff --git a/src/GenerationGUI/GenerationGUI_PrismDlg.cxx b/src/GenerationGUI/GenerationGUI_PrismDlg.cxx index 1d536a1ae..904f28c01 100644 --- a/src/GenerationGUI/GenerationGUI_PrismDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_PrismDlg.cxx @@ -133,7 +133,7 @@ void GenerationGUI_PrismDlg::Init() double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100); /* min, max, step and decimals for spin boxes & initial values */ - GroupPoints->SpinBox_DX->RangeStepAndValidator(-999.999, +999.999, step, 3); + GroupPoints->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); GroupPoints->SpinBox_DX->SetValue(100.0); /* signals and slots connections */ diff --git a/src/GenerationGUI/GenerationGUI_RevolDlg.cxx b/src/GenerationGUI/GenerationGUI_RevolDlg.cxx index 8ef0d44e6..662d2161b 100644 --- a/src/GenerationGUI/GenerationGUI_RevolDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_RevolDlg.cxx @@ -115,7 +115,7 @@ void GenerationGUI_RevolDlg::Init() double SpecificStep = 5; /* min, max, step and decimals for spin boxes & initial values */ - GroupPoints->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, SpecificStep, 3); + GroupPoints->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, SpecificStep, 3); GroupPoints->SpinBox_DX->SetValue(45.0); /* signals and slots connections */ diff --git a/src/OperationGUI/OperationGUI_ArchimedeDlg.cxx b/src/OperationGUI/OperationGUI_ArchimedeDlg.cxx index 149fdba75..886adba41 100644 --- a/src/OperationGUI/OperationGUI_ArchimedeDlg.cxx +++ b/src/OperationGUI/OperationGUI_ArchimedeDlg.cxx @@ -103,9 +103,9 @@ void OperationGUI_ArchimedeDlg::Init() double SpecificStep1 = 0.1; double SpecificStep2 = 0.01; /* min, max, myStep and decimals for spin boxes & initial values */ - GroupPoints->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, myStep, 3); - GroupPoints->SpinBox_DY->RangeStepAndValidator(0.001, 999.999, SpecificStep1, 3); - GroupPoints->SpinBox_DZ->RangeStepAndValidator(0.001, 999.999, SpecificStep2, 3); + GroupPoints->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, myStep, 3); + GroupPoints->SpinBox_DY->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep1, 3); + GroupPoints->SpinBox_DZ->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep2, 3); GroupPoints->SpinBox_DX->SetValue( 100.0 ); GroupPoints->SpinBox_DY->SetValue( 1.0 ); diff --git a/src/OperationGUI/OperationGUI_ChamferDlg.cxx b/src/OperationGUI/OperationGUI_ChamferDlg.cxx index fc2b12e96..1a4f75ecd 100644 --- a/src/OperationGUI/OperationGUI_ChamferDlg.cxx +++ b/src/OperationGUI/OperationGUI_ChamferDlg.cxx @@ -146,7 +146,7 @@ OperationGUI_ChamferDlg::OperationGUI_ChamferDlg(GeometryGUI* theGeometryGUI, QW double SpecificStep = 10.0; QMap< int, DlgRef_SpinBox* >::iterator anIter; for ( anIter = mySpinBox.begin(); anIter != mySpinBox.end(); ++anIter ) - anIter.data()->RangeStepAndValidator( 0.001, 999.999, SpecificStep, 3 ); + anIter.data()->RangeStepAndValidator( 0.001, COORD_MAX, SpecificStep, 3 ); setHelpFileName("chamfer.htm"); diff --git a/src/OperationGUI/OperationGUI_ClippingDlg.cxx b/src/OperationGUI/OperationGUI_ClippingDlg.cxx index 221e1c073..9e451629f 100644 --- a/src/OperationGUI/OperationGUI_ClippingDlg.cxx +++ b/src/OperationGUI/OperationGUI_ClippingDlg.cxx @@ -109,8 +109,8 @@ OperationGUI_ClippingDlg::OperationGUI_ClippingDlg(GeometryGUI* theGeometryGUI, Layout1->addWidget( GroupArguments, 2, 0 ); /* Initialisations */ - SpinBox_Near->RangeStepAndValidator( -999999.999, +999999.999, 10.0, 3 ); - SpinBox_Far->RangeStepAndValidator( -999999.999, +999999.999, 10.0, 3 ); + SpinBox_Near->RangeStepAndValidator( COORD_MIN, COORD_MAX, 10.0, 3 ); + SpinBox_Far->RangeStepAndValidator( COORD_MIN, COORD_MAX, 10.0, 3 ); /* signals and slots connections */ connect( buttonOk , SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) ); diff --git a/src/OperationGUI/OperationGUI_FilletDlg.cxx b/src/OperationGUI/OperationGUI_FilletDlg.cxx index d512a33b4..62633cd0a 100644 --- a/src/OperationGUI/OperationGUI_FilletDlg.cxx +++ b/src/OperationGUI/OperationGUI_FilletDlg.cxx @@ -105,9 +105,9 @@ OperationGUI_FilletDlg::OperationGUI_FilletDlg(GeometryGUI* theGeometryGUI, QWid /***************************************************************/ double SpecificStep = 10.0; - Group1->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, SpecificStep, 3); - Group2->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, SpecificStep, 3); - Group3->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, SpecificStep, 3); + Group1->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep, 3); + Group2->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep, 3); + Group3->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep, 3); setHelpFileName("fillet.htm"); diff --git a/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx index 28e59287c..23e9ce46a 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx @@ -117,9 +117,9 @@ void PrimitiveGUI_BoxDlg::Init() double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100); /* min, max, step and decimals for spin boxes */ - GroupDimensions->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, step, 3); - GroupDimensions->SpinBox_DY->RangeStepAndValidator(-999.999, 999.999, step, 3); - GroupDimensions->SpinBox_DZ->RangeStepAndValidator(-999.999, 999.999, step, 3); + GroupDimensions->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); + GroupDimensions->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); + GroupDimensions->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); double initValue = 200.0; GroupDimensions->SpinBox_DX->SetValue(initValue); diff --git a/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx index cd250f830..7de92356e 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx @@ -119,12 +119,12 @@ void PrimitiveGUI_ConeDlg::Init() double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100); /* min, max, step and decimals for spin boxes & initial values */ - GroupPoints->SpinBox_DX->RangeStepAndValidator(0.000, 999.999, step, 3); - GroupPoints->SpinBox_DY->RangeStepAndValidator(0.000, 999.999, step, 3); - GroupPoints->SpinBox_DZ->RangeStepAndValidator(-999.999, 999.999, step, 3); - GroupDimensions->SpinBox_DX->RangeStepAndValidator(0.000, 999.999, step, 3); - GroupDimensions->SpinBox_DY->RangeStepAndValidator(0.000, 999.999, step, 3); - GroupDimensions->SpinBox_DZ->RangeStepAndValidator(-999.999, 999.999, step, 3); + GroupPoints->SpinBox_DX->RangeStepAndValidator(0.000, COORD_MAX, step, 3); + GroupPoints->SpinBox_DY->RangeStepAndValidator(0.000, COORD_MAX, step, 3); + GroupPoints->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); + GroupDimensions->SpinBox_DX->RangeStepAndValidator(0.000, COORD_MAX, step, 3); + GroupDimensions->SpinBox_DY->RangeStepAndValidator(0.000, COORD_MAX, step, 3); + GroupDimensions->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); double aRadius1(100.0), aRadius2(0.0), aHeight(300.0); GroupPoints->SpinBox_DX->SetValue(aRadius1); diff --git a/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx index 7a5f38236..503211cf2 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx @@ -118,13 +118,13 @@ void PrimitiveGUI_CylinderDlg::Init() /* min, max, step and decimals for spin boxes & initial values */ /* First constructor : radius */ - GroupPoints->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, step, 3); + GroupPoints->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, step, 3); /* First constructor : algebric height */ - GroupPoints->SpinBox_DY->RangeStepAndValidator(-999.999, 999.999, step, 3); + GroupPoints->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); /* Second constructor : radius */ - GroupDimensions->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, step, 3); + GroupDimensions->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, step, 3); /* Second constructor : algebric height */ - GroupDimensions->SpinBox_DY->RangeStepAndValidator(-999.999, 999.999, step, 3); + GroupDimensions->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); GroupPoints->SpinBox_DX->SetValue(100.0); GroupPoints->SpinBox_DY->SetValue(300.0); diff --git a/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx index 3c4e8adeb..f52f0822a 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx @@ -112,8 +112,8 @@ void PrimitiveGUI_SphereDlg::Init() double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100); /* min, max, step and decimals for spin boxes */ - GroupPoints->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, step, 3); - GroupDimensions->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, step, 3); + GroupPoints->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, step, 3); + GroupDimensions->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, step, 3); GroupPoints->SpinBox_DX->SetValue(100.0); GroupDimensions->SpinBox_DX->SetValue(100.0); diff --git a/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx index fe98d7cc7..7ab9ca465 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx @@ -117,10 +117,10 @@ void PrimitiveGUI_TorusDlg::Init() double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100); /* min, max, step and decimals for spin boxes & initial values */ - GroupPoints->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, step, 3); - GroupPoints->SpinBox_DY->RangeStepAndValidator(0.001, 999.999, step, 3); - GroupDimensions->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, step, 3); - GroupDimensions->SpinBox_DY->RangeStepAndValidator(0.001, 999.999, step, 3); + GroupPoints->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, step, 3); + GroupPoints->SpinBox_DY->RangeStepAndValidator(0.001, COORD_MAX, step, 3); + GroupDimensions->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, step, 3); + GroupDimensions->SpinBox_DY->RangeStepAndValidator(0.001, COORD_MAX, step, 3); GroupPoints->SpinBox_DX->SetValue(300.0); GroupPoints->SpinBox_DY->SetValue(100.0); diff --git a/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx b/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx index 01c8b24a0..a8e212328 100644 --- a/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx @@ -124,13 +124,13 @@ void TransformationGUI_MultiRotationDlg::Init() double SpecificStep1 = 5; double SpecificStep2 = 1; /* min, max, step and decimals for spin boxes & initial values */ - GroupPoints->SpinBox_DX->RangeStepAndValidator(1.0, 999.999, SpecificStep2, 3); + GroupPoints->SpinBox_DX->RangeStepAndValidator(1.0, COORD_MAX, SpecificStep2, 3); GroupPoints->SpinBox_DX->SetValue(myNbTimes1); - GroupDimensions->SpinBox_DX1->RangeStepAndValidator(-999.999, 999.999, SpecificStep1, 3); - GroupDimensions->SpinBox_DY1->RangeStepAndValidator(1.0, 999.999, SpecificStep2, 3); - GroupDimensions->SpinBox_DX2->RangeStepAndValidator(-999.999, 999.999, step, 3); - GroupDimensions->SpinBox_DY2->RangeStepAndValidator(1.0, 999.999, SpecificStep2, 3); + GroupDimensions->SpinBox_DX1->RangeStepAndValidator(COORD_MIN, COORD_MAX, SpecificStep1, 3); + GroupDimensions->SpinBox_DY1->RangeStepAndValidator(1.0, COORD_MAX, SpecificStep2, 3); + GroupDimensions->SpinBox_DX2->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); + GroupDimensions->SpinBox_DY2->RangeStepAndValidator(1.0, COORD_MAX, SpecificStep2, 3); GroupDimensions->SpinBox_DX1->SetValue(myAng); GroupDimensions->SpinBox_DY1->SetValue(myNbTimes1); GroupDimensions->SpinBox_DX2->SetValue(myStep); diff --git a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx index c1e7aed86..f340bc998 100644 --- a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx @@ -130,15 +130,15 @@ void TransformationGUI_MultiTranslationDlg::Init() double SpecificStep = 1; /* min, max, step and decimals for spin boxes & initial values */ - GroupPoints->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, step, 3); - GroupPoints->SpinBox_DY->RangeStepAndValidator(1.0, 999.999, SpecificStep, 3); + GroupPoints->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); + GroupPoints->SpinBox_DY->RangeStepAndValidator(1.0, COORD_MAX, SpecificStep, 3); GroupPoints->SpinBox_DX->SetValue(myStepU); GroupPoints->SpinBox_DY->SetValue(myNbTimesU); - GroupDimensions->SpinBox_DX1->RangeStepAndValidator(-999.999, 999.999, step, 3); - GroupDimensions->SpinBox_DY1->RangeStepAndValidator(1.0, 999.999, SpecificStep, 3); - GroupDimensions->SpinBox_DX2->RangeStepAndValidator(-999.999, 999.999, step, 3); - GroupDimensions->SpinBox_DY2->RangeStepAndValidator(1.0, 999.999, SpecificStep, 3); + GroupDimensions->SpinBox_DX1->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); + GroupDimensions->SpinBox_DY1->RangeStepAndValidator(1.0, COORD_MAX, SpecificStep, 3); + GroupDimensions->SpinBox_DX2->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); + GroupDimensions->SpinBox_DY2->RangeStepAndValidator(1.0, COORD_MAX, SpecificStep, 3); GroupDimensions->SpinBox_DX1->SetValue(myStepU); GroupDimensions->SpinBox_DY1->SetValue(myNbTimesU); GroupDimensions->SpinBox_DX2->SetValue(myStepV); diff --git a/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx b/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx index 6fe4f3bc4..df59894a7 100644 --- a/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx @@ -108,7 +108,7 @@ void TransformationGUI_OffsetDlg::Init() double step = 1; /* min, max, step and decimals for spin boxes & initial values */ - GroupPoints->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, step, 3); + GroupPoints->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); GroupPoints->SpinBox_DX->setPrecision(5); //@ GroupPoints->SpinBox_DX->setDblPrecision(1e-05); GroupPoints->SpinBox_DX->SetValue(1e-05); diff --git a/src/TransformationGUI/TransformationGUI_RotationDlg.cxx b/src/TransformationGUI/TransformationGUI_RotationDlg.cxx index 6f07b1c73..c22db8006 100644 --- a/src/TransformationGUI/TransformationGUI_RotationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_RotationDlg.cxx @@ -82,7 +82,7 @@ TransformationGUI_RotationDlg::TransformationGUI_RotationDlg double anAngle = 0; double SpecificStep = 5; /* min, max, step and decimals for spin boxes & initial values */ - GroupPoints->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, SpecificStep, 3); + GroupPoints->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, SpecificStep, 3); GroupPoints->SpinBox_DX->SetValue(anAngle); // Activate Create a Copy mode diff --git a/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx b/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx index 259a1da2d..40e6cc20a 100644 --- a/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx @@ -85,7 +85,7 @@ TransformationGUI_ScaleDlg::TransformationGUI_ScaleDlg(GeometryGUI* theGeometryG double aFactor = 2.0; double SpecificStep = 0.5; /* min, max, step and decimals for spin boxes & initial values */ - GroupPoints->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, SpecificStep, 3); + GroupPoints->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, SpecificStep, 3); GroupPoints->SpinBox_DX->SetValue(aFactor); // Activate Create a Copy mode diff --git a/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx b/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx index 0a02a62a6..5e022bc88 100644 --- a/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx @@ -124,9 +124,9 @@ void TransformationGUI_TranslationDlg::Init() double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100); /* min, max, step and decimals for spin boxes & initial values */ - GroupPoints->SpinBox1->RangeStepAndValidator(-999.999, 999.999, step, 3); - GroupPoints->SpinBox2->RangeStepAndValidator(-999.999, 999.999, step, 3); - GroupPoints->SpinBox3->RangeStepAndValidator(-999.999, 999.999, step, 3); + GroupPoints->SpinBox1->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); + GroupPoints->SpinBox2->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); + GroupPoints->SpinBox3->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); GroupPoints->SpinBox1->SetValue(0.0); GroupPoints->SpinBox2->SetValue(0.0); -- 2.39.2