Correct precision of double values displaying (bug 16123).

This commit is contained in:
jfa 2007-07-12 08:21:56 +00:00
parent eac09dcfb0
commit a46ed42b20
17 changed files with 296 additions and 370 deletions

View File

@ -328,16 +328,16 @@ void EntityGUI_SketcherDlg::Init()
double step = SUIT_Session::session()->resourceMgr()->doubleValue( "Geometry", "SettingsGeomStep", 100.0 ); double step = SUIT_Session::session()->resourceMgr()->doubleValue( "Geometry", "SettingsGeomStep", 100.0 );
/* min, max, step and decimals for spin boxes */ /* min, max, step and decimals for spin boxes */
Group1Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); Group1Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
Group3Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); Group3Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
Group3Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); Group3Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
Group3Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); Group3Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
Group4Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, 3); Group4Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, DBL_DIGITS_DISPLAY);
Group4Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, 3); Group4Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, DBL_DIGITS_DISPLAY);
Group4Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); Group4Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
Group4Spin->SpinBox_DS->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3); Group4Spin->SpinBox_DS->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., DBL_DIGITS_DISPLAY);
/* displays Dialog */ /* displays Dialog */
GroupConstructors->setEnabled(false); GroupConstructors->setEnabled(false);
@ -438,8 +438,8 @@ void EntityGUI_SketcherDlg::PointClicked(int constructorId)
if ( constructorId == 1 ) if ( constructorId == 1 )
{ // XY { // XY
mySketchType = PT_ABS; mySketchType = PT_ABS;
Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_X2")); Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_X2"));
Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_Y2")); Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_Y2"));
myX = 0.0; myX = 0.0;
@ -454,8 +454,8 @@ void EntityGUI_SketcherDlg::PointClicked(int constructorId)
else if ( constructorId == 0 ) else if ( constructorId == 0 )
{ // DXDY { // DXDY
mySketchType = PT_RELATIVE; mySketchType = PT_RELATIVE;
Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_DX2")); Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_DX2"));
Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_DY2")); Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_DY2"));
myDX = 0.0; myDX = 0.0;
@ -512,8 +512,8 @@ void EntityGUI_SketcherDlg::Dir2Clicked(int constructorId)
myLength = 100.0; myLength = 100.0;
if ( myConstructorDirId == 2 ) if ( myConstructorDirId == 2 )
{ // Angle { // Angle
Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3); Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., DBL_DIGITS_DISPLAY);
Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_ANGLE2")); Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_ANGLE2"));
Group2Spin->SpinBox_DX->SetValue(myAngle); Group2Spin->SpinBox_DX->SetValue(myAngle);
Group2Spin->buttonApply->setFocus(); Group2Spin->buttonApply->setFocus();
@ -588,9 +588,9 @@ void EntityGUI_SketcherDlg::Dir2Clicked(int constructorId)
} }
else if ( myConstructorDirId == 3 ) else if ( myConstructorDirId == 3 )
{ // DXDY { // DXDY
Group3Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, 3); Group3Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, DBL_DIGITS_DISPLAY);
Group3Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, 3); Group3Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, DBL_DIGITS_DISPLAY);
Group3Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); Group3Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
Group3Spin->TextLabel1->setText(tr("GEOM_SKETCHER_VX2")); Group3Spin->TextLabel1->setText(tr("GEOM_SKETCHER_VX2"));
Group3Spin->TextLabel2->setText(tr("GEOM_SKETCHER_VY2")); Group3Spin->TextLabel2->setText(tr("GEOM_SKETCHER_VY2"));
myDX = 0.0; myDX = 0.0;
@ -626,54 +626,54 @@ void EntityGUI_SketcherDlg::Dir2Clicked(int constructorId)
{ // Angle { // Angle
if ( constructorId == 2 ) if ( constructorId == 2 )
{ // Length { // Length
mySketchType = DIR_ANGLE_LENGTH; mySketchType = DIR_ANGLE_LENGTH;
Group3Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3); Group3Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., DBL_DIGITS_DISPLAY);
Group3Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); Group3Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
Group3Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3); Group3Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., DBL_DIGITS_DISPLAY);
Group3Spin->TextLabel1->setText(tr("GEOM_SKETCHER_ANGLE2")); Group3Spin->TextLabel1->setText(tr("GEOM_SKETCHER_ANGLE2"));
Group3Spin->TextLabel2->setText(tr("GEOM_SKETCHER_RADIUS2")); Group3Spin->TextLabel2->setText(tr("GEOM_SKETCHER_RADIUS2"));
Group3Spin->TextLabel3->setText(tr("GEOM_SKETCHER_ANGLE2")); Group3Spin->TextLabel3->setText(tr("GEOM_SKETCHER_ANGLE2"));
Group3Spin->SpinBox_DX->SetValue(myAngle); Group3Spin->SpinBox_DX->SetValue(myAngle);
myRadius = 100.0; myRadius = 100.0;
Group3Spin->SpinBox_DY->SetValue(myRadius); Group3Spin->SpinBox_DY->SetValue(myRadius);
myLength = 30.0; myLength = 30.0;
Group3Spin->SpinBox_DZ->SetValue(myLength); Group3Spin->SpinBox_DZ->SetValue(myLength);
Group3Spin->show(); Group3Spin->show();
Group3Spin->buttonApply->setFocus(); Group3Spin->buttonApply->setFocus();
} }
} }
else if ( myConstructorDirId == 0 ) else if ( myConstructorDirId == 0 )
{ // Perpendicular { // Perpendicular
if ( constructorId == 2 ) if ( constructorId == 2 )
{ // Length { // Length
mySketchType = DIR_PER_LENGTH; mySketchType = DIR_PER_LENGTH;
Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3); Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., DBL_DIGITS_DISPLAY);
Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_RADIUS2")); Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_RADIUS2"));
Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_ANGLE2")); Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_ANGLE2"));
myRadius = 100.0; myRadius = 100.0;
Group2Spin->SpinBox_DX->SetValue(myRadius); Group2Spin->SpinBox_DX->SetValue(myRadius);
myLength = 30.0; myLength = 30.0;
Group2Spin->SpinBox_DY->SetValue(myLength); Group2Spin->SpinBox_DY->SetValue(myLength);
Group2Spin->show(); Group2Spin->show();
Group2Spin->buttonApply->setFocus(); Group2Spin->buttonApply->setFocus();
} }
} }
else if ( myConstructorDirId == 1 ) else if ( myConstructorDirId == 1 )
{ // Tangent { // Tangent
if ( constructorId == 2 ) if ( constructorId == 2 )
{ // Length { // Length
mySketchType = DIR_TAN_LENGTH; mySketchType = DIR_TAN_LENGTH;
Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3); Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., DBL_DIGITS_DISPLAY);
Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_RADIUS2")); Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_RADIUS2"));
Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_ANGLE2")); Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_ANGLE2"));
myRadius = 100.0; myRadius = 100.0;
Group2Spin->SpinBox_DX->SetValue(myRadius); Group2Spin->SpinBox_DX->SetValue(myRadius);
myLength = 30.0; myLength = 30.0;
Group2Spin->SpinBox_DY->SetValue(myLength); Group2Spin->SpinBox_DY->SetValue(myLength);
Group2Spin->show(); Group2Spin->show();
Group2Spin->buttonApply->setFocus(); Group2Spin->buttonApply->setFocus();
} }
} }
else if ( myConstructorDirId == 3 ) else if ( myConstructorDirId == 3 )

View File

@ -17,7 +17,7 @@
// License along with this library; if not, write to the Free Software // License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// //
// //
@ -29,6 +29,8 @@
#include "MeasureGUI_CenterMassDlg.h" #include "MeasureGUI_CenterMassDlg.h"
#include "MeasureGUI_1Sel3LineEdit_QTD.h" #include "MeasureGUI_1Sel3LineEdit_QTD.h"
#include "DlgRef_SpinBox.h"
#include "utilities.h" #include "utilities.h"
#include "SUIT_Session.h" #include "SUIT_Session.h"
#include "SalomeApp_Application.h" #include "SalomeApp_Application.h"
@ -245,9 +247,9 @@ void MeasureGUI_CenterMassDlg::processObject()
getParameters( x, y, z ); getParameters( x, y, z );
myGrp->LineEdit1->setText( GEOMBase::GetName( myObj ) ); myGrp->LineEdit1->setText( GEOMBase::GetName( myObj ) );
myGrp->LineEdit2->setText( QString( "%1" ).arg( x ) ); myGrp->LineEdit2->setText( DlgRef_SpinBox::PrintDoubleValue( x ) );
myGrp->LineEdit3->setText( QString( "%1" ).arg( y ) ); myGrp->LineEdit3->setText( DlgRef_SpinBox::PrintDoubleValue( y ) );
myGrp->LineEdit4->setText( QString( "%1" ).arg( z ) ); myGrp->LineEdit4->setText( DlgRef_SpinBox::PrintDoubleValue( z ) );
displayPreview(); displayPreview();
} }

View File

@ -17,7 +17,7 @@
// License along with this library; if not, write to the Free Software // License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// //
// //
@ -30,6 +30,7 @@
#include "MeasureGUI_2Sel1LineEdit_QTD.h" #include "MeasureGUI_2Sel1LineEdit_QTD.h"
#include "GEOMBase.h" #include "GEOMBase.h"
#include "GEOM_Displayer.h" #include "GEOM_Displayer.h"
#include "DlgRef_SpinBox.h"
#include "SUIT_Session.h" #include "SUIT_Session.h"
#include "SUIT_ViewWindow.h" #include "SUIT_ViewWindow.h"
@ -125,7 +126,6 @@ void MeasureGUI_DistanceDlg::Init()
connect( mySelBtn2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); connect( mySelBtn2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
MeasureGUI_Skeleton::Init(); MeasureGUI_Skeleton::Init();
} }
@ -163,7 +163,7 @@ void MeasureGUI_DistanceDlg::processObject()
double aDist = 0.; double aDist = 0.;
if ( getParameters( aDist, aPnt1, aPnt2 ) ) if ( getParameters( aDist, aPnt1, aPnt2 ) )
{ {
myGrp->LineEdit3->setText( QString( "%1" ).arg( aDist ) ); myGrp->LineEdit3->setText( DlgRef_SpinBox::PrintDoubleValue( aDist ) );
redisplayPreview(); redisplayPreview();
} }
else else
@ -171,7 +171,6 @@ void MeasureGUI_DistanceDlg::processObject()
myGrp->LineEdit3->setText( "" ); myGrp->LineEdit3->setText( "" );
erasePreview(); erasePreview();
} }
} }
//================================================================================= //=================================================================================
@ -257,9 +256,11 @@ SALOME_Prs* MeasureGUI_DistanceDlg::buildPrs()
double aDist = 0.; double aDist = 0.;
gp_Pnt aPnt1( 0, 0, 0 ), aPnt2( 0, 0, 0 ); gp_Pnt aPnt1( 0, 0, 0 ), aPnt2( 0, 0, 0 );
if ( myObj->_is_nil() || myObj2->_is_nil() || !getParameters( aDist, aPnt1, aPnt2 ) || SUIT_ViewWindow* vw = SUIT_Session::session()->activeApplication()->desktop()->activeWindow();
SUIT_Session::session()->activeApplication()->desktop()->activeWindow()->getViewManager()->getType()
!= OCCViewer_Viewer::Type() ) if ( myObj->_is_nil() || myObj2->_is_nil() ||
!getParameters( aDist, aPnt1, aPnt2 ) ||
vw->getViewManager()->getType() != OCCViewer_Viewer::Type() )
return 0; return 0;
try try
@ -282,7 +283,6 @@ SALOME_Prs* MeasureGUI_DistanceDlg::buildPrs()
( aPnt1.Y() + aPnt2.Y() ) / 2, ( aPnt1.Y() + aPnt2.Y() ) / 2,
( aPnt1.Z() + aPnt2.Z() ) / 2 + 100 ); ( aPnt1.Z() + aPnt2.Z() ) / 2 + 100 );
gp_Vec va( aPnt3, aPnt1 ); gp_Vec va( aPnt3, aPnt1 );
gp_Vec vb( aPnt3, aPnt2 ); gp_Vec vb( aPnt3, aPnt2 );
@ -295,14 +295,11 @@ SALOME_Prs* MeasureGUI_DistanceDlg::buildPrs()
gce_MakePln gce_MP( aPnt1, aPnt2, aPnt3 ); gce_MakePln gce_MP( aPnt1, aPnt2, aPnt3 );
Handle( Geom_Plane ) P = new Geom_Plane( gce_MP.Value() ); Handle( Geom_Plane ) P = new Geom_Plane( gce_MP.Value() );
Handle( AIS_LengthDimension ) anIO = new AIS_LengthDimension( Handle( AIS_LengthDimension ) anIO = new AIS_LengthDimension
aVert1, aVert2, P, aDist, TCollection_ExtendedString( (Standard_CString)aLabel.latin1() ) ); (aVert1, aVert2, P, aDist, TCollection_ExtendedString((Standard_CString)aLabel.latin1()));
SUIT_ViewWindow* vw = SUIT_Session::session()->activeApplication()->desktop()->activeWindow(); SOCC_Prs* aPrs =
SOCC_Prs* aPrs = dynamic_cast<SOCC_Prs*>( ((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->CreatePrs( 0 ) ); dynamic_cast<SOCC_Prs*>( ((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->CreatePrs( 0 ) );
//QAD_ViewFrame* vf = GEOM_Displayer::GetActiveView();
//OCCViewer_Prs* aPrs = dynamic_cast<OCCViewer_Prs*>( vf->CreatePrs( 0 ) );
if ( aPrs ) if ( aPrs )
aPrs->AddObject( anIO ); aPrs->AddObject( anIO );
@ -324,17 +321,3 @@ bool MeasureGUI_DistanceDlg::isValid( QString& msg )
{ {
return MeasureGUI_Skeleton::isValid( msg ) && !myObj2->_is_nil(); return MeasureGUI_Skeleton::isValid( msg ) && !myObj2->_is_nil();
} }

View File

@ -17,7 +17,7 @@
// License along with this library; if not, write to the Free Software // License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// //
// //
@ -203,4 +203,3 @@ bool MeasureGUI_InertiaDlg::getParameters( gp_Mat& I,
return getOperation()->IsDone(); return getOperation()->IsDone();
} }
} }

View File

@ -17,7 +17,7 @@
// License along with this library; if not, write to the Free Software // License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// //
// //
@ -181,24 +181,3 @@ bool MeasureGUI_MaxToleranceDlg::getParameters( double& theMinFaceToler,
return getOperation()->IsDone(); return getOperation()->IsDone();
} }
} }

View File

@ -61,7 +61,6 @@
//================================================================================= //=================================================================================
// class : MeasureGUI_PointDlg() // class : MeasureGUI_PointDlg()
// purpose : Constructs a MeasureGUI_PointDlg which is a child of 'parent' // purpose : Constructs a MeasureGUI_PointDlg which is a child of 'parent'
//
//================================================================================= //=================================================================================
MeasureGUI_PointDlg::MeasureGUI_PointDlg( GeometryGUI* GUI, QWidget* parent ) MeasureGUI_PointDlg::MeasureGUI_PointDlg( GeometryGUI* GUI, QWidget* parent )
: MeasureGUI_Skeleton( GUI, parent, "MeasureGUI_PointDlg" ) : MeasureGUI_Skeleton( GUI, parent, "MeasureGUI_PointDlg" )
@ -111,7 +110,7 @@ MeasureGUI_PointDlg::MeasureGUI_PointDlg( GeometryGUI* GUI, QWidget* parent )
//================================================================================= //=================================================================================
// function : ~MeasureGUI_PointDlg() // function : ~MeasureGUI_PointDlg()
// purpose : Destroys the object and frees any allocated resources // purpose : Destroys the object and frees any allocated resources
//======================myX->setReadOnly( true );=========================================================== //=================================================================================
MeasureGUI_PointDlg::~MeasureGUI_PointDlg() MeasureGUI_PointDlg::~MeasureGUI_PointDlg()
{ {
} }
@ -206,23 +205,3 @@ void MeasureGUI_PointDlg::SelectionIntoArgument()
myZ->setText( "" ); myZ->setText( "" );
} }
} }

View File

@ -31,6 +31,7 @@
#include "GEOM_Displayer.h" #include "GEOM_Displayer.h"
#include "GEOMImpl_Types.hxx" #include "GEOMImpl_Types.hxx"
#include "GEOMBase.h" #include "GEOMBase.h"
#include "DlgRef_SpinBox.h"
#include "SalomeApp_Tools.h" #include "SalomeApp_Tools.h"
#include "utilities.h" #include "utilities.h"
@ -148,9 +149,9 @@ void MeasureGUI_PropertiesDlg::processObject()
} }
else else
{ {
myGrp->LineEdit2->setText( QString( "%1" ).arg( aLength ) ); myGrp->LineEdit2->setText( DlgRef_SpinBox::PrintDoubleValue( aLength ) );
myGrp->LineEdit3->setText( QString( "%1" ).arg( anArea ) ); myGrp->LineEdit3->setText( DlgRef_SpinBox::PrintDoubleValue( anArea ) );
myGrp->LineEdit4->setText( QString( "%1" ).arg( aVolume ) ); myGrp->LineEdit4->setText( DlgRef_SpinBox::PrintDoubleValue( aVolume ) );
} }
} }
@ -200,24 +201,3 @@ SALOME_Prs* MeasureGUI_PropertiesDlg::buildPrs()
return getDisplayer()->BuildPrs( aResult ); return getDisplayer()->BuildPrs( aResult );
} }

View File

@ -103,9 +103,9 @@ void OperationGUI_ArchimedeDlg::Init()
double SpecificStep1 = 0.1; double SpecificStep1 = 0.1;
double SpecificStep2 = 0.01; double SpecificStep2 = 0.01;
/* min, max, myStep and decimals for spin boxes & initial values */ /* min, max, myStep and decimals for spin boxes & initial values */
GroupPoints->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, myStep, 3); GroupPoints->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, myStep, DBL_DIGITS_DISPLAY);
GroupPoints->SpinBox_DY->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep1, 3); GroupPoints->SpinBox_DY->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep1, DBL_DIGITS_DISPLAY);
GroupPoints->SpinBox_DZ->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep2, 3); GroupPoints->SpinBox_DZ->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep2, DBL_DIGITS_DISPLAY);
GroupPoints->SpinBox_DX->SetValue( 100.0 ); GroupPoints->SpinBox_DX->SetValue( 100.0 );
GroupPoints->SpinBox_DY->SetValue( 1.0 ); GroupPoints->SpinBox_DY->SetValue( 1.0 );

View File

@ -146,7 +146,7 @@ OperationGUI_ChamferDlg::OperationGUI_ChamferDlg(GeometryGUI* theGeometryGUI, QW
double SpecificStep = 10.0; double SpecificStep = 10.0;
QMap< int, DlgRef_SpinBox* >::iterator anIter; QMap< int, DlgRef_SpinBox* >::iterator anIter;
for ( anIter = mySpinBox.begin(); anIter != mySpinBox.end(); ++anIter ) for ( anIter = mySpinBox.begin(); anIter != mySpinBox.end(); ++anIter )
anIter.data()->RangeStepAndValidator( 0.001, COORD_MAX, SpecificStep, 3 ); anIter.data()->RangeStepAndValidator( 0.001, COORD_MAX, SpecificStep, DBL_DIGITS_DISPLAY );
setHelpFileName("chamfer.htm"); setHelpFileName("chamfer.htm");

View File

@ -24,7 +24,7 @@
// File : OperationGUI_ClippingDlg.cxx // File : OperationGUI_ClippingDlg.cxx
// Author : Michael Zorin // Author : Michael Zorin
// Module : GEOM // Module : GEOM
// $Header: // $Header$
#include "OperationGUI_ClippingDlg.h" #include "OperationGUI_ClippingDlg.h"
#include "DlgRef_SpinBox.h" #include "DlgRef_SpinBox.h"
@ -41,8 +41,6 @@
#include <V3d_View.hxx> #include <V3d_View.hxx>
#include <V3d.hxx> #include <V3d.hxx>
//#include <V3d_Plane.hxx>
// QT Includes // QT Includes
#include <qapplication.h> #include <qapplication.h>
#include <qgroupbox.h> #include <qgroupbox.h>
@ -109,8 +107,8 @@ OperationGUI_ClippingDlg::OperationGUI_ClippingDlg(GeometryGUI* theGeometryGUI,
Layout1->addWidget( GroupArguments, 2, 0 ); Layout1->addWidget( GroupArguments, 2, 0 );
/* Initialisations */ /* Initialisations */
SpinBox_Near->RangeStepAndValidator( COORD_MIN, COORD_MAX, 10.0, 3 ); SpinBox_Near->RangeStepAndValidator( COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY );
SpinBox_Far->RangeStepAndValidator( COORD_MIN, COORD_MAX, 10.0, 3 ); SpinBox_Far->RangeStepAndValidator( COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY );
/* signals and slots connections */ /* signals and slots connections */
connect( buttonOk , SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) ); connect( buttonOk , SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );

View File

@ -105,9 +105,9 @@ OperationGUI_FilletDlg::OperationGUI_FilletDlg(GeometryGUI* theGeometryGUI, QWid
/***************************************************************/ /***************************************************************/
double SpecificStep = 10.0; double SpecificStep = 10.0;
Group1->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep, 3); Group1->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep, DBL_DIGITS_DISPLAY);
Group2->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep, 3); Group2->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep, DBL_DIGITS_DISPLAY);
Group3->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep, 3); Group3->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep, DBL_DIGITS_DISPLAY);
setHelpFileName("fillet.htm"); setHelpFileName("fillet.htm");

View File

@ -124,13 +124,13 @@ void TransformationGUI_MultiRotationDlg::Init()
double SpecificStep1 = 5; double SpecificStep1 = 5;
double SpecificStep2 = 1; double SpecificStep2 = 1;
/* min, max, step and decimals for spin boxes & initial values */ /* min, max, step and decimals for spin boxes & initial values */
GroupPoints->SpinBox_DX->RangeStepAndValidator(1.0, MAX_NUMBER, SpecificStep2, 3); GroupPoints->SpinBox_DX->RangeStepAndValidator(1.0, MAX_NUMBER, SpecificStep2, 10);
GroupPoints->SpinBox_DX->SetValue(myNbTimes1); GroupPoints->SpinBox_DX->SetValue(myNbTimes1);
GroupDimensions->SpinBox_DX1->RangeStepAndValidator(COORD_MIN, COORD_MAX, SpecificStep1, 3); GroupDimensions->SpinBox_DX1->RangeStepAndValidator(COORD_MIN, COORD_MAX, SpecificStep1, DBL_DIGITS_DISPLAY);
GroupDimensions->SpinBox_DY1->RangeStepAndValidator(1.0, MAX_NUMBER, SpecificStep2, 3); GroupDimensions->SpinBox_DY1->RangeStepAndValidator(1.0, MAX_NUMBER, SpecificStep2, 10);
GroupDimensions->SpinBox_DX2->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); GroupDimensions->SpinBox_DX2->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
GroupDimensions->SpinBox_DY2->RangeStepAndValidator(1.0, MAX_NUMBER, SpecificStep2, 3); GroupDimensions->SpinBox_DY2->RangeStepAndValidator(1.0, MAX_NUMBER, SpecificStep2, 10);
GroupDimensions->SpinBox_DX1->SetValue(myAng); GroupDimensions->SpinBox_DX1->SetValue(myAng);
GroupDimensions->SpinBox_DY1->SetValue(myNbTimes1); GroupDimensions->SpinBox_DY1->SetValue(myNbTimes1);
GroupDimensions->SpinBox_DX2->SetValue(myStep); GroupDimensions->SpinBox_DX2->SetValue(myStep);

View File

@ -130,15 +130,15 @@ void TransformationGUI_MultiTranslationDlg::Init()
double SpecificStep = 1; double SpecificStep = 1;
/* min, max, step and decimals for spin boxes & initial values */ /* min, max, step and decimals for spin boxes & initial values */
GroupPoints->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); GroupPoints->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
GroupPoints->SpinBox_DY->RangeStepAndValidator(1.0, MAX_NUMBER, SpecificStep, 3); GroupPoints->SpinBox_DY->RangeStepAndValidator(1.0, MAX_NUMBER, SpecificStep, 10);
GroupPoints->SpinBox_DX->SetValue(myStepU); GroupPoints->SpinBox_DX->SetValue(myStepU);
GroupPoints->SpinBox_DY->SetValue(myNbTimesU); GroupPoints->SpinBox_DY->SetValue(myNbTimesU);
GroupDimensions->SpinBox_DX1->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); GroupDimensions->SpinBox_DX1->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
GroupDimensions->SpinBox_DY1->RangeStepAndValidator(1.0, MAX_NUMBER, SpecificStep, 3); GroupDimensions->SpinBox_DY1->RangeStepAndValidator(1.0, MAX_NUMBER, SpecificStep, 10);
GroupDimensions->SpinBox_DX2->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); GroupDimensions->SpinBox_DX2->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
GroupDimensions->SpinBox_DY2->RangeStepAndValidator(1.0, MAX_NUMBER, SpecificStep, 3); GroupDimensions->SpinBox_DY2->RangeStepAndValidator(1.0, MAX_NUMBER, SpecificStep, 10);
GroupDimensions->SpinBox_DX1->SetValue(myStepU); GroupDimensions->SpinBox_DX1->SetValue(myStepU);
GroupDimensions->SpinBox_DY1->SetValue(myNbTimesU); GroupDimensions->SpinBox_DY1->SetValue(myNbTimesU);
GroupDimensions->SpinBox_DX2->SetValue(myStepV); GroupDimensions->SpinBox_DX2->SetValue(myStepV);
@ -182,7 +182,6 @@ void TransformationGUI_MultiTranslationDlg::Init()
connect(myGeomGUI->getApp()->selectionMgr(), connect(myGeomGUI->getApp()->selectionMgr(),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
initName( tr( "GEOM_MULTITRANSLATION" ) ); initName( tr( "GEOM_MULTITRANSLATION" ) );
ConstructorsClicked( 0 ); ConstructorsClicked( 0 );
} }
@ -280,12 +279,14 @@ void TransformationGUI_MultiTranslationDlg::SelectionIntoArgument()
{ {
myEditCurrentArgument->setText(""); myEditCurrentArgument->setText("");
if(IObjectCount() != 1) { if (IObjectCount() != 1) {
if(myEditCurrentArgument == GroupPoints->LineEdit1 || myEditCurrentArgument == GroupDimensions->LineEdit1) if (myEditCurrentArgument == GroupPoints->LineEdit1 ||
myEditCurrentArgument == GroupDimensions->LineEdit1)
myBase = GEOM::GEOM_Object::_nil(); myBase = GEOM::GEOM_Object::_nil();
else if(myEditCurrentArgument == GroupPoints->LineEdit2 || myEditCurrentArgument == GroupDimensions->LineEdit2) else if (myEditCurrentArgument == GroupPoints->LineEdit2 ||
myEditCurrentArgument == GroupDimensions->LineEdit2)
myVectorU = GEOM::GEOM_Object::_nil(); myVectorU = GEOM::GEOM_Object::_nil();
else if(myEditCurrentArgument == GroupDimensions->LineEdit3) else if (myEditCurrentArgument == GroupDimensions->LineEdit3)
myVectorV = GEOM::GEOM_Object::_nil(); myVectorV = GEOM::GEOM_Object::_nil();
return; return;
} }
@ -297,11 +298,13 @@ void TransformationGUI_MultiTranslationDlg::SelectionIntoArgument()
if ( !testResult || CORBA::is_nil( aSelectedObject ) || !GEOMBase::IsShape( aSelectedObject ) ) if ( !testResult || CORBA::is_nil( aSelectedObject ) || !GEOMBase::IsShape( aSelectedObject ) )
return; return;
if(myEditCurrentArgument == GroupPoints->LineEdit1 || myEditCurrentArgument == GroupDimensions->LineEdit1) if (myEditCurrentArgument == GroupPoints->LineEdit1 ||
myEditCurrentArgument == GroupDimensions->LineEdit1)
myBase = aSelectedObject; myBase = aSelectedObject;
else if(myEditCurrentArgument == GroupPoints->LineEdit2 || myEditCurrentArgument == GroupDimensions->LineEdit2) else if (myEditCurrentArgument == GroupPoints->LineEdit2 ||
myEditCurrentArgument == GroupDimensions->LineEdit2)
myVectorU = aSelectedObject; myVectorU = aSelectedObject;
else if(myEditCurrentArgument == GroupDimensions->LineEdit3) else if (myEditCurrentArgument == GroupDimensions->LineEdit3)
myVectorV = aSelectedObject; myVectorV = aSelectedObject;
myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) ); myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) );
@ -318,7 +321,6 @@ void TransformationGUI_MultiTranslationDlg::SetEditCurrentArgument()
{ {
QPushButton* send = (QPushButton*)sender(); QPushButton* send = (QPushButton*)sender();
if(send == GroupPoints->PushButton1) { if(send == GroupPoints->PushButton1) {
myEditCurrentArgument = GroupPoints->LineEdit1; myEditCurrentArgument = GroupPoints->LineEdit1;
globalSelection( GEOM_ALLSHAPES ); globalSelection( GEOM_ALLSHAPES );

View File

@ -108,9 +108,7 @@ void TransformationGUI_OffsetDlg::Init()
double step = 1; double step = 1;
/* min, max, step and decimals for spin boxes & initial values */ /* min, max, step and decimals for spin boxes & initial values */
GroupPoints->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); GroupPoints->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
GroupPoints->SpinBox_DX->setPrecision(5);
//@ GroupPoints->SpinBox_DX->setDblPrecision(1e-05);
GroupPoints->SpinBox_DX->SetValue(1e-05); GroupPoints->SpinBox_DX->SetValue(1e-05);
// Activate Create a Copy mode // Activate Create a Copy mode
@ -131,7 +129,6 @@ void TransformationGUI_OffsetDlg::Init()
initName( tr( "GEOM_OFFSET" ) ); initName( tr( "GEOM_OFFSET" ) );
globalSelection( GEOM_ALLSHAPES ); globalSelection( GEOM_ALLSHAPES );
} }
@ -295,22 +292,22 @@ bool TransformationGUI_OffsetDlg::execute( ObjectList& objects )
GEOM::GEOM_Object_var anObj; GEOM::GEOM_Object_var anObj;
if (GroupPoints->CheckButton1->isChecked() || IsPreview()) if (GroupPoints->CheckButton1->isChecked() || IsPreview())
for (int i = 0; i < myObjects.length(); i++) for (int i = 0; i < myObjects.length(); i++)
{ {
anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->
anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->OffsetShapeCopy( myObjects[i], GetOffset() ); OffsetShapeCopy( myObjects[i], GetOffset() );
if ( !anObj->_is_nil() ) if ( !anObj->_is_nil() )
objects.push_back( anObj._retn() ); objects.push_back( anObj._retn() );
} }
else else
for (int i = 0; i < myObjects.length(); i++) for (int i = 0; i < myObjects.length(); i++)
{ {
anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->OffsetShape( myObjects[i], GetOffset() ); anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->
if ( !anObj->_is_nil() ) OffsetShape( myObjects[i], GetOffset() );
objects.push_back( anObj._retn() ); if ( !anObj->_is_nil() )
} objects.push_back( anObj._retn() );
}
res = true; res = true;

View File

@ -88,10 +88,11 @@ TransformationGUI_RotationDlg::TransformationGUI_RotationDlg
Layout1->addWidget(GroupPoints, 2, 0); Layout1->addWidget(GroupPoints, 2, 0);
/***************************************************************/ /***************************************************************/
double anAngle = 0; double anAngle = 0;
double SpecificStep = 5; double SpecificStep = 5;
/* min, max, step and decimals for spin boxes & initial values */ /* min, max, step and decimals for spin boxes & initial values */
GroupPoints->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, SpecificStep, 3); GroupPoints->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, SpecificStep, DBL_DIGITS_DISPLAY);
GroupPoints->SpinBox_DX->SetValue(anAngle); GroupPoints->SpinBox_DX->SetValue(anAngle);
// Activate Create a Copy mode // Activate Create a Copy mode
@ -413,14 +414,16 @@ bool TransformationGUI_RotationDlg::execute( ObjectList& objects )
if (toCreateCopy) if (toCreateCopy)
for (int i = 0; i < myObjects.length(); i++) for (int i = 0; i < myObjects.length(); i++)
{ {
anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->RotateCopy( myObjects[i], myAxis, GetAngle() * PI180 ); anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->
RotateCopy( myObjects[i], myAxis, GetAngle() * PI180 );
if ( !anObj->_is_nil() ) if ( !anObj->_is_nil() )
objects.push_back( anObj._retn() ); objects.push_back( anObj._retn() );
} }
else else
for (int i = 0; i < myObjects.length(); i++) for (int i = 0; i < myObjects.length(); i++)
{ {
anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->Rotate( myObjects[i], myAxis, GetAngle() * PI180 ); anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->
Rotate( myObjects[i], myAxis, GetAngle() * PI180 );
if ( !anObj->_is_nil() ) if ( !anObj->_is_nil() )
objects.push_back( anObj._retn() ); objects.push_back( anObj._retn() );
} }
@ -432,14 +435,16 @@ bool TransformationGUI_RotationDlg::execute( ObjectList& objects )
if (toCreateCopy) if (toCreateCopy)
for (int i = 0; i < myObjects.length(); i++) for (int i = 0; i < myObjects.length(); i++)
{ {
anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->RotateThreePointsCopy( myObjects[i], myCentPoint, myPoint1, myPoint2 ); anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->
RotateThreePointsCopy( myObjects[i], myCentPoint, myPoint1, myPoint2 );
if ( !anObj->_is_nil() ) if ( !anObj->_is_nil() )
objects.push_back( anObj._retn() ); objects.push_back( anObj._retn() );
} }
else else
for (int i = 0; i < myObjects.length(); i++) for (int i = 0; i < myObjects.length(); i++)
{ {
anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->RotateThreePoints( myObjects[i], myCentPoint, myPoint1, myPoint2 ); anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->
RotateThreePoints( myObjects[i], myCentPoint, myPoint1, myPoint2 );
if ( !anObj->_is_nil() ) if ( !anObj->_is_nil() )
objects.push_back( anObj._retn() ); objects.push_back( anObj._retn() );
} }

View File

@ -85,7 +85,7 @@ TransformationGUI_ScaleDlg::TransformationGUI_ScaleDlg(GeometryGUI* theGeometryG
double aFactor = 2.0; double aFactor = 2.0;
double SpecificStep = 0.5; double SpecificStep = 0.5;
/* min, max, step and decimals for spin boxes & initial values */ /* min, max, step and decimals for spin boxes & initial values */
GroupPoints->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, SpecificStep, 3); GroupPoints->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, SpecificStep, DBL_DIGITS_DISPLAY);
GroupPoints->SpinBox_DX->SetValue(aFactor); GroupPoints->SpinBox_DX->SetValue(aFactor);
// Activate Create a Copy mode // Activate Create a Copy mode
@ -311,14 +311,16 @@ bool TransformationGUI_ScaleDlg::execute( ObjectList& objects )
if (GroupPoints->CheckButton1->isChecked() || IsPreview()) if (GroupPoints->CheckButton1->isChecked() || IsPreview())
for (int i = 0; i < myObjects.length(); i++) for (int i = 0; i < myObjects.length(); i++)
{ {
anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->ScaleShapeCopy( myObjects[i], myPoint, GetFactor() ); anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->
ScaleShapeCopy( myObjects[i], myPoint, GetFactor() );
if ( !anObj->_is_nil() ) if ( !anObj->_is_nil() )
objects.push_back( anObj._retn() ); objects.push_back( anObj._retn() );
} }
else else
for (int i = 0; i < myObjects.length(); i++) for (int i = 0; i < myObjects.length(); i++)
{ {
anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->ScaleShape( myObjects[i], myPoint, GetFactor() ); anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->
ScaleShape( myObjects[i], myPoint, GetFactor() );
if ( !anObj->_is_nil() ) if ( !anObj->_is_nil() )
objects.push_back( anObj._retn() ); objects.push_back( anObj._retn() );
} }

View File

@ -124,9 +124,9 @@ void TransformationGUI_TranslationDlg::Init()
double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100); double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100);
/* min, max, step and decimals for spin boxes & initial values */ /* min, max, step and decimals for spin boxes & initial values */
GroupPoints->SpinBox1->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); GroupPoints->SpinBox1->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
GroupPoints->SpinBox2->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); GroupPoints->SpinBox2->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
GroupPoints->SpinBox3->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); GroupPoints->SpinBox3->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY);
GroupPoints->SpinBox1->SetValue(0.0); GroupPoints->SpinBox1->SetValue(0.0);
GroupPoints->SpinBox2->SetValue(0.0); GroupPoints->SpinBox2->SetValue(0.0);
@ -154,7 +154,7 @@ void TransformationGUI_TranslationDlg::Init()
connect(GroupPoints->CheckBox1, SIGNAL(toggled(bool)), this, SLOT(CreateCopyModeChanged(bool))); connect(GroupPoints->CheckBox1, SIGNAL(toggled(bool)), this, SLOT(CreateCopyModeChanged(bool)));
connect(myGeomGUI->getApp()->selectionMgr(), connect(myGeomGUI->getApp()->selectionMgr(),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
initName( tr( "GEOM_TRANSLATION" ) ); initName( tr( "GEOM_TRANSLATION" ) );
ConstructorsClicked( 0 ); ConstructorsClicked( 0 );