diff --git a/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx b/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx index 1a5d1252e..22236aad8 100644 --- a/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx @@ -317,10 +317,10 @@ SMESHGUI_ExtrusionAlongPathDlg::SMESHGUI_ExtrusionAlongPathDlg( SMESHGUI* theMod /***************************************************************/ // Initialisations - XSpin->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3); - YSpin->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3); - ZSpin->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3); - AngleSpin->RangeStepAndValidator(-999999.999, +999999.999, 5.0, 3); + XSpin->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3); + YSpin->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3); + ZSpin->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3); + AngleSpin->RangeStepAndValidator(-180.0, 180.0, 5.0, 3); mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector(); diff --git a/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx b/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx index 9ec24518c..50c439f30 100644 --- a/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx @@ -227,9 +227,9 @@ SMESHGUI_ExtrusionDlg::SMESHGUI_ExtrusionDlg (SMESHGUI* theModule, SMESHGUI_ExtrusionDlgLayout->addWidget(GroupArguments, 1, 0); /* Initialisations */ - SpinBox_Dx->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3); - SpinBox_Dy->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3); - SpinBox_Dz->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3); + SpinBox_Dx->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3); + SpinBox_Dy->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3); + SpinBox_Dz->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3); QIntValidator* anIntValidator = new QIntValidator(SpinBox_NbSteps); SpinBox_NbSteps->setValidator(anIntValidator); diff --git a/src/SMESHGUI/SMESHGUI_MergeNodesDlg.cxx b/src/SMESHGUI/SMESHGUI_MergeNodesDlg.cxx index f867a0ce3..c16fab197 100644 --- a/src/SMESHGUI/SMESHGUI_MergeNodesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MergeNodesDlg.cxx @@ -246,7 +246,7 @@ SMESHGUI_MergeNodesDlg::SMESHGUI_MergeNodesDlg( SMESHGUI* theModule, const char* SMESHGUI_MergeNodesDlgLayout->addWidget(GroupEdit, 3, 0); /* Initialisations */ - SpinBoxTolerance->RangeStepAndValidator(0.0, 999999.999, 0.1, 3); + SpinBoxTolerance->RangeStepAndValidator(0.0, COORD_MAX, 0.1, 3); SpinBoxTolerance->SetValue(1e-05); RadioButton1->setChecked(TRUE); diff --git a/src/SMESHGUI/SMESHGUI_MoveNodesDlg.cxx b/src/SMESHGUI/SMESHGUI_MoveNodesDlg.cxx index d41095822..4fc7e997b 100644 --- a/src/SMESHGUI/SMESHGUI_MoveNodesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MoveNodesDlg.cxx @@ -185,9 +185,9 @@ QFrame* SMESHGUI_MoveNodesDlg::createMainFrame (QWidget* theParent) new QLabel(tr("SMESH_Z"), aCoordGrp); myZ = new SMESHGUI_SpinBox(aCoordGrp); - myX->RangeStepAndValidator(-999999.999, +999999.999, 25.0, 3); - myY->RangeStepAndValidator(-999999.999, +999999.999, 25.0, 3); - myZ->RangeStepAndValidator(-999999.999, +999999.999, 25.0, 3); + myX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 25.0, 3); + myY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 25.0, 3); + myZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 25.0, 3); QVBoxLayout* aLay = new QVBoxLayout(aFrame); aLay->addWidget(aPixGrp); diff --git a/src/SMESHGUI/SMESHGUI_NodesDlg.cxx b/src/SMESHGUI/SMESHGUI_NodesDlg.cxx index 5b71bfb2e..8a1a13e23 100644 --- a/src/SMESHGUI/SMESHGUI_NodesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_NodesDlg.cxx @@ -358,9 +358,9 @@ void SMESHGUI_NodesDlg::Init () step = 25.0; /* min, max, step and decimals for spin boxes */ - SpinBox_X->RangeStepAndValidator(-999.999, +999.999, step, 3); - SpinBox_Y->RangeStepAndValidator(-999.999, +999.999, step, 3); - SpinBox_Z->RangeStepAndValidator(-999.999, +999.999, step, 3); + SpinBox_X->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); + SpinBox_Y->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); + SpinBox_Z->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); SpinBox_X->SetValue(0.0); SpinBox_Y->SetValue(0.0); SpinBox_Z->SetValue(0.0); diff --git a/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx b/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx index 581724f6f..c5c546ade 100644 --- a/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx @@ -286,20 +286,20 @@ SMESHGUI_RevolutionDlg::SMESHGUI_RevolutionDlg( SMESHGUI* theModule, const char* SMESHGUI_RevolutionDlgLayout->addWidget(GroupArguments, 1, 0); /* Initialisations */ - SpinBox_X->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3); - SpinBox_Y->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3); - SpinBox_Z->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3); - SpinBox_DX->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3); - SpinBox_DY->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3); - SpinBox_DZ->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3); + SpinBox_X->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3); + SpinBox_Y->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3); + SpinBox_Z->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3); + SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3); + SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3); + SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3); - SpinBox_Angle->RangeStepAndValidator(-999999.999, +999999.999, 5.0, 3); + SpinBox_Angle->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5.0, 3); QIntValidator* anIntValidator = new QIntValidator(SpinBox_NbSteps); SpinBox_NbSteps->setValidator(anIntValidator); SpinBox_NbSteps->setRange(1, 999999); - SpinBox_Tolerance->RangeStepAndValidator(0.0, +999999.999, 0.1, 6); + SpinBox_Tolerance->RangeStepAndValidator(0.0, COORD_MAX, 0.1, 6); GroupArguments->show(); RadioButton1->setChecked(TRUE); diff --git a/src/SMESHGUI/SMESHGUI_RotationDlg.cxx b/src/SMESHGUI/SMESHGUI_RotationDlg.cxx index d557aab26..2e515ec02 100644 --- a/src/SMESHGUI/SMESHGUI_RotationDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_RotationDlg.cxx @@ -279,14 +279,14 @@ SMESHGUI_RotationDlg::SMESHGUI_RotationDlg( SMESHGUI* theModule, const char* nam SMESHGUI_RotationDlgLayout->addWidget(GroupArguments, 1, 0); /* Initialisations */ - SpinBox_X->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3); - SpinBox_Y->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3); - SpinBox_Z->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3); - SpinBox_DX->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3); - SpinBox_DY->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3); - SpinBox_DZ->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3); + SpinBox_X->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3); + SpinBox_Y->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3); + SpinBox_Z->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3); + SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3); + SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3); + SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3); - SpinBox_Angle->RangeStepAndValidator(-999999.999, +999999.999, 5.0, 3); + SpinBox_Angle->RangeStepAndValidator(-360.0, +360.0, 5.0, 3); GroupArguments->show(); myConstructorId = 0; diff --git a/src/SMESHGUI/SMESHGUI_SpinBox.h b/src/SMESHGUI/SMESHGUI_SpinBox.h index 73548671a..576db9221 100644 --- a/src/SMESHGUI/SMESHGUI_SpinBox.h +++ b/src/SMESHGUI/SMESHGUI_SpinBox.h @@ -31,6 +31,10 @@ #include +// like in GEOM_SRC/src/DlgRef/DlgRef_SpinBox.h +#define COORD_MIN -1e+15 +#define COORD_MAX +1e+15 + //================================================================================= // class : SMESHGUI_SpinBox // purpose : Derivated from QtxDblSpinBox class diff --git a/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx b/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx index d6653b18b..07aa3d4bc 100644 --- a/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx @@ -277,12 +277,12 @@ SMESHGUI_SymmetryDlg::SMESHGUI_SymmetryDlg( SMESHGUI* theModule, const char* nam SMESHGUI_SymmetryDlgLayout->addWidget(GroupArguments, 1, 0); /* Initialisations */ - SpinBox_X->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3); - SpinBox_Y->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3); - SpinBox_Z->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3); - SpinBox_DX->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3); - SpinBox_DY->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3); - SpinBox_DZ->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3); + SpinBox_X->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3); + SpinBox_Y->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3); + SpinBox_Z->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3); + SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3); + SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3); + SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3); GroupArguments->show(); RadioButton1->setChecked(TRUE); diff --git a/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx b/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx index fdda6415c..499f43ff5 100644 --- a/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx @@ -257,12 +257,12 @@ SMESHGUI_TranslationDlg::SMESHGUI_TranslationDlg( SMESHGUI* theModule, const cha SMESHGUI_TranslationDlgLayout->addWidget(GroupArguments, 1, 0); /* Initialisations */ - SpinBox1_1->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3); - SpinBox1_2->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3); - SpinBox1_3->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3); - SpinBox2_1->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3); - SpinBox2_2->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3); - SpinBox2_3->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3); + SpinBox1_1->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3); + SpinBox1_2->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3); + SpinBox1_3->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3); + SpinBox2_1->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3); + SpinBox2_2->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3); + SpinBox2_3->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3); GroupArguments->show(); RadioButton1->setChecked(TRUE);