mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-29 02:40:35 +05:00
PAL12789. Add and use COORD_MIN and COORD_MAX macros
This commit is contained in:
parent
36f1b2af07
commit
9d574375ee
@ -317,10 +317,10 @@ SMESHGUI_ExtrusionAlongPathDlg::SMESHGUI_ExtrusionAlongPathDlg( SMESHGUI* theMod
|
|||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
// Initialisations
|
// Initialisations
|
||||||
XSpin->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3);
|
XSpin->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
|
||||||
YSpin->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3);
|
YSpin->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
|
||||||
ZSpin->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3);
|
ZSpin->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
|
||||||
AngleSpin->RangeStepAndValidator(-999999.999, +999999.999, 5.0, 3);
|
AngleSpin->RangeStepAndValidator(-180.0, 180.0, 5.0, 3);
|
||||||
|
|
||||||
mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
|
mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
|
||||||
|
|
||||||
|
@ -227,9 +227,9 @@ SMESHGUI_ExtrusionDlg::SMESHGUI_ExtrusionDlg (SMESHGUI* theModule,
|
|||||||
SMESHGUI_ExtrusionDlgLayout->addWidget(GroupArguments, 1, 0);
|
SMESHGUI_ExtrusionDlgLayout->addWidget(GroupArguments, 1, 0);
|
||||||
|
|
||||||
/* Initialisations */
|
/* Initialisations */
|
||||||
SpinBox_Dx->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3);
|
SpinBox_Dx->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
|
||||||
SpinBox_Dy->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3);
|
SpinBox_Dy->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
|
||||||
SpinBox_Dz->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3);
|
SpinBox_Dz->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
|
||||||
|
|
||||||
QIntValidator* anIntValidator = new QIntValidator(SpinBox_NbSteps);
|
QIntValidator* anIntValidator = new QIntValidator(SpinBox_NbSteps);
|
||||||
SpinBox_NbSteps->setValidator(anIntValidator);
|
SpinBox_NbSteps->setValidator(anIntValidator);
|
||||||
|
@ -246,7 +246,7 @@ SMESHGUI_MergeNodesDlg::SMESHGUI_MergeNodesDlg( SMESHGUI* theModule, const char*
|
|||||||
SMESHGUI_MergeNodesDlgLayout->addWidget(GroupEdit, 3, 0);
|
SMESHGUI_MergeNodesDlgLayout->addWidget(GroupEdit, 3, 0);
|
||||||
|
|
||||||
/* Initialisations */
|
/* Initialisations */
|
||||||
SpinBoxTolerance->RangeStepAndValidator(0.0, 999999.999, 0.1, 3);
|
SpinBoxTolerance->RangeStepAndValidator(0.0, COORD_MAX, 0.1, 3);
|
||||||
SpinBoxTolerance->SetValue(1e-05);
|
SpinBoxTolerance->SetValue(1e-05);
|
||||||
|
|
||||||
RadioButton1->setChecked(TRUE);
|
RadioButton1->setChecked(TRUE);
|
||||||
|
@ -185,9 +185,9 @@ QFrame* SMESHGUI_MoveNodesDlg::createMainFrame (QWidget* theParent)
|
|||||||
new QLabel(tr("SMESH_Z"), aCoordGrp);
|
new QLabel(tr("SMESH_Z"), aCoordGrp);
|
||||||
myZ = new SMESHGUI_SpinBox(aCoordGrp);
|
myZ = new SMESHGUI_SpinBox(aCoordGrp);
|
||||||
|
|
||||||
myX->RangeStepAndValidator(-999999.999, +999999.999, 25.0, 3);
|
myX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 25.0, 3);
|
||||||
myY->RangeStepAndValidator(-999999.999, +999999.999, 25.0, 3);
|
myY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 25.0, 3);
|
||||||
myZ->RangeStepAndValidator(-999999.999, +999999.999, 25.0, 3);
|
myZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 25.0, 3);
|
||||||
|
|
||||||
QVBoxLayout* aLay = new QVBoxLayout(aFrame);
|
QVBoxLayout* aLay = new QVBoxLayout(aFrame);
|
||||||
aLay->addWidget(aPixGrp);
|
aLay->addWidget(aPixGrp);
|
||||||
|
@ -358,9 +358,9 @@ void SMESHGUI_NodesDlg::Init ()
|
|||||||
step = 25.0;
|
step = 25.0;
|
||||||
|
|
||||||
/* min, max, step and decimals for spin boxes */
|
/* min, max, step and decimals for spin boxes */
|
||||||
SpinBox_X->RangeStepAndValidator(-999.999, +999.999, step, 3);
|
SpinBox_X->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||||
SpinBox_Y->RangeStepAndValidator(-999.999, +999.999, step, 3);
|
SpinBox_Y->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||||
SpinBox_Z->RangeStepAndValidator(-999.999, +999.999, step, 3);
|
SpinBox_Z->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
|
||||||
SpinBox_X->SetValue(0.0);
|
SpinBox_X->SetValue(0.0);
|
||||||
SpinBox_Y->SetValue(0.0);
|
SpinBox_Y->SetValue(0.0);
|
||||||
SpinBox_Z->SetValue(0.0);
|
SpinBox_Z->SetValue(0.0);
|
||||||
|
@ -286,20 +286,20 @@ SMESHGUI_RevolutionDlg::SMESHGUI_RevolutionDlg( SMESHGUI* theModule, const char*
|
|||||||
SMESHGUI_RevolutionDlgLayout->addWidget(GroupArguments, 1, 0);
|
SMESHGUI_RevolutionDlgLayout->addWidget(GroupArguments, 1, 0);
|
||||||
|
|
||||||
/* Initialisations */
|
/* Initialisations */
|
||||||
SpinBox_X->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3);
|
SpinBox_X->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
|
||||||
SpinBox_Y->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3);
|
SpinBox_Y->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
|
||||||
SpinBox_Z->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3);
|
SpinBox_Z->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
|
||||||
SpinBox_DX->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3);
|
SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
|
||||||
SpinBox_DY->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3);
|
SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
|
||||||
SpinBox_DZ->RangeStepAndValidator(-999999.999, +999999.999, 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);
|
QIntValidator* anIntValidator = new QIntValidator(SpinBox_NbSteps);
|
||||||
SpinBox_NbSteps->setValidator(anIntValidator);
|
SpinBox_NbSteps->setValidator(anIntValidator);
|
||||||
SpinBox_NbSteps->setRange(1, 999999);
|
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();
|
GroupArguments->show();
|
||||||
RadioButton1->setChecked(TRUE);
|
RadioButton1->setChecked(TRUE);
|
||||||
|
@ -279,14 +279,14 @@ SMESHGUI_RotationDlg::SMESHGUI_RotationDlg( SMESHGUI* theModule, const char* nam
|
|||||||
SMESHGUI_RotationDlgLayout->addWidget(GroupArguments, 1, 0);
|
SMESHGUI_RotationDlgLayout->addWidget(GroupArguments, 1, 0);
|
||||||
|
|
||||||
/* Initialisations */
|
/* Initialisations */
|
||||||
SpinBox_X->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3);
|
SpinBox_X->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
|
||||||
SpinBox_Y->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3);
|
SpinBox_Y->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
|
||||||
SpinBox_Z->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3);
|
SpinBox_Z->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
|
||||||
SpinBox_DX->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3);
|
SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
|
||||||
SpinBox_DY->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3);
|
SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
|
||||||
SpinBox_DZ->RangeStepAndValidator(-999999.999, +999999.999, 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();
|
GroupArguments->show();
|
||||||
myConstructorId = 0;
|
myConstructorId = 0;
|
||||||
|
@ -31,6 +31,10 @@
|
|||||||
|
|
||||||
#include <QtxDblSpinBox.h>
|
#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
|
// class : SMESHGUI_SpinBox
|
||||||
// purpose : Derivated from QtxDblSpinBox class
|
// purpose : Derivated from QtxDblSpinBox class
|
||||||
|
@ -277,12 +277,12 @@ SMESHGUI_SymmetryDlg::SMESHGUI_SymmetryDlg( SMESHGUI* theModule, const char* nam
|
|||||||
SMESHGUI_SymmetryDlgLayout->addWidget(GroupArguments, 1, 0);
|
SMESHGUI_SymmetryDlgLayout->addWidget(GroupArguments, 1, 0);
|
||||||
|
|
||||||
/* Initialisations */
|
/* Initialisations */
|
||||||
SpinBox_X->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3);
|
SpinBox_X->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
|
||||||
SpinBox_Y->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3);
|
SpinBox_Y->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
|
||||||
SpinBox_Z->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3);
|
SpinBox_Z->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
|
||||||
SpinBox_DX->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3);
|
SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
|
||||||
SpinBox_DY->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3);
|
SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
|
||||||
SpinBox_DZ->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3);
|
SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
|
||||||
|
|
||||||
GroupArguments->show();
|
GroupArguments->show();
|
||||||
RadioButton1->setChecked(TRUE);
|
RadioButton1->setChecked(TRUE);
|
||||||
|
@ -257,12 +257,12 @@ SMESHGUI_TranslationDlg::SMESHGUI_TranslationDlg( SMESHGUI* theModule, const cha
|
|||||||
SMESHGUI_TranslationDlgLayout->addWidget(GroupArguments, 1, 0);
|
SMESHGUI_TranslationDlgLayout->addWidget(GroupArguments, 1, 0);
|
||||||
|
|
||||||
/* Initialisations */
|
/* Initialisations */
|
||||||
SpinBox1_1->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3);
|
SpinBox1_1->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
|
||||||
SpinBox1_2->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3);
|
SpinBox1_2->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
|
||||||
SpinBox1_3->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3);
|
SpinBox1_3->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
|
||||||
SpinBox2_1->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3);
|
SpinBox2_1->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
|
||||||
SpinBox2_2->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3);
|
SpinBox2_2->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
|
||||||
SpinBox2_3->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3);
|
SpinBox2_3->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
|
||||||
|
|
||||||
GroupArguments->show();
|
GroupArguments->show();
|
||||||
RadioButton1->setChecked(TRUE);
|
RadioButton1->setChecked(TRUE);
|
||||||
|
Loading…
Reference in New Issue
Block a user