Salome HOME
PAL12789. Add and use COORD_MIN and COORD_MAX macros
authoreap <eap@opencascade.com>
Mon, 3 Jul 2006 14:23:38 +0000 (14:23 +0000)
committereap <eap@opencascade.com>
Mon, 3 Jul 2006 14:23:38 +0000 (14:23 +0000)
src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx
src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx
src/SMESHGUI/SMESHGUI_MergeNodesDlg.cxx
src/SMESHGUI/SMESHGUI_MoveNodesDlg.cxx
src/SMESHGUI/SMESHGUI_NodesDlg.cxx
src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx
src/SMESHGUI/SMESHGUI_RotationDlg.cxx
src/SMESHGUI/SMESHGUI_SpinBox.h
src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx
src/SMESHGUI/SMESHGUI_TranslationDlg.cxx

index 1a5d1252eda1c40f61c11e1a3551d5e9cb0cc4ac..22236aad80275fe24e3b47f93373583ced1ebf64 100644 (file)
@@ -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();
 
index 9ec24518c92c923a98c99fb1fc9b80e79252ba2e..50c439f30e67fa417e521300412a99917efc307a 100644 (file)
@@ -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);
index f867a0ce399e01c4e8e37b70c69fb7117a6104ad..c16fab197a7db50218c404c519d7b9ba83018eda 100644 (file)
@@ -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);
index d410958224a5e9d2e987a518d263f0814f5eff8e..4fc7e997b4e24a4010412b0f4eea9b7e4cf45fd7 100644 (file)
@@ -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);
index 5b71bfb2ee8a7e90fdff5b840e7437bc08b5df3d..8a1a13e2352c4019e4d93ed298246f0cfaf69431 100644 (file)
@@ -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);
index 581724f6ffbb8c36877d1680683653e629952603..c5c546ade029f925ac81c50e899c4e747c004bd8 100644 (file)
@@ -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);
index d557aab26d0d85b2b36b4608ac0eed95c092c68e..2e515ec029ad9016c9fc54729251a29001f3bbdd 100644 (file)
@@ -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_Angle->RangeStepAndValidator(-999999.999, +999999.999, 5.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(-360.0, +360.0, 5.0, 3);
 
   GroupArguments->show();
   myConstructorId = 0;
index 73548671a7e923b6bfb6488258ff8af8d7bc7460..576db92217d1a9c94d1c47e78e093a70fe39d49c 100644 (file)
 
 #include <QtxDblSpinBox.h>
 
+// 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 
index d6653b18bd72ccdd1894f974faf2dcf1a6320f11..07aa3d4bc0fddd5f2a7ac8c2bd5c20fcbadd50c4 100644 (file)
@@ -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);
index fdda6415c025c0fa8837325cd8cd3559bd681ed9..499f43ff56d558263d0450130d3435d86a6350a1 100644 (file)
@@ -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);