From: nkv Date: Fri, 7 Mar 2008 07:08:10 +0000 (+0000) Subject: BUG 19185: Qt4 porting: set step value for double spin boxes X-Git-Tag: V5_0_0a1~20 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8767850063e559d6c5dc1b4c443d917c4efeb42c;p=modules%2Fgeom.git BUG 19185: Qt4 porting: set step value for double spin boxes --- diff --git a/src/BasicGUI/BasicGUI_CircleDlg.cxx b/src/BasicGUI/BasicGUI_CircleDlg.cxx index 683d796bd..1a067c6fa 100644 --- a/src/BasicGUI/BasicGUI_CircleDlg.cxx +++ b/src/BasicGUI/BasicGUI_CircleDlg.cxx @@ -171,9 +171,7 @@ void BasicGUI_CircleDlg::Init() connect( GroupPntVecR->LineEdit2, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ); connect( GroupPntVecR->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT(ValueChangedInSpinBox() ) ); - // VSR: TODO ->> - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPntVecR->SpinBox_DX, SLOT( SetStep( double ) ) ); - // <<- + connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) ); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); @@ -183,6 +181,15 @@ void BasicGUI_CircleDlg::Init() ConstructorsClicked( 0 ); } +//================================================================================= +// function : SetDoubleSpinBoxStep() +// purpose : Double spin box management +//================================================================================= +void BasicGUI_CircleDlg::SetDoubleSpinBoxStep( double step ) +{ + GroupPntVecR->SpinBox_DX->setSingleStep(step); +} + //================================================================================= // function : ConstructorsClicked() // purpose : Radio button management diff --git a/src/BasicGUI/BasicGUI_CircleDlg.h b/src/BasicGUI/BasicGUI_CircleDlg.h index 85f072482..7b733def7 100644 --- a/src/BasicGUI/BasicGUI_CircleDlg.h +++ b/src/BasicGUI/BasicGUI_CircleDlg.h @@ -76,6 +76,7 @@ private slots: void LineEditReturnPressed(); void SetEditCurrentArgument(); void ValueChangedInSpinBox(); + void SetDoubleSpinBoxStep( double ); }; #endif // BASICGUI_CIRCLEDLG_H diff --git a/src/BasicGUI/BasicGUI_EllipseDlg.cxx b/src/BasicGUI/BasicGUI_EllipseDlg.cxx index 86e19612e..b0b451569 100644 --- a/src/BasicGUI/BasicGUI_EllipseDlg.cxx +++ b/src/BasicGUI/BasicGUI_EllipseDlg.cxx @@ -140,10 +140,7 @@ void BasicGUI_EllipseDlg::Init() connect( GroupPoints->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) ); connect( GroupPoints->SpinBox_DY, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) ); - // VSR: TODO ->> - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox_DX, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox_DY, SLOT( SetStep( double ) ) ); - // <<- + connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) ); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); @@ -151,6 +148,16 @@ void BasicGUI_EllipseDlg::Init() initName( tr( "GEOM_ELLIPSE" ) ); } +//================================================================================= +// function : SetDoubleSpinBoxStep() +// purpose : Double spin box management +//================================================================================= +void BasicGUI_EllipseDlg::SetDoubleSpinBoxStep( double step ) +{ + GroupPoints->SpinBox_DX->setSingleStep(step); + GroupPoints->SpinBox_DY->setSingleStep(step); +} + //================================================================================= // function : ClickOnOk() diff --git a/src/BasicGUI/BasicGUI_EllipseDlg.h b/src/BasicGUI/BasicGUI_EllipseDlg.h index 874df58c2..537a81681 100644 --- a/src/BasicGUI/BasicGUI_EllipseDlg.h +++ b/src/BasicGUI/BasicGUI_EllipseDlg.h @@ -68,6 +68,7 @@ private slots: void SelectionIntoArgument(); void SetEditCurrentArgument(); void ValueChangedInSpinBox( double ); + void SetDoubleSpinBoxStep( double ); }; #endif // BASICGUI_ELLIPSEDLG_H diff --git a/src/BasicGUI/BasicGUI_PlaneDlg.cxx b/src/BasicGUI/BasicGUI_PlaneDlg.cxx index b5508490a..598ecab16 100644 --- a/src/BasicGUI/BasicGUI_PlaneDlg.cxx +++ b/src/BasicGUI/BasicGUI_PlaneDlg.cxx @@ -177,11 +177,7 @@ void BasicGUI_PlaneDlg::Init() connect( Group3Pnts->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) ); connect( GroupFace->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) ); - // VSR: TODO ->> - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPntDir->SpinBox_DX, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), Group3Pnts->SpinBox_DX, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupFace->SpinBox_DX, SLOT( SetStep( double ) ) ); - // <<- + connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) ); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); @@ -190,6 +186,17 @@ void BasicGUI_PlaneDlg::Init() ConstructorsClicked( 0 ); } +//================================================================================= +// function : SetDoubleSpinBoxStep() +// purpose : Double spin box management +//================================================================================= +void BasicGUI_PlaneDlg::SetDoubleSpinBoxStep( double step ) +{ + GroupPntDir->SpinBox_DX->setSingleStep(step); + Group3Pnts->SpinBox_DX->setSingleStep(step); + GroupFace->SpinBox_DX->setSingleStep(step); +} + //================================================================================= // function : ConstructorsClicked() diff --git a/src/BasicGUI/BasicGUI_PlaneDlg.h b/src/BasicGUI/BasicGUI_PlaneDlg.h index acb91a404..ec43ced5e 100644 --- a/src/BasicGUI/BasicGUI_PlaneDlg.h +++ b/src/BasicGUI/BasicGUI_PlaneDlg.h @@ -75,6 +75,7 @@ private slots: void SetEditCurrentArgument(); void ConstructorsClicked( int ); void ValueChangedInSpinBox( double ); + void SetDoubleSpinBoxStep( double ); }; #endif // BASICGUI_PLANEDLG_H diff --git a/src/BasicGUI/BasicGUI_PointDlg.cxx b/src/BasicGUI/BasicGUI_PointDlg.cxx index beef4805c..47d1bf705 100644 --- a/src/BasicGUI/BasicGUI_PointDlg.cxx +++ b/src/BasicGUI/BasicGUI_PointDlg.cxx @@ -218,15 +218,7 @@ void BasicGUI_PointDlg::Init() connect( GroupRefPoint->SpinBox_DY, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) ); connect( GroupRefPoint->SpinBox_DZ, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) ); - // VSR: TODO ->> - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupOnCurve->SpinBox_DX, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupXYZ->SpinBox_DX, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupXYZ->SpinBox_DY, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupXYZ->SpinBox_DZ, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupRefPoint->SpinBox_DX, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupRefPoint->SpinBox_DY, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupRefPoint->SpinBox_DZ, SLOT( SetStep( double ) ) ); - // <<- + connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) ); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged() ), this, SLOT(SelectionIntoArgument() ) ); @@ -237,6 +229,21 @@ void BasicGUI_PointDlg::Init() ConstructorsClicked( 0 ); } +//================================================================================= +// function : SetDoubleSpinBoxStep() +// purpose : Double spin box management +//================================================================================= +void BasicGUI_PointDlg::SetDoubleSpinBoxStep( double step ) +{ + GroupOnCurve->SpinBox_DX->setSingleStep(step); + GroupXYZ->SpinBox_DX->setSingleStep(step); + GroupXYZ->SpinBox_DY->setSingleStep(step); + GroupXYZ->SpinBox_DZ->setSingleStep(step); + GroupRefPoint->SpinBox_DX->setSingleStep(step); + GroupRefPoint->SpinBox_DY->setSingleStep(step); + GroupRefPoint->SpinBox_DZ->setSingleStep(step); +} + //================================================================================= // function : ConstructorsClicked() diff --git a/src/BasicGUI/BasicGUI_PointDlg.h b/src/BasicGUI/BasicGUI_PointDlg.h index 4b0daf127..35d558126 100644 --- a/src/BasicGUI/BasicGUI_PointDlg.h +++ b/src/BasicGUI/BasicGUI_PointDlg.h @@ -92,6 +92,7 @@ private slots: void SetEditCurrentArgument(); void ConstructorsClicked( int ); void ValueChangedInSpinBox( double ); + void SetDoubleSpinBoxStep( double ); }; #endif // BASICGUI_POINTDLG_H diff --git a/src/BasicGUI/BasicGUI_VectorDlg.cxx b/src/BasicGUI/BasicGUI_VectorDlg.cxx index ab64e3125..dd6102815 100644 --- a/src/BasicGUI/BasicGUI_VectorDlg.cxx +++ b/src/BasicGUI/BasicGUI_VectorDlg.cxx @@ -153,11 +153,7 @@ void BasicGUI_VectorDlg::Init() connect( GroupDimensions->SpinBox_DY, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) ); connect( GroupDimensions->SpinBox_DZ, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) ); - // VSR: TODO ->> - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupDimensions->SpinBox_DX, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupDimensions->SpinBox_DY, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupDimensions->SpinBox_DZ, SLOT( SetStep( double ) ) ); - // <<- + connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) ); connect( GroupDimensions->CheckButton1, SIGNAL( stateChanged( int ) ), this, SLOT( ReverseVector( int ) ) ); @@ -169,6 +165,17 @@ void BasicGUI_VectorDlg::Init() ConstructorsClicked( 0 ); } +//================================================================================= +// function : SetDoubleSpinBoxStep() +// purpose : Double spin box management +//================================================================================= +void BasicGUI_VectorDlg::SetDoubleSpinBoxStep( double step ) +{ + GroupDimensions->SpinBox_DX->setSingleStep(step); + GroupDimensions->SpinBox_DY->setSingleStep(step); + GroupDimensions->SpinBox_DZ->setSingleStep(step); +} + //================================================================================= // function : ConstructorsClicked() diff --git a/src/BasicGUI/BasicGUI_VectorDlg.h b/src/BasicGUI/BasicGUI_VectorDlg.h index 74de94e0f..2c8f8e5e2 100644 --- a/src/BasicGUI/BasicGUI_VectorDlg.h +++ b/src/BasicGUI/BasicGUI_VectorDlg.h @@ -73,6 +73,7 @@ private slots: void ConstructorsClicked( int ); void ValueChangedInSpinBox( double ); void ReverseVector( int ); + void SetDoubleSpinBoxStep( double ); }; #endif // BASICGUI_VECTORDLG_H diff --git a/src/EntityGUI/EntityGUI_SketcherDlg.cxx b/src/EntityGUI/EntityGUI_SketcherDlg.cxx index 08d33aa8d..3697c8ead 100644 --- a/src/EntityGUI/EntityGUI_SketcherDlg.cxx +++ b/src/EntityGUI/EntityGUI_SketcherDlg.cxx @@ -212,18 +212,7 @@ EntityGUI_SketcherDlg::EntityGUI_SketcherDlg( GeometryGUI* GUI, QWidget* parent, connect( Group4Spin->SpinBox_DZ, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) ); connect( Group4Spin->SpinBox_DS, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) ); - // VSR: TODO ->> - connect( myGeometryGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), Group1Spin->SpinBox_DX, SLOT( SetStep( double ) ) ); - connect( myGeometryGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), Group2Spin->SpinBox_DX, SLOT( SetStep( double ) ) ); - connect( myGeometryGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), Group2Spin->SpinBox_DY, SLOT( SetStep( double ) ) ); - connect( myGeometryGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), Group3Spin->SpinBox_DX, SLOT( SetStep( double ) ) ); - connect( myGeometryGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), Group3Spin->SpinBox_DY, SLOT( SetStep( double ) ) ); - connect( myGeometryGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), Group3Spin->SpinBox_DZ, SLOT( SetStep( double ) ) ); - connect( myGeometryGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), Group4Spin->SpinBox_DX, SLOT( SetStep( double ) ) ); - connect( myGeometryGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), Group4Spin->SpinBox_DY, SLOT( SetStep( double ) ) ); - connect( myGeometryGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), Group4Spin->SpinBox_DZ, SLOT( SetStep( double ) ) ); - connect( myGeometryGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), Group4Spin->SpinBox_DS, SLOT( SetStep( double ) ) ); - // <<- + connect( myGeometryGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) ); connect( myGeometryGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) ); connect( myGeometryGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) ); @@ -1491,3 +1480,22 @@ void EntityGUI_SketcherDlg::initSpinBox( QDoubleSpinBox* spinBox, spinBox->setSingleStep( step ); spinBox->setDecimals( decimals ); } + +//================================================================================= +// function : SetDoubleSpinBoxStep() +// purpose : Double spin box management +//================================================================================= +void EntityGUI_SketcherDlg::SetDoubleSpinBoxStep( double step ) +{ + Group1Spin->SpinBox_DX->setSingleStep(step); + Group2Spin->SpinBox_DX->setSingleStep(step); + Group2Spin->SpinBox_DY->setSingleStep(step); + Group3Spin->SpinBox_DX->setSingleStep(step); + Group3Spin->SpinBox_DY->setSingleStep(step); + Group3Spin->SpinBox_DZ->setSingleStep(step); + Group4Spin->SpinBox_DX->setSingleStep(step); + Group4Spin->SpinBox_DY->setSingleStep(step); + Group4Spin->SpinBox_DZ->setSingleStep(step); + Group4Spin->SpinBox_DS->setSingleStep(step); +} + diff --git a/src/EntityGUI/EntityGUI_SketcherDlg.h b/src/EntityGUI/EntityGUI_SketcherDlg.h index 44eb81815..60fb6a0c7 100644 --- a/src/EntityGUI/EntityGUI_SketcherDlg.h +++ b/src/EntityGUI/EntityGUI_SketcherDlg.h @@ -158,6 +158,7 @@ private slots: void Dir1Clicked( int ); void Dir2Clicked( int ); void ValueChangedInSpinBox( double ); + void SetDoubleSpinBoxStep( double ); }; #endif // ENTITYGUI_SKETCHERDLG_H diff --git a/src/GenerationGUI/GenerationGUI_FillingDlg.cxx b/src/GenerationGUI/GenerationGUI_FillingDlg.cxx index 31882eb9e..2e7a380e1 100644 --- a/src/GenerationGUI/GenerationGUI_FillingDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_FillingDlg.cxx @@ -143,13 +143,7 @@ void GenerationGUI_FillingDlg::Init() connect( GroupPoints->CheckBox1, SIGNAL( stateChanged( int ) ), this, SLOT( ApproxChanged() ) ); - // VSR: TODO ->> - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox1, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox2, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox3, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox4, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox5, SLOT( SetStep( double ) ) ); - // <<- + connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) ); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); @@ -157,6 +151,19 @@ void GenerationGUI_FillingDlg::Init() initName( tr( "GEOM_FILLING" ) ); } +//================================================================================= +// function : SetDoubleSpinBoxStep() +// purpose : Double spin box management +//================================================================================= +void GenerationGUI_FillingDlg::SetDoubleSpinBoxStep( double step ) +{ + GroupPoints->SpinBox1->setSingleStep(step); + GroupPoints->SpinBox2->setSingleStep(step); + GroupPoints->SpinBox3->setSingleStep(step); + GroupPoints->SpinBox4->setSingleStep(step); + GroupPoints->SpinBox5->setSingleStep(step); +} + //================================================================================= // function : ClickOnOk() diff --git a/src/GenerationGUI/GenerationGUI_FillingDlg.h b/src/GenerationGUI/GenerationGUI_FillingDlg.h index 03d602cd9..22d3f4693 100644 --- a/src/GenerationGUI/GenerationGUI_FillingDlg.h +++ b/src/GenerationGUI/GenerationGUI_FillingDlg.h @@ -73,6 +73,7 @@ private slots: void SetEditCurrentArgument(); void ValueChangedInSpinBox( double ); void ApproxChanged(); + void SetDoubleSpinBoxStep( double ); }; #endif // GENERATIONGUI_FILLINGDLG_H diff --git a/src/GenerationGUI/GenerationGUI_PrismDlg.cxx b/src/GenerationGUI/GenerationGUI_PrismDlg.cxx index 4c211bb8c..2149a7781 100644 --- a/src/GenerationGUI/GenerationGUI_PrismDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_PrismDlg.cxx @@ -157,9 +157,7 @@ void GenerationGUI_PrismDlg::Init() connect( GroupPoints->LineEdit2, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ); connect( GroupPoints->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox() ) ); - // VSR: TODO ->> - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox_DX, SLOT( SetStep( double ) ) ); - // <<- + connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) ); connect( GroupPoints->CheckButton1, SIGNAL( toggled( bool ) ), this, SLOT( onBothway() ) ); connect( GroupPoints->CheckButton2, SIGNAL( toggled( bool ) ), this, SLOT( onReverse() ) ); @@ -182,6 +180,15 @@ void GenerationGUI_PrismDlg::Init() ConstructorsClicked( 0 ); } +//================================================================================= +// function : SetDoubleSpinBoxStep() +// purpose : Double spin box management +//================================================================================= +void GenerationGUI_PrismDlg::SetDoubleSpinBoxStep( double step ) +{ + GroupPoints->SpinBox_DX->setSingleStep(step); +} + //================================================================================= // function : ConstructorsClicked() diff --git a/src/GenerationGUI/GenerationGUI_PrismDlg.h b/src/GenerationGUI/GenerationGUI_PrismDlg.h index b2d3da8fe..c36047a50 100644 --- a/src/GenerationGUI/GenerationGUI_PrismDlg.h +++ b/src/GenerationGUI/GenerationGUI_PrismDlg.h @@ -79,6 +79,7 @@ private slots: void SetEditCurrentArgument(); void ConstructorsClicked( int ); void ValueChangedInSpinBox(); + void SetDoubleSpinBoxStep( double ); void onReverse(); void onBothway(); void onBothway2(); diff --git a/src/GenerationGUI/GenerationGUI_RevolDlg.cxx b/src/GenerationGUI/GenerationGUI_RevolDlg.cxx index 01db4575e..25872683d 100644 --- a/src/GenerationGUI/GenerationGUI_RevolDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_RevolDlg.cxx @@ -135,9 +135,7 @@ void GenerationGUI_RevolDlg::Init() connect( GroupPoints->CheckButton1, SIGNAL( toggled( bool ) ), this, SLOT( onBothway() ) ); connect( GroupPoints->CheckButton2, SIGNAL( toggled( bool ) ), this, SLOT( onReverse() ) ); - // VSR: TODO ->> - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox_DX, SLOT( SetStep( double ) ) ); - // <<- + connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) ); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); @@ -147,6 +145,16 @@ void GenerationGUI_RevolDlg::Init() globalSelection( GEOM_ALLSHAPES ); } +//================================================================================= +// function : SetDoubleSpinBoxStep() +// purpose : Double spin box management +//================================================================================= +void GenerationGUI_RevolDlg::SetDoubleSpinBoxStep( double step ) +{ + GroupPoints->SpinBox_DX->setSingleStep(step); +} + + //================================================================================= // function : ClickOnOk() diff --git a/src/GenerationGUI/GenerationGUI_RevolDlg.h b/src/GenerationGUI/GenerationGUI_RevolDlg.h index 9eeb29146..111cb6fb5 100644 --- a/src/GenerationGUI/GenerationGUI_RevolDlg.h +++ b/src/GenerationGUI/GenerationGUI_RevolDlg.h @@ -71,6 +71,7 @@ private slots: void SelectionIntoArgument(); void SetEditCurrentArgument(); void ValueChangedInSpinBox(); + void SetDoubleSpinBoxStep( double ); void onReverse(); void onBothway(); }; diff --git a/src/OperationGUI/OperationGUI_ArchimedeDlg.cxx b/src/OperationGUI/OperationGUI_ArchimedeDlg.cxx index ac0f0c538..87dd1655b 100644 --- a/src/OperationGUI/OperationGUI_ArchimedeDlg.cxx +++ b/src/OperationGUI/OperationGUI_ArchimedeDlg.cxx @@ -120,11 +120,7 @@ void OperationGUI_ArchimedeDlg::Init() connect( GroupPoints->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ); - // VSR: TODO ->> - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox_DX, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox_DY, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox_DZ, SLOT( SetStep( double ) ) ); - // <<- + connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) ); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); @@ -137,6 +133,17 @@ void OperationGUI_ArchimedeDlg::Init() } +//================================================================================= +// function : SetDoubleSpinBoxStep() +// purpose : Double spin box management +//================================================================================= +void OperationGUI_ArchimedeDlg::SetDoubleSpinBoxStep( double step ) +{ + GroupPoints->SpinBox_DX->setSingleStep(step); + GroupPoints->SpinBox_DY->setSingleStep(step); + GroupPoints->SpinBox_DZ->setSingleStep(step); +} + //================================================================================= // function : ClickOnOk() // purpose : diff --git a/src/OperationGUI/OperationGUI_ArchimedeDlg.h b/src/OperationGUI/OperationGUI_ArchimedeDlg.h index 7268550ca..e95fd32cd 100644 --- a/src/OperationGUI/OperationGUI_ArchimedeDlg.h +++ b/src/OperationGUI/OperationGUI_ArchimedeDlg.h @@ -63,6 +63,7 @@ private slots: void ActivateThisDialog(); void LineEditReturnPressed(); void SelectionIntoArgument(); + void SetDoubleSpinBoxStep( double ); }; #endif // OPERATIONGUI_ARCHIMEDEDLG_H diff --git a/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx index 467838ca1..8435e9a38 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx @@ -41,6 +41,7 @@ #include #include +#include //================================================================================= // class : PrimitiveGUI_BoxDlg() @@ -144,11 +145,7 @@ void PrimitiveGUI_BoxDlg::Init() connect( GroupDimensions->SpinBox_DY, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox() ) ); connect( GroupDimensions->SpinBox_DZ, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox() ) ); - // VSR: TODO ->> - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupDimensions->SpinBox_DX, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupDimensions->SpinBox_DY, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupDimensions->SpinBox_DZ, SLOT( SetStep( double ) ) ); - // <<- + connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) ); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); @@ -158,6 +155,17 @@ void PrimitiveGUI_BoxDlg::Init() ConstructorsClicked( 0 ); } +//================================================================================= +// function : SetDoubleSpinBoxStep() +// purpose : Double spin box management +//================================================================================= +void PrimitiveGUI_BoxDlg::SetDoubleSpinBoxStep( double step ) +{ + GroupDimensions->SpinBox_DX->setSingleStep(step); + GroupDimensions->SpinBox_DY->setSingleStep(step); + GroupDimensions->SpinBox_DZ->setSingleStep(step); +} + //================================================================================= // function : ConstructorsClicked() diff --git a/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.h b/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.h index e4f4b866e..cb6ab13ef 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.h +++ b/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.h @@ -69,6 +69,7 @@ private slots: void SetEditCurrentArgument(); void ConstructorsClicked( int ); void ValueChangedInSpinBox(); + void SetDoubleSpinBoxStep( double ); }; #endif // PRIMITIVEGUI_BOXDLG_H diff --git a/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx index 65cb90661..bdf686812 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx @@ -157,15 +157,8 @@ void PrimitiveGUI_ConeDlg::Init() connect( GroupDimensions->SpinBox_DY, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox() ) ); connect( GroupDimensions->SpinBox_DZ, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox() ) ); - // VSR: TODO ->> - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox_DX, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox_DY, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox_DZ, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupDimensions->SpinBox_DX, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupDimensions->SpinBox_DY, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupDimensions->SpinBox_DZ, SLOT( SetStep( double ) ) ); - // <<- - + connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) ); + connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); @@ -175,6 +168,20 @@ void PrimitiveGUI_ConeDlg::Init() } +//================================================================================= +// function : SetDoubleSpinBoxStep() +// purpose : Double spin box management +//================================================================================= +void PrimitiveGUI_ConeDlg::SetDoubleSpinBoxStep( double step ) +{ + GroupPoints->SpinBox_DX->setSingleStep(step); + GroupPoints->SpinBox_DY->setSingleStep(step); + GroupPoints->SpinBox_DZ->setSingleStep(step); + GroupDimensions->SpinBox_DX->setSingleStep(step); + GroupDimensions->SpinBox_DY->setSingleStep(step); + GroupDimensions->SpinBox_DZ->setSingleStep(step); +} + //================================================================================= // function : ConstructorsClicked() // purpose : Radio button management diff --git a/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.h b/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.h index 96b67b1ac..0cf79ec17 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.h +++ b/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.h @@ -73,6 +73,7 @@ private slots: void SetEditCurrentArgument(); void ConstructorsClicked( int ); void ValueChangedInSpinBox(); + void SetDoubleSpinBoxStep( double ); }; #endif // PRIMITIVEGUI_CONEDLG_H diff --git a/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx index 8cc0796aa..24b8387fa 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx @@ -153,12 +153,7 @@ void PrimitiveGUI_CylinderDlg::Init() connect( GroupDimensions->SpinBox_DX, SIGNAL(valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox() ) ); connect( GroupDimensions->SpinBox_DY, SIGNAL(valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox() ) ); - // VSR: TODO ->> - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox_DX, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox_DY, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupDimensions->SpinBox_DX, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupDimensions->SpinBox_DY, SLOT( SetStep( double ) ) ); - // <<- + connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) ); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); @@ -168,6 +163,19 @@ void PrimitiveGUI_CylinderDlg::Init() } +//================================================================================= +// function : SetDoubleSpinBoxStep() +// purpose : Double spin box management +//================================================================================= +void PrimitiveGUI_CylinderDlg::SetDoubleSpinBoxStep( double step ) +{ + GroupPoints->SpinBox_DX->setSingleStep(step); + GroupPoints->SpinBox_DY->setSingleStep(step); + GroupDimensions->SpinBox_DX->setSingleStep(step); + GroupDimensions->SpinBox_DY->setSingleStep(step); +} + + //================================================================================= // function : ConstructorsClicked() // purpose : Radio button management diff --git a/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.h b/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.h index 6a4632914..8a64be473 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.h +++ b/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.h @@ -72,6 +72,7 @@ private slots: void SetEditCurrentArgument(); void ConstructorsClicked( int ); void ValueChangedInSpinBox(); + void SetDoubleSpinBoxStep( double ); }; #endif // PRIMITIVEGUI_CYLINDERDLG_H diff --git a/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx index 65cfc86a0..bc7854fb3 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx @@ -132,10 +132,7 @@ void PrimitiveGUI_SphereDlg::Init() connect( GroupDimensions->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox() ) ); connect( GroupPoints->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox() ) ); - // VSR: TODO ->> - connect(myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox_DX, SLOT( SetStep( double ) ) ); - connect(myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupDimensions->SpinBox_DX, SLOT( SetStep( double ) ) ); - // <<- + connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) ); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); @@ -145,6 +142,15 @@ void PrimitiveGUI_SphereDlg::Init() ConstructorsClicked( 0 ); } +//================================================================================= +// function : SetDoubleSpinBoxStep() +// purpose : Double spin box management +//================================================================================= +void PrimitiveGUI_SphereDlg::SetDoubleSpinBoxStep( double step ) +{ + GroupPoints->SpinBox_DX->setSingleStep(step); + GroupDimensions->SpinBox_DX->setSingleStep(step); +} //================================================================================= // function : ConstructorsClicked() diff --git a/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.h b/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.h index 9bcbaad3b..61aa65f03 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.h +++ b/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.h @@ -71,6 +71,7 @@ private slots: void SetEditCurrentArgument(); void ConstructorsClicked( int ); void ValueChangedInSpinBox(); + void SetDoubleSpinBoxStep( double ); }; #endif // DIALOGBOX_SPHERE_H diff --git a/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx index 06fe551b5..099cf7972 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx @@ -149,11 +149,7 @@ void PrimitiveGUI_TorusDlg::Init() connect( GroupDimensions->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox() ) ); connect( GroupDimensions->SpinBox_DY, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox() ) ); - // VSR: TODO ->> - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox_DX, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox_DY, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupDimensions->SpinBox_DX, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupDimensions->SpinBox_DY, SLOT( SetStep( double ) ) ); + connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) ); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); @@ -163,6 +159,18 @@ void PrimitiveGUI_TorusDlg::Init() ConstructorsClicked( 0 ); } +//================================================================================= +// function : SetDoubleSpinBoxStep() +// purpose : Double spin box management +//================================================================================= +void PrimitiveGUI_TorusDlg::SetDoubleSpinBoxStep( double step ) +{ + GroupPoints->SpinBox_DX->setSingleStep(step); + GroupPoints->SpinBox_DY->setSingleStep(step); + GroupDimensions->SpinBox_DX->setSingleStep(step); + GroupDimensions->SpinBox_DY->setSingleStep(step); +} + //================================================================================= // function : ConstructorsClicked() diff --git a/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.h b/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.h index ce47b29e2..2408106c1 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.h +++ b/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.h @@ -70,6 +70,7 @@ private slots: void SetEditCurrentArgument(); void ConstructorsClicked( int ); void ValueChangedInSpinBox(); + void SetDoubleSpinBoxStep( double ); }; #endif // PRIMITIVEGUI_TORUSDLG_H diff --git a/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx b/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx index 170023e41..5006f5632 100644 --- a/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx @@ -161,13 +161,7 @@ void TransformationGUI_MultiRotationDlg::Init() connect( GroupDimensions->SpinBox_DX2, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) ); connect( GroupDimensions->SpinBox_DY2, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) ); - // VSR: TODO ->> - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox_DX, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupDimensions->SpinBox_DX1, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupDimensions->SpinBox_DY1, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupDimensions->SpinBox_DX2, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupDimensions->SpinBox_DY2, SLOT( SetStep( double ) ) ); - // <<- + connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) ); connect( GroupDimensions->CheckButton1, SIGNAL( toggled( bool ) ), this, SLOT( ReverseAngle() ) ); @@ -180,6 +174,20 @@ void TransformationGUI_MultiRotationDlg::Init() } + +//================================================================================= +// function : SetDoubleSpinBoxStep() +// purpose : Double spin box management +//================================================================================= +void TransformationGUI_MultiRotationDlg::SetDoubleSpinBoxStep( double step ) +{ + GroupPoints->SpinBox_DX->setSingleStep(step); + GroupDimensions->SpinBox_DX1->setSingleStep(step); + GroupDimensions->SpinBox_DY1->setSingleStep(step); + GroupDimensions->SpinBox_DX2->setSingleStep(step); + GroupDimensions->SpinBox_DY2->setSingleStep(step); +} + //================================================================================= // function : ConstructorsClicked() // purpose : Radio button management diff --git a/src/TransformationGUI/TransformationGUI_MultiRotationDlg.h b/src/TransformationGUI/TransformationGUI_MultiRotationDlg.h index fd7926e84..62b5492a3 100644 --- a/src/TransformationGUI/TransformationGUI_MultiRotationDlg.h +++ b/src/TransformationGUI/TransformationGUI_MultiRotationDlg.h @@ -75,6 +75,7 @@ private slots: void ReverseAngle(); void ValueChangedInSpinBox( double ); void ConstructorsClicked( int ); + void SetDoubleSpinBoxStep( double ); }; #endif // TRANSFORMATIONGUI_MULTIROTATIONDLG_H diff --git a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx index b46c582fb..716acd4d9 100644 --- a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx @@ -171,14 +171,7 @@ void TransformationGUI_MultiTranslationDlg::Init() connect( GroupDimensions->SpinBox_DX2, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) ); connect( GroupDimensions->SpinBox_DY2, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) ); - // VSR: TODO ->> - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox_DX, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox_DY, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupDimensions->SpinBox_DX1, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupDimensions->SpinBox_DY1, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupDimensions->SpinBox_DX2, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupDimensions->SpinBox_DY2, SLOT( SetStep( double ) ) ); - // <<- + connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) ); connect( GroupPoints->CheckButton1, SIGNAL( toggled( bool ) ), this, SLOT( ReverseStepU() ) ); connect( GroupDimensions->CheckButton1, SIGNAL( toggled( bool ) ), this, SLOT( ReverseStepU() ) ); @@ -193,6 +186,20 @@ void TransformationGUI_MultiTranslationDlg::Init() } +//================================================================================= +// function : SetDoubleSpinBoxStep() +// purpose : Double spin box management +//================================================================================= +void TransformationGUI_MultiTranslationDlg::SetDoubleSpinBoxStep( double step ) +{ + GroupPoints->SpinBox_DX->setSingleStep(step); + GroupPoints->SpinBox_DY->setSingleStep(step); + GroupDimensions->SpinBox_DX1->setSingleStep(step); + GroupDimensions->SpinBox_DY1->setSingleStep(step); + GroupDimensions->SpinBox_DX2->setSingleStep(step); + GroupDimensions->SpinBox_DY2->setSingleStep(step); +} + //================================================================================= // function : ConstructorsClicked() // purpose : Radio button management diff --git a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.h b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.h index 469a8940a..2747fa1e4 100644 --- a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.h +++ b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.h @@ -76,6 +76,7 @@ private slots: void ReverseStepV(); void ValueChangedInSpinBox( double ); void ConstructorsClicked( int ); + void SetDoubleSpinBoxStep( double ); }; #endif // TRANSFORMATIONGUI_MULTITRANSLATIONDLG_H diff --git a/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx b/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx index fe2d72bba..17cd22f53 100644 --- a/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx @@ -106,9 +106,7 @@ TransformationGUI_ScaleDlg::TransformationGUI_ScaleDlg( GeometryGUI* theGeometry connect( GroupPoints->LineEdit2, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ); connect( GroupPoints->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox() ) ); - // VSR: TODO ->> - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox_DX, SLOT( SetStep( double ) ) ); - // <<- + connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) ); connect( GroupPoints->CheckButton1, SIGNAL( toggled( bool ) ), this, SLOT( CreateCopyModeChanged( bool ) ) ); connect( myGeomGUI->getApp()->selectionMgr(), @@ -311,6 +309,15 @@ void TransformationGUI_ScaleDlg::ValueChangedInSpinBox() displayPreview(); } +//================================================================================= +// function : SetDoubleSpinBoxStep() +// purpose : Double spin box management +//================================================================================= +void TransformationGUI_ScaleDlg::SetDoubleSpinBoxStep( double step ) +{ + GroupPoints->SpinBox_DX->setSingleStep(step); +} + //================================================================================= // function : createOperation diff --git a/src/TransformationGUI/TransformationGUI_ScaleDlg.h b/src/TransformationGUI/TransformationGUI_ScaleDlg.h index 38aeec76c..4afaa8812 100644 --- a/src/TransformationGUI/TransformationGUI_ScaleDlg.h +++ b/src/TransformationGUI/TransformationGUI_ScaleDlg.h @@ -72,6 +72,7 @@ private slots: void SetEditCurrentArgument(); void ValueChangedInSpinBox(); void CreateCopyModeChanged( bool ); + void SetDoubleSpinBoxStep( double ); }; #endif // TRANSFORMATIONGUI_SCALEDLG_H diff --git a/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx b/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx index 979cf2242..4465fbdda 100644 --- a/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx @@ -149,11 +149,7 @@ void TransformationGUI_TranslationDlg::Init() connect( GroupPoints->SpinBox2, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox() ) ); connect( GroupPoints->SpinBox3, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox() ) ); - // VSR: TODO ->> - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox1, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox2, SLOT( SetStep( double ) ) ); - connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox3, SLOT( SetStep( double ) ) ); - // <<- + connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) ); connect( GroupPoints->CheckBox1, SIGNAL( toggled( bool ) ), this, SLOT( CreateCopyModeChanged( bool ) ) ); @@ -166,6 +162,17 @@ void TransformationGUI_TranslationDlg::Init() } +//================================================================================= +// function : SetDoubleSpinBoxStep() +// purpose : Double spin box management +//================================================================================= +void TransformationGUI_TranslationDlg::SetDoubleSpinBoxStep( double step ) +{ + GroupPoints->SpinBox1->setSingleStep(step); + GroupPoints->SpinBox2->setSingleStep(step); + GroupPoints->SpinBox3->setSingleStep(step); +} + //================================================================================= // function : ConstructorsClicked() // purpose : Radio button management diff --git a/src/TransformationGUI/TransformationGUI_TranslationDlg.h b/src/TransformationGUI/TransformationGUI_TranslationDlg.h index 126f96795..e08abe219 100644 --- a/src/TransformationGUI/TransformationGUI_TranslationDlg.h +++ b/src/TransformationGUI/TransformationGUI_TranslationDlg.h @@ -70,6 +70,7 @@ private slots: void ConstructorsClicked( int ); void ValueChangedInSpinBox(); void CreateCopyModeChanged( bool ); + void SetDoubleSpinBoxStep( double ); }; #endif // TRANSFORMATIONGUI_TRANSLATIONDLG_H