From: akl Date: Thu, 20 Mar 2008 14:44:49 +0000 (+0000) Subject: Fix of IPAL19281(Stream Lines Preferences dialog: Step Length field - only 2 digits... X-Git-Tag: V5_0_0a1~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ad7b70cfcc1fb98a2efecabc0f5a14109020d320;p=modules%2Fvisu.git Fix of IPAL19281(Stream Lines Preferences dialog: Step Length field - only 2 digits after point available for input): use new initSpinBox method to set min, max, step and precision values for QDoubleSpinBox objects. --- diff --git a/src/VISUGUI/VisuGUI_StreamLinesDlg.cxx b/src/VISUGUI/VisuGUI_StreamLinesDlg.cxx index e9af85a1..1283305e 100644 --- a/src/VISUGUI/VisuGUI_StreamLinesDlg.cxx +++ b/src/VISUGUI/VisuGUI_StreamLinesDlg.cxx @@ -95,7 +95,7 @@ VisuGUI_StreamLinesDlg::VisuGUI_StreamLinesDlg (SalomeApp_Module* theModule) //aSourceBox->setColumnLayout(0, Qt::Vertical); QGridLayout* aSrcLayout = new QGridLayout( aSourceBox ); aSrcLayout->setSpacing( 6 ); - aSrcLayout->setMargin( 0 ); + aSrcLayout->setMargin( 11 ); QLabel* aTypeLbl = new QLabel( tr( "LBL_SOURCE_TYPE" ), aSourceBox); aSrcLayout->addWidget(aTypeLbl, 0, 0); @@ -216,28 +216,32 @@ VisuGUI_StreamLinesDlg::VisuGUI_StreamLinesDlg (SalomeApp_Module* theModule) QLabel* aPercentLbl = new QLabel (tr("LBL_USED_POINTS"), aSourceBox); aSrcLayout->addWidget(aPercentLbl, 2, 0); - myPntPercent = new QtxDoubleSpinBox( 0, 1, 0.1, aSourceBox ); + myPntPercent = new QtxDoubleSpinBox( aSourceBox ); + VISU::initSpinBox(myPntPercent, 0, 1); aSrcLayout->addWidget(myPntPercent, 2, 1); TopLayout->addWidget(aSourceBox, 0, 0, 1, 2); QLabel* aStepLenLbl = new QLabel (tr("LBL_STEP_LENGTH"), aTopBox); TopLayout->addWidget(aStepLenLbl, 1, 0); - myStepLen = new QtxDoubleSpinBox( DBL_MIN, DBL_MAX, 0.1, aTopBox ); + myStepLen = new QtxDoubleSpinBox( aTopBox ); + VISU::initSpinBox(myStepLen, DBL_MIN, DBL_MAX); myStepLen->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); TopLayout->addWidget(myStepLen, 1, 1); connect(myStepLen, SIGNAL(valueChanged(double)), this, SLOT(StepLengthChanged(double))); QLabel* aIntegStepLenLbl = new QLabel (tr("LBL_INTEGRATION_STEP"), aTopBox); TopLayout->addWidget(aIntegStepLenLbl, 2, 0); - myIntegStepLen = new QtxDoubleSpinBox( DBL_MIN, DBL_MAX, 0.1, aTopBox ); + myIntegStepLen = new QtxDoubleSpinBox( aTopBox ); + VISU::initSpinBox(myIntegStepLen, DBL_MIN, DBL_MAX); myIntegStepLen->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); TopLayout->addWidget(myIntegStepLen, 2, 1); connect(myIntegStepLen, SIGNAL(valueChanged(double)), this, SLOT(IntegrationStepChanged(double))); QLabel* aPropagationLbl = new QLabel (tr("LBL_PROPAGATION_TIME"), aTopBox); TopLayout->addWidget(aPropagationLbl, 3, 0); - myPropTime = new QtxDoubleSpinBox( DBL_MIN, DBL_MAX, 1, aTopBox ); + myPropTime = new QtxDoubleSpinBox( aTopBox ); + VISU::initSpinBox(myPropTime, DBL_MIN, DBL_MAX); myPropTime->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); TopLayout->addWidget(myPropTime, 3, 1); connect(myPropTime, SIGNAL(valueChanged(double)), this, SLOT(PropagationTimeChanged(double)));