From a10b2745ad0b54c4ac79e83a3f3371613e345cba Mon Sep 17 00:00:00 2001 From: san Date: Mon, 26 Apr 2010 13:43:40 +0000 Subject: [PATCH] Issue 0020580: Precision tune hint added --- src/GEOMToolsGUI/GEOMToolsGUI_DeflectionDlg.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_DeflectionDlg.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_DeflectionDlg.cxx index ba9c43185..370c96edc 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_DeflectionDlg.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_DeflectionDlg.cxx @@ -72,12 +72,18 @@ GEOMToolsGUI_DeflectionDlg::GEOMToolsGUI_DeflectionDlg (QWidget* parent) SpinBox = new SalomeApp_DoubleSpinBox (GroupC1); // Obtain precision from preferences SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); - int aPrecision = resMgr->integerValue( "Geometry", "parametric_precision", 6 ); + const char* quantity = "parametric_precision"; + int aPrecision = resMgr->integerValue( "Geometry", quantity, 6 ); SpinBox->setAcceptNames( false ); SpinBox->setPrecision( aPrecision ); SpinBox->setDecimals( aPrecision ); SpinBox->setRange( DEFLECTION_MIN, 1.0 ); SpinBox->setSingleStep( 1.0e-04 ); + // Add a hint for the user saying how to tune precision + QString userPropName = QObject::tr( QString( "GEOM_PREF_%1" ).arg( quantity ).toLatin1().constData() ); + SpinBox->setProperty( "validity_tune_hint", + QVariant( QObject::tr( "GEOM_PRECISION_HINT" ).arg( userPropName ) ) ); + SpinBox->setObjectName("SpinBoxU"); SpinBox->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed)); SpinBox->setValue(1.0e-04); -- 2.39.2