PAL8769: Limitation to give values in Spin boxes. Now coordinates and displacements values can be within interval [-1e+15, 1e+15]

This commit is contained in:
jfa 2005-05-24 05:49:07 +00:00
parent c58190af55
commit 281105176b
17 changed files with 67 additions and 59 deletions

View File

@ -27,19 +27,20 @@
#include "SMESHGUI_CreatePatternDlg.h"
#include "QAD_Desktop.h"
#include "QAD_FileDlg.h"
#include "SMESHGUI_PatternWidget.h"
#include "SMESHGUI_SpinBox.h"
#include "SMESHGUI.h"
#include "SALOME_Selection.h"
#include "SALOME_ListIteratorOfListOfFilter.hxx"
#include "SALOMEGUI_QtCatchCorbaException.hxx"
#include "SMESH_NumberFilter.hxx"
#include "SMESHGUI_Utils.h"
#include "SMESHGUI_VTKUtils.h"
#include "SMESHGUI_PatternUtils.h"
#include "SMESHGUI_PatternWidget.h"
#include "SMESH_NumberFilter.hxx"
#include "SALOME_Selection.h"
#include "SALOME_ListIteratorOfListOfFilter.hxx"
#include "SALOMEGUI_QtCatchCorbaException.hxx"
#include "QAD_Desktop.h"
#include "QAD_FileDlg.h"
#include <TColStd_MapOfInteger.hxx>

View File

@ -39,7 +39,6 @@ class SMESHGUI_PatternWidget;
class QCloseEvent;
class QFrame;
class QLineEdit;
class SMESHGUI_SpinBox;
class QPushButton;
class SALOME_Selection;
class QRadioButton;

View File

@ -287,11 +287,12 @@ SMESHGUI_ExtrusionAlongPathDlg::SMESHGUI_ExtrusionAlongPathDlg( QWidget* parent,
/***************************************************************/
// 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( COORD_MIN, COORD_MAX, 5.0, 3 );
//?? AngleSpin->RangeStepAndValidator( -360., +360., 5.0, 3 );
mySelection = Sel;
mySMESHGUI = SMESHGUI::GetSMESHGUI() ;
mySMESHGUI->SetActiveDialogBox( this ) ;

View File

@ -202,9 +202,9 @@ SMESHGUI_ExtrusionDlg::SMESHGUI_ExtrusionDlg( QWidget* parent, const char* name,
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);

View File

@ -33,6 +33,7 @@
#include "SMESHGUI_VTKUtils.h"
#include "SMESHGUI_IdValidator.h"
#include "SMESHGUI_SpinBox.h"
#include "SMESH_Actor.h"
#include "SMDS_Mesh.hxx"
@ -222,7 +223,7 @@ SMESHGUI_MergeNodesDlg::SMESHGUI_MergeNodesDlg( QWidget* parent, const char* nam
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 );

View File

@ -166,9 +166,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 );

View File

@ -40,7 +40,6 @@ class QGroupBox;
class QListBox;
class QFrame;
class QLineEdit;
class SMESHGUI_SpinBox;
class QPushButton;
class SALOME_Selection;
class SMESH_Actor;

View File

@ -356,9 +356,9 @@ void SMESHGUI_NodesDlg::Init(SALOME_Selection* Sel)
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 ) ;

View File

@ -263,20 +263,21 @@ SMESHGUI_RevolutionDlg::SMESHGUI_RevolutionDlg( QWidget* parent, const char* nam
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 );
//??SpinBox_Angle->RangeStepAndValidator( -360., +360., 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 );

View File

@ -34,6 +34,7 @@
#include "SMESHGUI_VTKUtils.h"
#include "SMESHGUI_MeshUtils.h"
#include "SMESHGUI_IdValidator.h"
#include "SMESH_Actor.h"
#include "SMESH_TypeFilter.hxx"
#include "SMDS_Mesh.hxx"
@ -253,14 +254,15 @@ SMESHGUI_RotationDlg::SMESHGUI_RotationDlg( QWidget* parent, const char* name, S
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( COORD_MIN, COORD_MAX, 5.0, 3 );
//??SpinBox_Angle->RangeStepAndValidator( -360., +360., 5.0, 3 );
GroupArguments->show();
myConstructorId = 0 ;

View File

@ -34,13 +34,12 @@
#include "SMESHGUI_VTKUtils.h"
#include "SMESHGUI_MeshUtils.h"
#include "SMESHGUI_SpinBox.h"
#include "utilities.h"
#include "SALOME_Selection.h"
#include "SMESH_Actor.h"
#include "SMDS_Mesh.hxx"
#include "SALOME_Selection.h"
#include "utilities.h"
#include <qframe.h>
#include <qlayout.h>
#include <qlineedit.h>

View File

@ -35,7 +35,6 @@
class QCloseEvent;
class QFrame;
class QLineEdit;
class SMESHGUI_SpinBox;
class QPushButton;
class SALOME_Selection;
class SMESH_Actor;

View File

@ -215,7 +215,7 @@ SMESHGUI_SmoothingDlg::SMESHGUI_SmoothingDlg( QWidget* parent, const char* name,
QIntValidator* anIntValidator = new QIntValidator(SpinBox_IterationLimit);
SpinBox_IterationLimit->setValidator(anIntValidator);
SpinBox_IterationLimit->setRange( 1, 999999 );
SpinBox_AspectRatio->RangeStepAndValidator( 0.0, +999999.999, 0.1, 3 );
SpinBox_AspectRatio->RangeStepAndValidator( 0.0, COORD_MAX, 0.1, 3 );
GroupArguments->show();
myConstructorId = 0 ;

View File

@ -40,6 +40,7 @@ using namespace std;
SMESHGUI_SpinBox::SMESHGUI_SpinBox( QWidget* parent, const char* name )
: QAD_SpinBoxDbl( parent, name)
{
setPrecision(16);
}

View File

@ -31,6 +31,9 @@
#include "QAD_SpinBoxDbl.h"
#define COORD_MIN -1e+15
#define COORD_MAX +1e+15
//=================================================================================
// class : SMESHGUI_SpinBox
// purpose : Derivated from QAD_SpinBoxDbl class

View File

@ -34,6 +34,7 @@
#include "SMESHGUI_MeshUtils.h"
#include "SMESHGUI_IdValidator.h"
#include "SMESHGUI_SpinBox.h"
#include "SMESH_Actor.h"
#include "SMESH_TypeFilter.hxx"
#include "SMDS_Mesh.hxx"
@ -251,12 +252,12 @@ SMESHGUI_SymmetryDlg::SMESHGUI_SymmetryDlg( QWidget* parent, const char* name, S
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 );

View File

@ -34,6 +34,7 @@
#include "SMESHGUI_MeshUtils.h"
#include "SMESHGUI_IdValidator.h"
#include "SMESHGUI_SpinBox.h"
#include "SMESH_Actor.h"
#include "SMESH_TypeFilter.hxx"
#include "SMDS_Mesh.hxx"
@ -235,12 +236,12 @@ SMESHGUI_TranslationDlg::SMESHGUI_TranslationDlg( QWidget* parent, const char* n
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 );