mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-28 02:10:36 +05:00
Issue 0020580: improved validation in integer and double spin boxes, possibility to adjust input field precision through preferences
This commit is contained in:
parent
a9ae3002a0
commit
f1745a2763
@ -50,5 +50,15 @@
|
|||||||
<parameter name="type_of_marker" value="1" />
|
<parameter name="type_of_marker" value="1" />
|
||||||
<parameter name="deflection_coeff" value="0.001" />
|
<parameter name="deflection_coeff" value="0.001" />
|
||||||
<parameter name="marker_scale" value="1" />
|
<parameter name="marker_scale" value="1" />
|
||||||
|
<!-- Input field precisions -->
|
||||||
|
<parameter name="def_precision" value="3" />
|
||||||
|
<parameter name="length_precision" value="6" />
|
||||||
|
<parameter name="angle_precision" value="3" />
|
||||||
|
<parameter name="len_tol_precision" value="-9" />
|
||||||
|
<parameter name="ang_tol_precision" value="-9" />
|
||||||
|
<parameter name="weight_precision" value="3" />
|
||||||
|
<parameter name="density_precision" value="3" />
|
||||||
|
<parameter name="parametric_precision" value="6" />
|
||||||
|
<parameter name="param_tol_precision" value="-9" />
|
||||||
</section>
|
</section>
|
||||||
</document>
|
</document>
|
||||||
|
@ -158,7 +158,7 @@ void BasicGUI_CircleDlg::Init()
|
|||||||
double aStep = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100 );
|
double aStep = 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 */
|
||||||
initSpinBox( GroupPntVecR->SpinBox_DX, 0.000001, COORD_MAX, aStep, 6 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( GroupPntVecR->SpinBox_DX, 0.000001, COORD_MAX, aStep, "length_precision" );
|
||||||
GroupPntVecR->SpinBox_DX->setValue( 100 );
|
GroupPntVecR->SpinBox_DX->setValue( 100 );
|
||||||
|
|
||||||
/* signals and slots connections */
|
/* signals and slots connections */
|
||||||
|
@ -127,8 +127,8 @@ void BasicGUI_EllipseDlg::Init()
|
|||||||
double aMajorR( 200. ), aMinorR( 100. );
|
double aMajorR( 200. ), aMinorR( 100. );
|
||||||
|
|
||||||
/* min, max, step and decimals for spin boxes & initial values */
|
/* min, max, step and decimals for spin boxes & initial values */
|
||||||
initSpinBox( GroupPoints->SpinBox_DX, 0.000001, COORD_MAX, step, 6 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( GroupPoints->SpinBox_DX, 0.000001, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox( GroupPoints->SpinBox_DY, 0.000001, COORD_MAX, step, 6 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( GroupPoints->SpinBox_DY, 0.000001, COORD_MAX, step, "length_precision" );
|
||||||
GroupPoints->SpinBox_DX->setValue( aMajorR );
|
GroupPoints->SpinBox_DX->setValue( aMajorR );
|
||||||
GroupPoints->SpinBox_DY->setValue( aMinorR );
|
GroupPoints->SpinBox_DY->setValue( aMinorR );
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ void BasicGUI_MarkerDlg::Init()
|
|||||||
double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100 );
|
double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100 );
|
||||||
|
|
||||||
for ( DataMap::iterator anIter = myData.begin(); anIter != myData.end(); ++anIter ) {
|
for ( DataMap::iterator anIter = myData.begin(); anIter != myData.end(); ++anIter ) {
|
||||||
initSpinBox( anIter.value(), COORD_MIN, COORD_MAX, step, 6 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( anIter.value(), COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
connect( anIter.value(), SIGNAL( valueChanged( double ) ),
|
connect( anIter.value(), SIGNAL( valueChanged( double ) ),
|
||||||
this, SLOT( onValueChanged( double ) ) );
|
this, SLOT( onValueChanged( double ) ) );
|
||||||
}
|
}
|
||||||
|
@ -184,15 +184,15 @@ void BasicGUI_PlaneDlg::Init()
|
|||||||
double aTrimSize = 2000.0;
|
double aTrimSize = 2000.0;
|
||||||
|
|
||||||
/* min, max, step and decimals for spin boxes */
|
/* min, max, step and decimals for spin boxes */
|
||||||
initSpinBox( GroupPntDir->SpinBox_DX, 0.000001, COORD_MAX, aStep, 6 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( GroupPntDir->SpinBox_DX, 0.000001, COORD_MAX, aStep, "length_precision" );
|
||||||
GroupPntDir->SpinBox_DX->setValue( aTrimSize );
|
GroupPntDir->SpinBox_DX->setValue( aTrimSize );
|
||||||
initSpinBox( Group3Pnts->SpinBox_DX, 0.000001, COORD_MAX, aStep, 6 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group3Pnts->SpinBox_DX, 0.000001, COORD_MAX, aStep, "length_precision" );
|
||||||
Group3Pnts->SpinBox_DX->setValue( aTrimSize );
|
Group3Pnts->SpinBox_DX->setValue( aTrimSize );
|
||||||
initSpinBox( GroupFace->SpinBox_DX, 0.000001, COORD_MAX, aStep, 6 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( GroupFace->SpinBox_DX, 0.000001, COORD_MAX, aStep, "length_precision" );
|
||||||
GroupFace->SpinBox_DX->setValue( aTrimSize );
|
GroupFace->SpinBox_DX->setValue( aTrimSize );
|
||||||
initSpinBox( Group2Vec->SpinBox_DX, 0.000001, COORD_MAX, aStep, 6 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group2Vec->SpinBox_DX, 0.000001, COORD_MAX, aStep, "length_precision" );
|
||||||
Group2Vec->SpinBox_DX->setValue( aTrimSize );
|
Group2Vec->SpinBox_DX->setValue( aTrimSize );
|
||||||
initSpinBox( GroupLCS->SpinBox_DX, 0.000001, COORD_MAX, aStep, 6 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( GroupLCS->SpinBox_DX, 0.000001, COORD_MAX, aStep, "length_precision" );
|
||||||
GroupLCS->SpinBox_DX->setValue( aTrimSize );
|
GroupLCS->SpinBox_DX->setValue( aTrimSize );
|
||||||
|
|
||||||
/* signals and slots connections */
|
/* signals and slots connections */
|
||||||
|
@ -231,28 +231,28 @@ void BasicGUI_PointDlg::Init()
|
|||||||
double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100 );
|
double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100 );
|
||||||
|
|
||||||
/* min, max, step and decimals for spin boxes */
|
/* min, max, step and decimals for spin boxes */
|
||||||
initSpinBox( GroupXYZ->SpinBox_DX, COORD_MIN, COORD_MAX, step, 6 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( GroupXYZ->SpinBox_DX, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox( GroupXYZ->SpinBox_DY, COORD_MIN, COORD_MAX, step, 6 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( GroupXYZ->SpinBox_DY, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox( GroupXYZ->SpinBox_DZ, COORD_MIN, COORD_MAX, step, 6 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( GroupXYZ->SpinBox_DZ, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
GroupXYZ->SpinBox_DX->setValue( 0.0 );
|
GroupXYZ->SpinBox_DX->setValue( 0.0 );
|
||||||
GroupXYZ->SpinBox_DY->setValue( 0.0 );
|
GroupXYZ->SpinBox_DY->setValue( 0.0 );
|
||||||
GroupXYZ->SpinBox_DZ->setValue( 0.0 );
|
GroupXYZ->SpinBox_DZ->setValue( 0.0 );
|
||||||
|
|
||||||
initSpinBox( GroupRefPoint->SpinBox_DX, COORD_MIN, COORD_MAX, step, 6 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( GroupRefPoint->SpinBox_DX, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox( GroupRefPoint->SpinBox_DY, COORD_MIN, COORD_MAX, step, 6 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( GroupRefPoint->SpinBox_DY, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox( GroupRefPoint->SpinBox_DZ, COORD_MIN, COORD_MAX, step, 6 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( GroupRefPoint->SpinBox_DZ, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
GroupRefPoint->SpinBox_DX->setValue( 0.0 );
|
GroupRefPoint->SpinBox_DX->setValue( 0.0 );
|
||||||
GroupRefPoint->SpinBox_DY->setValue( 0.0 );
|
GroupRefPoint->SpinBox_DY->setValue( 0.0 );
|
||||||
GroupRefPoint->SpinBox_DZ->setValue( 0.0 );
|
GroupRefPoint->SpinBox_DZ->setValue( 0.0 );
|
||||||
|
|
||||||
step = 0.1;
|
step = 0.1;
|
||||||
|
|
||||||
initSpinBox( GroupOnCurve->SpinBox_DX, 0., 1., step, 6 ); // VSR:TODO : DBL_DIGITS_DISPLAY
|
initSpinBox( GroupOnCurve->SpinBox_DX, 0., 1., step, "parametric_precision" );
|
||||||
GroupOnCurve->SpinBox_DX->setValue( 0.5 );
|
GroupOnCurve->SpinBox_DX->setValue( 0.5 );
|
||||||
|
|
||||||
initSpinBox( GroupOnSurface->SpinBox_DX, 0., 1., step, 6 ); // VSR:TODO : DBL_DIGITS_DISPLAY
|
initSpinBox( GroupOnSurface->SpinBox_DX, 0., 1., step, "parametric_precision" );
|
||||||
GroupOnSurface->SpinBox_DX->setValue( 0.5 );
|
GroupOnSurface->SpinBox_DX->setValue( 0.5 );
|
||||||
initSpinBox( GroupOnSurface->SpinBox_DY, 0., 1., step, 6 ); // VSR:TODO : DBL_DIGITS_DISPLAY
|
initSpinBox( GroupOnSurface->SpinBox_DY, 0., 1., step, "parametric_precision" );
|
||||||
GroupOnSurface->SpinBox_DY->setValue( 0.5 );
|
GroupOnSurface->SpinBox_DY->setValue( 0.5 );
|
||||||
|
|
||||||
/* signals and slots connections */
|
/* signals and slots connections */
|
||||||
@ -310,8 +310,6 @@ void BasicGUI_PointDlg::SetDoubleSpinBoxStep( double step )
|
|||||||
GroupRefPoint->SpinBox_DX->setSingleStep(step);
|
GroupRefPoint->SpinBox_DX->setSingleStep(step);
|
||||||
GroupRefPoint->SpinBox_DY->setSingleStep(step);
|
GroupRefPoint->SpinBox_DY->setSingleStep(step);
|
||||||
GroupRefPoint->SpinBox_DZ->setSingleStep(step);
|
GroupRefPoint->SpinBox_DZ->setSingleStep(step);
|
||||||
GroupOnSurface->SpinBox_DX->setSingleStep(step);
|
|
||||||
GroupOnSurface->SpinBox_DY->setSingleStep(step);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -126,9 +126,9 @@ void BasicGUI_VectorDlg::Init()
|
|||||||
double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100 );
|
double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100 );
|
||||||
|
|
||||||
/* min, max, step and decimals for spin boxes */
|
/* min, max, step and decimals for spin boxes */
|
||||||
initSpinBox( GroupDimensions->SpinBox_DX, COORD_MIN, COORD_MAX, step, 6 ); // VSR:TODO : DBL_DIGITS_DISPLAY
|
initSpinBox( GroupDimensions->SpinBox_DX, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox( GroupDimensions->SpinBox_DY, COORD_MIN, COORD_MAX, step, 6 ); // VSR:TODO : DBL_DIGITS_DISPLAY
|
initSpinBox( GroupDimensions->SpinBox_DY, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox( GroupDimensions->SpinBox_DZ, COORD_MIN, COORD_MAX, step, 6 ); // VSR:TODO : DBL_DIGITS_DISPLAY
|
initSpinBox( GroupDimensions->SpinBox_DZ, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
|
|
||||||
double dx( 0. ), dy( 0. ), dz( 200. );
|
double dx( 0. ), dy( 0. ), dz( 200. );
|
||||||
GroupDimensions->SpinBox_DX->setValue( dx );
|
GroupDimensions->SpinBox_DX->setValue( dx );
|
||||||
|
@ -114,7 +114,6 @@ void BlocksGUI_TrsfDlg::Init()
|
|||||||
int SpecificStep = 1;
|
int SpecificStep = 1;
|
||||||
QMap<int, SalomeApp_IntSpinBox*>::iterator anIter;
|
QMap<int, SalomeApp_IntSpinBox*>::iterator anIter;
|
||||||
for (anIter = mySpinBox.begin(); anIter != mySpinBox.end(); ++anIter) {
|
for (anIter = mySpinBox.begin(); anIter != mySpinBox.end(); ++anIter) {
|
||||||
//anIter.data()->RangeStepAndValidator(1, 999, SpecificStep);
|
|
||||||
initSpinBox(anIter.value(), 1, 999, SpecificStep);
|
initSpinBox(anIter.value(), 1, 999, SpecificStep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ BuildGUI_WireDlg::BuildGUI_WireDlg( GeometryGUI* theGeometryGUI, QWidget* parent
|
|||||||
GroupArgs->TextLabel2->setText( tr( "GEOM_TOLERANCE" ) );
|
GroupArgs->TextLabel2->setText( tr( "GEOM_TOLERANCE" ) );
|
||||||
double SpecificStep = 0.0001;
|
double SpecificStep = 0.0001;
|
||||||
double prec = Precision::Confusion();
|
double prec = Precision::Confusion();
|
||||||
initSpinBox(GroupArgs->SpinBox_DX, prec, MAX_NUMBER, SpecificStep, 9);
|
initSpinBox(GroupArgs->SpinBox_DX, prec, MAX_NUMBER, SpecificStep, "len_tol_precision" );
|
||||||
GroupArgs->SpinBox_DX->setValue(prec);
|
GroupArgs->SpinBox_DX->setValue(prec);
|
||||||
|
|
||||||
QVBoxLayout* layout = new QVBoxLayout( centralWidget() );
|
QVBoxLayout* layout = new QVBoxLayout( centralWidget() );
|
||||||
|
@ -96,9 +96,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="SalomeApp_DoubleSpinBox" name="SpinBox1"/>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
<item row="0" column="2">
|
||||||
<widget class="QLabel" name="TextLabel3">
|
<widget class="QLabel" name="TextLabel3">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -134,9 +131,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="SalomeApp_DoubleSpinBox" name="SpinBox4"/>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2">
|
<item row="1" column="2">
|
||||||
<widget class="QLabel" name="TextLabel6">
|
<widget class="QLabel" name="TextLabel6">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -172,9 +166,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="SalomeApp_DoubleSpinBox" name="SpinBox3"/>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="2" colspan="2">
|
<item row="2" column="2" colspan="2">
|
||||||
<widget class="QCheckBox" name="CheckBox1">
|
<widget class="QCheckBox" name="CheckBox1">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -182,6 +173,15 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="SalomeApp_IntSpinBox" name="SpinBox1"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="SalomeApp_IntSpinBox" name="SpinBox4"/>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="SalomeApp_IntSpinBox" name="SpinBox3"/>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
@ -195,6 +195,11 @@
|
|||||||
<extends>QDoubleSpinBox</extends>
|
<extends>QDoubleSpinBox</extends>
|
||||||
<header location="global">SalomeApp_DoubleSpinBox.h</header>
|
<header location="global">SalomeApp_DoubleSpinBox.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>SalomeApp_IntSpinBox</class>
|
||||||
|
<extends>QSpinBox</extends>
|
||||||
|
<header location="global">SalomeApp_IntSpinBox.h</header>
|
||||||
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>PushButton1</tabstop>
|
<tabstop>PushButton1</tabstop>
|
||||||
|
@ -146,9 +146,9 @@ void EntityGUI_3DSketcherDlg::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 */
|
||||||
initSpinBox( Group3Spin->SpinBox_DX, COORD_MIN, COORD_MAX, step, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group3Spin->SpinBox_DX, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox( Group3Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group3Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox( Group3Spin->SpinBox_DZ, COORD_MIN, COORD_MAX, step, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group3Spin->SpinBox_DZ, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
|
|
||||||
Group3Spin->SpinBox_DX->setValue(0.0);
|
Group3Spin->SpinBox_DX->setValue(0.0);
|
||||||
Group3Spin->SpinBox_DY->setValue(0.0);
|
Group3Spin->SpinBox_DY->setValue(0.0);
|
||||||
@ -465,20 +465,6 @@ bool EntityGUI_3DSketcherDlg::execute( ObjectList& objects )
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
|
||||||
// function : initSpinBox()
|
|
||||||
// purpose :
|
|
||||||
//=================================================================================
|
|
||||||
|
|
||||||
void EntityGUI_3DSketcherDlg::initSpinBox( QDoubleSpinBox* spinBox,
|
|
||||||
double min, double max,
|
|
||||||
double step, int decimals )
|
|
||||||
{
|
|
||||||
spinBox->setDecimals( decimals );
|
|
||||||
spinBox->setRange( min, max );
|
|
||||||
spinBox->setSingleStep( step );
|
|
||||||
}
|
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// function : SetDoubleSpinBoxStep()
|
// function : SetDoubleSpinBoxStep()
|
||||||
// purpose : Double spin box management
|
// purpose : Double spin box management
|
||||||
|
@ -61,10 +61,7 @@ public:
|
|||||||
~EntityGUI_3DSketcherDlg();
|
~EntityGUI_3DSketcherDlg();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void initSpinBox( QDoubleSpinBox*,
|
|
||||||
double, double, double = 0.1,
|
|
||||||
int = 3 );
|
|
||||||
|
|
||||||
// redefined from GEOMBase_Helper
|
// redefined from GEOMBase_Helper
|
||||||
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
||||||
virtual bool isValid( QString& );
|
virtual bool isValid( QString& );
|
||||||
|
@ -326,16 +326,17 @@ 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 */
|
||||||
initSpinBox( Group1Spin->SpinBox_DX, COORD_MIN, COORD_MAX, step, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group1Spin->SpinBox_DX, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox( Group2Spin->SpinBox_DX, COORD_MIN, COORD_MAX, step, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group2Spin->SpinBox_DX, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox( Group2Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group2Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox( Group3Spin->SpinBox_DX, COORD_MIN, COORD_MAX, step, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group3Spin->SpinBox_DX, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox( Group3Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group3Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox( Group3Spin->SpinBox_DZ, COORD_MIN, COORD_MAX, step, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group3Spin->SpinBox_DZ, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox( Group4Spin->SpinBox_DX, COORD_MIN, COORD_MAX, 0.1, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group4Spin->SpinBox_DZ, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox( Group4Spin->SpinBox_DY, COORD_MIN, COORD_MAX, 0.1, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
// san: Note specific step values below!
|
||||||
initSpinBox( Group4Spin->SpinBox_DZ, COORD_MIN, COORD_MAX, step, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group4Spin->SpinBox_DX, COORD_MIN, COORD_MAX, 0.1, "length_precision" );
|
||||||
initSpinBox( Group4Spin->SpinBox_DS, COORD_MIN, COORD_MAX, 5., 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group4Spin->SpinBox_DY, COORD_MIN, COORD_MAX, 0.1, "length_precision" );
|
||||||
|
initSpinBox( Group4Spin->SpinBox_DS, COORD_MIN, COORD_MAX, 5., "length_precision" );
|
||||||
|
|
||||||
/* displays Dialog */
|
/* displays Dialog */
|
||||||
MainWidget->GroupConstructors->setEnabled( false );
|
MainWidget->GroupConstructors->setEnabled( false );
|
||||||
@ -433,8 +434,8 @@ void EntityGUI_SketcherDlg::PointClicked( int constructorId )
|
|||||||
if ( myConstructorId == 0 ) { // SEGMENT
|
if ( myConstructorId == 0 ) { // SEGMENT
|
||||||
if ( constructorId == 1 ) { // XY
|
if ( constructorId == 1 ) { // XY
|
||||||
mySketchType = PT_ABS;
|
mySketchType = PT_ABS;
|
||||||
initSpinBox( Group2Spin->SpinBox_DX, COORD_MIN, COORD_MAX, step, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group2Spin->SpinBox_DX, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox( Group2Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group2Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
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;
|
||||||
@ -448,8 +449,8 @@ void EntityGUI_SketcherDlg::PointClicked( int constructorId )
|
|||||||
}
|
}
|
||||||
else if ( constructorId == 0 ) { // DXDY
|
else if ( constructorId == 0 ) { // DXDY
|
||||||
mySketchType = PT_RELATIVE;
|
mySketchType = PT_RELATIVE;
|
||||||
initSpinBox( Group2Spin->SpinBox_DX, COORD_MIN, COORD_MAX, step, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group2Spin->SpinBox_DX, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox( Group2Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group2Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
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;
|
||||||
@ -503,8 +504,7 @@ void EntityGUI_SketcherDlg::Dir2Clicked( int constructorId )
|
|||||||
myY = 0.0;
|
myY = 0.0;
|
||||||
myLength = 100.0;
|
myLength = 100.0;
|
||||||
if ( myConstructorDirId == 2 ) { // Angle
|
if ( myConstructorDirId == 2 ) { // Angle
|
||||||
initSpinBox( Group2Spin->SpinBox_DX, COORD_MIN, COORD_MAX, 5., 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group2Spin->SpinBox_DX, COORD_MIN, COORD_MAX, 5., "length_precision" );
|
||||||
initSpinBox( Group2Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, 3 ); // VSR: TODO: 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();
|
||||||
@ -512,16 +512,19 @@ void EntityGUI_SketcherDlg::Dir2Clicked( int constructorId )
|
|||||||
|
|
||||||
if ( constructorId == 2 ) { // Length
|
if ( constructorId == 2 ) { // Length
|
||||||
mySketchType = DIR_ANGLE_LENGTH;
|
mySketchType = DIR_ANGLE_LENGTH;
|
||||||
|
initSpinBox( Group2Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_LENGTH2" ) );
|
Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_LENGTH2" ) );
|
||||||
Group2Spin->SpinBox_DY->setValue( myLength );
|
Group2Spin->SpinBox_DY->setValue( myLength );
|
||||||
}
|
}
|
||||||
else if ( constructorId == 0 ) { // X
|
else if ( constructorId == 0 ) { // X
|
||||||
mySketchType = DIR_ANGLE_X;
|
mySketchType = DIR_ANGLE_X;
|
||||||
|
initSpinBox( Group2Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, "angle_precision" );
|
||||||
Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_X3" ) );
|
Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_X3" ) );
|
||||||
Group2Spin->SpinBox_DY->setValue( myX );
|
Group2Spin->SpinBox_DY->setValue( myX );
|
||||||
}
|
}
|
||||||
else if ( constructorId == 1 ) { // Y
|
else if ( constructorId == 1 ) { // Y
|
||||||
mySketchType = DIR_ANGLE_Y;
|
mySketchType = DIR_ANGLE_Y;
|
||||||
|
initSpinBox( Group2Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, "angle_precision" );
|
||||||
Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_Y3" ) );
|
Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_Y3" ) );
|
||||||
Group2Spin->SpinBox_DY->setValue( myY );
|
Group2Spin->SpinBox_DY->setValue( myY );
|
||||||
}
|
}
|
||||||
@ -567,9 +570,9 @@ void EntityGUI_SketcherDlg::Dir2Clicked( int constructorId )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( myConstructorDirId == 3 ) { // DXDY
|
else if ( myConstructorDirId == 3 ) { // DXDY
|
||||||
initSpinBox( Group3Spin->SpinBox_DX, COORD_MIN, COORD_MAX, 0.1, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group3Spin->SpinBox_DX, COORD_MIN, COORD_MAX, 0.1, "length_precision" );
|
||||||
initSpinBox( Group3Spin->SpinBox_DY, COORD_MIN, COORD_MAX, 0.1, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group3Spin->SpinBox_DY, COORD_MIN, COORD_MAX, 0.1, "length_precision" );
|
||||||
initSpinBox( Group3Spin->SpinBox_DZ, COORD_MIN, COORD_MAX, step, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group3Spin->SpinBox_DZ, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
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;
|
||||||
@ -600,9 +603,9 @@ void EntityGUI_SketcherDlg::Dir2Clicked( int constructorId )
|
|||||||
if ( myConstructorDirId == 2 ) { // Angle
|
if ( myConstructorDirId == 2 ) { // Angle
|
||||||
if ( constructorId == 2 ) { // Length
|
if ( constructorId == 2 ) { // Length
|
||||||
mySketchType = DIR_ANGLE_LENGTH;
|
mySketchType = DIR_ANGLE_LENGTH;
|
||||||
initSpinBox( Group3Spin->SpinBox_DX, COORD_MIN, COORD_MAX, 5., 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group3Spin->SpinBox_DX, COORD_MIN, COORD_MAX, 5., "angle_precision" );
|
||||||
initSpinBox( Group3Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group3Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox( Group3Spin->SpinBox_DZ, COORD_MIN, COORD_MAX, 5., 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group3Spin->SpinBox_DZ, COORD_MIN, COORD_MAX, 5., "angle_precision" );
|
||||||
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" ));
|
||||||
@ -618,8 +621,8 @@ void EntityGUI_SketcherDlg::Dir2Clicked( int constructorId )
|
|||||||
else if ( myConstructorDirId == 0 ) { // Perpendicular
|
else if ( myConstructorDirId == 0 ) { // Perpendicular
|
||||||
if ( constructorId == 2 ) { // Length
|
if ( constructorId == 2 ) { // Length
|
||||||
mySketchType = DIR_PER_LENGTH;
|
mySketchType = DIR_PER_LENGTH;
|
||||||
initSpinBox( Group2Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group2Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox( Group2Spin->SpinBox_DY, COORD_MIN, COORD_MAX, 5., 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group2Spin->SpinBox_DY, COORD_MIN, COORD_MAX, 5., "angle_precision" );
|
||||||
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;
|
||||||
@ -633,8 +636,8 @@ void EntityGUI_SketcherDlg::Dir2Clicked( int constructorId )
|
|||||||
else if ( myConstructorDirId == 1 ) { // Tangent
|
else if ( myConstructorDirId == 1 ) { // Tangent
|
||||||
if ( constructorId == 2 ) { // Length
|
if ( constructorId == 2 ) { // Length
|
||||||
mySketchType = DIR_TAN_LENGTH;
|
mySketchType = DIR_TAN_LENGTH;
|
||||||
initSpinBox( Group2Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group2Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox( Group2Spin->SpinBox_DY, COORD_MIN, COORD_MAX, 5., 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group2Spin->SpinBox_DY, COORD_MIN, COORD_MAX, 5., "angle_precision" );
|
||||||
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;
|
||||||
@ -1601,13 +1604,31 @@ void EntityGUI_SketcherDlg::keyPressEvent( QKeyEvent* e )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=================================================================================
|
||||||
|
// function : initSpinBox()
|
||||||
|
// purpose :
|
||||||
|
//=================================================================================
|
||||||
void EntityGUI_SketcherDlg::initSpinBox( SalomeApp_DoubleSpinBox* spinBox,
|
void EntityGUI_SketcherDlg::initSpinBox( SalomeApp_DoubleSpinBox* spinBox,
|
||||||
double min, double max,
|
double min, double max,
|
||||||
double step, int decimals )
|
double step, const char* quantity )
|
||||||
{
|
{
|
||||||
spinBox->setDecimals( decimals );
|
// The same stuff as in GEOMBase_Skeleton::initSpinBox()!
|
||||||
|
// TODO: Think how to keep the single piece of code...
|
||||||
|
|
||||||
|
// Obtain precision from preferences
|
||||||
|
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
|
||||||
|
int aPrecision = resMgr->integerValue( "Geometry", quantity, 6 );
|
||||||
|
|
||||||
|
spinBox->setPrecision( aPrecision );
|
||||||
|
spinBox->setDecimals( aPrecision ); // it's necessary to set decimals before the range setting,
|
||||||
|
// by default Qt rounds boundaries to 2 decimals at setRange
|
||||||
spinBox->setRange( min, max );
|
spinBox->setRange( min, max );
|
||||||
spinBox->setSingleStep( step );
|
spinBox->setSingleStep( step );
|
||||||
|
|
||||||
|
// Add a hint for the user saying how to tune precision
|
||||||
|
QString userPropName = QObject::tr( QString( "PREF_%1" ).arg( quantity ).toLatin1().constData() );
|
||||||
|
spinBox->setProperty( "validity_tune_hint",
|
||||||
|
QVariant( QObject::tr( "PRECISION_HINT" ).arg( userPropName ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -1622,10 +1643,13 @@ void EntityGUI_SketcherDlg::SetDoubleSpinBoxStep( double step )
|
|||||||
Group3Spin->SpinBox_DX->setSingleStep(step);
|
Group3Spin->SpinBox_DX->setSingleStep(step);
|
||||||
Group3Spin->SpinBox_DY->setSingleStep(step);
|
Group3Spin->SpinBox_DY->setSingleStep(step);
|
||||||
Group3Spin->SpinBox_DZ->setSingleStep(step);
|
Group3Spin->SpinBox_DZ->setSingleStep(step);
|
||||||
Group4Spin->SpinBox_DX->setSingleStep(step);
|
|
||||||
Group4Spin->SpinBox_DY->setSingleStep(step);
|
|
||||||
Group4Spin->SpinBox_DZ->setSingleStep(step);
|
Group4Spin->SpinBox_DZ->setSingleStep(step);
|
||||||
Group4Spin->SpinBox_DS->setSingleStep(step);
|
|
||||||
|
// san: Do NOT override the step when a speicifc step value is used
|
||||||
|
// in some input fields!
|
||||||
|
//Group4Spin->SpinBox_DX->setSingleStep(step);
|
||||||
|
//Group4Spin->SpinBox_DY->setSingleStep(step);
|
||||||
|
//Group4Spin->SpinBox_DS->setSingleStep(step);
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -72,7 +72,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
void initSpinBox( SalomeApp_DoubleSpinBox*,
|
void initSpinBox( SalomeApp_DoubleSpinBox*,
|
||||||
double, double, double = 0.1,
|
double, double, double = 0.1,
|
||||||
int = 3 );
|
const char* quantity = "length_precision" );
|
||||||
|
|
||||||
// redefined from GEOMBase_Helper
|
// redefined from GEOMBase_Helper
|
||||||
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
||||||
|
@ -151,13 +151,22 @@ void GEOMBase_Skeleton::initSpinBox( QSpinBox* spinBox,
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void GEOMBase_Skeleton::initSpinBox( SalomeApp_DoubleSpinBox* spinBox,
|
void GEOMBase_Skeleton::initSpinBox( SalomeApp_DoubleSpinBox* spinBox,
|
||||||
double min, double max,
|
double min, double max,
|
||||||
double step, int decimals )
|
double step, const char* quantity )
|
||||||
{
|
{
|
||||||
spinBox->setPrecision( decimals );
|
// Obtain precision from preferences
|
||||||
spinBox->setDecimals( decimals ); // it's necessary to set decimals before the range setting,
|
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
|
||||||
|
int aPrecision = resMgr->integerValue( "Geometry", quantity, 6 );
|
||||||
|
|
||||||
|
spinBox->setPrecision( aPrecision );
|
||||||
|
spinBox->setDecimals( qAbs( aPrecision ) ); // it's necessary to set decimals before the range setting,
|
||||||
// by default Qt rounds boundaries to 2 decimals at setRange
|
// by default Qt rounds boundaries to 2 decimals at setRange
|
||||||
spinBox->setRange( min, max );
|
spinBox->setRange( min, max );
|
||||||
spinBox->setSingleStep( step );
|
spinBox->setSingleStep( step );
|
||||||
|
|
||||||
|
// 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 ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -60,7 +60,7 @@ private:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
void initSpinBox( QSpinBox*, int, int, int = 1 );
|
void initSpinBox( QSpinBox*, int, int, int = 1 );
|
||||||
void initSpinBox( SalomeApp_DoubleSpinBox*, double, double, double = 0.1, int = 3 );
|
void initSpinBox( SalomeApp_DoubleSpinBox*, double, double, double = 0.1, const char* = "length_precision" );
|
||||||
|
|
||||||
void updateAttributes( GEOM::GEOM_Object_ptr, const QStringList& );
|
void updateAttributes( GEOM::GEOM_Object_ptr, const QStringList& );
|
||||||
|
|
||||||
|
@ -2599,6 +2599,42 @@ Please, select face, shell or solid and try again</translation>
|
|||||||
<source>PREF_DEFLECTION</source>
|
<source>PREF_DEFLECTION</source>
|
||||||
<translation>Deflection coefficient</translation>
|
<translation>Deflection coefficient</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_PREF_def_precision</source>
|
||||||
|
<translation>Default precision</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_PREF_length_precision</source>
|
||||||
|
<translation>Length precision</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_PREF_angle_precision</source>
|
||||||
|
<translation>Angular precision</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_PREF_len_tol_precision</source>
|
||||||
|
<translation>Length tolerance precision</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_PREF_ang_tol_precision</source>
|
||||||
|
<translation>Angular tolerance precision</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_PREF_weight_precision</source>
|
||||||
|
<translation>Weight precision</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_PREF_density_precision</source>
|
||||||
|
<translation>Density precision</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_PREF_parametric_precision</source>
|
||||||
|
<translation>Parametric precision</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_PREF_param_tol_precision</source>
|
||||||
|
<translation>Parametric tolerance precision</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>PREF_DISPLAY_MODE</source>
|
<source>PREF_DISPLAY_MODE</source>
|
||||||
<translation>Default display mode</translation>
|
<translation>Default display mode</translation>
|
||||||
@ -2615,6 +2651,10 @@ Please, select face, shell or solid and try again</translation>
|
|||||||
<source>PREF_GROUP_OCCVIEWER</source>
|
<source>PREF_GROUP_OCCVIEWER</source>
|
||||||
<translation>OCC Viewer 3d</translation>
|
<translation>OCC Viewer 3d</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_PREF_GROUP_PRECISION</source>
|
||||||
|
<translation>Input fields precision</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>PREF_GROUP_VERTEX</source>
|
<source>PREF_GROUP_VERTEX</source>
|
||||||
<translation>Marker of Points</translation>
|
<translation>Marker of Points</translation>
|
||||||
@ -3988,6 +4028,12 @@ Otherwise the dimensions will be kept without modifications.</translation>
|
|||||||
<source>GEOM_ADVANCED</source>
|
<source>GEOM_ADVANCED</source>
|
||||||
<translation>Advanced shape: type %1</translation>
|
<translation>Advanced shape: type %1</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_PRECISION_HINT</source>
|
||||||
|
<translation>
|
||||||
|
Input value precision can be adjusted using
|
||||||
|
'%1' parameter in Geometry module preferences.</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>BasicGUI_CurveDlg</name>
|
<name>BasicGUI_CurveDlg</name>
|
||||||
|
@ -1405,6 +1405,36 @@ void GeometryGUI::createPreferences()
|
|||||||
|
|
||||||
int defl = addPreference( tr( "PREF_DEFLECTION" ), genGroup,
|
int defl = addPreference( tr( "PREF_DEFLECTION" ), genGroup,
|
||||||
LightApp_Preferences::DblSpin, "Geometry", "deflection_coeff" );
|
LightApp_Preferences::DblSpin, "Geometry", "deflection_coeff" );
|
||||||
|
|
||||||
|
// Quantities with individual precision settings
|
||||||
|
int precGroup = addPreference( tr( "GEOM_PREF_GROUP_PRECISION" ), tabId );
|
||||||
|
setPreferenceProperty( precGroup, "columns", 2 );
|
||||||
|
|
||||||
|
const int nbQuantities = 8;
|
||||||
|
int prec[nbQuantities], ii = 0;
|
||||||
|
prec[ii++] = addPreference( tr( "GEOM_PREF_length_precision" ), precGroup,
|
||||||
|
LightApp_Preferences::IntSpin, "Geometry", "length_precision" );
|
||||||
|
prec[ii++] = addPreference( tr( "GEOM_PREF_angle_precision" ), precGroup,
|
||||||
|
LightApp_Preferences::IntSpin, "Geometry", "angle_precision" );
|
||||||
|
prec[ii++] = addPreference( tr( "GEOM_PREF_len_tol_precision" ), precGroup,
|
||||||
|
LightApp_Preferences::IntSpin, "Geometry", "len_tol_precision" );
|
||||||
|
prec[ii++] = addPreference( tr( "GEOM_PREF_ang_tol_precision" ), precGroup,
|
||||||
|
LightApp_Preferences::IntSpin, "Geometry", "ang_tol_precision" );
|
||||||
|
prec[ii++] = addPreference( tr( "GEOM_PREF_weight_precision" ), precGroup,
|
||||||
|
LightApp_Preferences::IntSpin, "Geometry", "weight_precision" );
|
||||||
|
prec[ii++] = addPreference( tr( "GEOM_PREF_density_precision" ), precGroup,
|
||||||
|
LightApp_Preferences::IntSpin, "Geometry", "density_precision" );
|
||||||
|
prec[ii++] = addPreference( tr( "GEOM_PREF_parametric_precision" ), precGroup,
|
||||||
|
LightApp_Preferences::IntSpin, "Geometry", "parametric_precision" );
|
||||||
|
prec[ii ] = addPreference( tr( "GEOM_PREF_param_tol_precision" ), precGroup,
|
||||||
|
LightApp_Preferences::IntSpin, "Geometry", "param_tol_precision" );
|
||||||
|
|
||||||
|
// Set property for precision value for spinboxes
|
||||||
|
for ( ii = 0; ii < nbQuantities; ii++ ){
|
||||||
|
setPreferenceProperty( prec[ii], "min", -10 );
|
||||||
|
setPreferenceProperty( prec[ii], "max", 10 );
|
||||||
|
setPreferenceProperty( prec[ii], "precision", 2 );
|
||||||
|
}
|
||||||
|
|
||||||
int VertexGroup = addPreference( tr( "PREF_GROUP_VERTEX" ), tabId );
|
int VertexGroup = addPreference( tr( "PREF_GROUP_VERTEX" ), tabId );
|
||||||
setPreferenceProperty( VertexGroup, "columns", 2 );
|
setPreferenceProperty( VertexGroup, "columns", 2 );
|
||||||
@ -1457,9 +1487,9 @@ void GeometryGUI::createPreferences()
|
|||||||
QList<QVariant> aMarkerScaleIndicesList;
|
QList<QVariant> aMarkerScaleIndicesList;
|
||||||
QStringList aMarkerScaleValuesList;
|
QStringList aMarkerScaleValuesList;
|
||||||
|
|
||||||
for ( int i = GEOM::MS_10; i <= GEOM::MS_70; i++ ) {
|
for ( int iii = GEOM::MS_10; iii <= GEOM::MS_70; iii++ ) {
|
||||||
aMarkerScaleIndicesList << i;
|
aMarkerScaleIndicesList << iii;
|
||||||
aMarkerScaleValuesList << QString::number( (i-(int)GEOM::MS_10)*0.5 + 1.0 );
|
aMarkerScaleValuesList << QString::number( (iii-(int)GEOM::MS_10)*0.5 + 1.0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
setPreferenceProperty( markerScale, "strings", aMarkerScaleValuesList );
|
setPreferenceProperty( markerScale, "strings", aMarkerScaleValuesList );
|
||||||
|
@ -72,13 +72,13 @@ GEOMToolsGUI_DeflectionDlg::GEOMToolsGUI_DeflectionDlg (QWidget* parent)
|
|||||||
GroupC1Layout->addWidget(TextLabel1, 0, 0);
|
GroupC1Layout->addWidget(TextLabel1, 0, 0);
|
||||||
|
|
||||||
SpinBox = new QtxDoubleSpinBox (GroupC1);
|
SpinBox = new QtxDoubleSpinBox (GroupC1);
|
||||||
SpinBox->setPrecision( 6 );
|
// Obtain precision from preferences
|
||||||
SpinBox->setDecimals( 6 );
|
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
|
||||||
|
int aPrecision = resMgr->integerValue( "Geometry", "parametric_precision", 6 );
|
||||||
|
SpinBox->setPrecision( aPrecision );
|
||||||
|
SpinBox->setDecimals( aPrecision );
|
||||||
SpinBox->setRange( DEFLECTION_MIN, 1.0 );
|
SpinBox->setRange( DEFLECTION_MIN, 1.0 );
|
||||||
SpinBox->setSingleStep( 1.0e-04 );
|
SpinBox->setSingleStep( 1.0e-04 );
|
||||||
//SpinBox->setMinimum(1.0e-07);
|
|
||||||
//SpinBox->setMaximum(1.0);
|
|
||||||
//SpinBox->setStep(1.0e-04);
|
|
||||||
SpinBox->setObjectName("SpinBoxU");
|
SpinBox->setObjectName("SpinBoxU");
|
||||||
SpinBox->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
|
SpinBox->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
|
||||||
SpinBox->setValue(1.0e-04);
|
SpinBox->setValue(1.0e-04);
|
||||||
|
@ -115,14 +115,14 @@ void GenerationGUI_FillingDlg::Init()
|
|||||||
|
|
||||||
globalSelection( GEOM_COMPOUND );
|
globalSelection( GEOM_COMPOUND );
|
||||||
|
|
||||||
double SpecificStep1 = 1;
|
int SpecificStep1 = 1;
|
||||||
double SpecificStep2 = 0.0001;
|
double SpecificStep2 = 0.0001;
|
||||||
/* min, max, step and decimals for spin boxes & initial values */
|
/* min, max, step and decimals for spin boxes & initial values */
|
||||||
initSpinBox( GroupPoints->SpinBox1, 2.0, MAX_NUMBER, SpecificStep1, 3 );
|
initSpinBox( GroupPoints->SpinBox1, 2, MAX_NUMBER, SpecificStep1 );
|
||||||
initSpinBox( GroupPoints->SpinBox2, 0.00001, 10000.0, SpecificStep2, 5 );
|
initSpinBox( GroupPoints->SpinBox2, 0.00001, 10000.0, SpecificStep2, "len_tol_precision" );
|
||||||
initSpinBox( GroupPoints->SpinBox3, 0.0, MAX_NUMBER, SpecificStep1, 3 );
|
initSpinBox( GroupPoints->SpinBox3, 0, MAX_NUMBER, SpecificStep1 );
|
||||||
initSpinBox( GroupPoints->SpinBox4, 1.0, MAX_NUMBER, SpecificStep1, 3 );
|
initSpinBox( GroupPoints->SpinBox4, 1, MAX_NUMBER, SpecificStep1 );
|
||||||
initSpinBox( GroupPoints->SpinBox5, 0.00001, 10000.0, SpecificStep2, 5 );
|
initSpinBox( GroupPoints->SpinBox5, 0.00001, 10000.0, SpecificStep2, "len_tol_precision" );
|
||||||
|
|
||||||
GroupPoints->SpinBox1->setValue( myMinDeg );
|
GroupPoints->SpinBox1->setValue( myMinDeg );
|
||||||
GroupPoints->SpinBox2->setValue( myTol2D );
|
GroupPoints->SpinBox2->setValue( myTol2D );
|
||||||
@ -152,7 +152,8 @@ void GenerationGUI_FillingDlg::Init()
|
|||||||
connect( GroupPoints->CheckBox1, SIGNAL( stateChanged( int ) ),
|
connect( GroupPoints->CheckBox1, SIGNAL( stateChanged( int ) ),
|
||||||
this, SLOT( ApproxChanged() ) );
|
this, SLOT( ApproxChanged() ) );
|
||||||
|
|
||||||
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) );
|
// san: Commented, as all spin boxes here either are integer or use specific non-default step value
|
||||||
|
//connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) );
|
||||||
|
|
||||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
@ -167,10 +168,7 @@ void GenerationGUI_FillingDlg::Init()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void GenerationGUI_FillingDlg::SetDoubleSpinBoxStep( double step )
|
void GenerationGUI_FillingDlg::SetDoubleSpinBoxStep( double step )
|
||||||
{
|
{
|
||||||
GroupPoints->SpinBox1->setSingleStep(step);
|
|
||||||
GroupPoints->SpinBox2->setSingleStep(step);
|
GroupPoints->SpinBox2->setSingleStep(step);
|
||||||
GroupPoints->SpinBox3->setSingleStep(step);
|
|
||||||
GroupPoints->SpinBox4->setSingleStep(step);
|
|
||||||
GroupPoints->SpinBox5->setSingleStep(step);
|
GroupPoints->SpinBox5->setSingleStep(step);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,14 +139,14 @@ void GenerationGUI_PrismDlg::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
|
||||||
initSpinBox(GroupPoints3->SpinBox_DX, COORD_MIN, COORD_MAX, step, 6); // VSR:TODO : DBL_DIGITS_DISPLAY
|
initSpinBox(GroupPoints3->SpinBox_DX, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox(GroupPoints3->SpinBox_DY, COORD_MIN, COORD_MAX, step, 6); // VSR:TODO : DBL_DIGITS_DISPLAY
|
initSpinBox(GroupPoints3->SpinBox_DY, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox(GroupPoints3->SpinBox_DZ, COORD_MIN, COORD_MAX, step, 6); // VSR:TODO : DBL_DIGITS_DISPLAY
|
initSpinBox(GroupPoints3->SpinBox_DZ, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
GroupPoints3->SpinBox_DX->setValue(0.0);
|
GroupPoints3->SpinBox_DX->setValue(0.0);
|
||||||
GroupPoints3->SpinBox_DY->setValue(0.0);
|
GroupPoints3->SpinBox_DY->setValue(0.0);
|
||||||
GroupPoints3->SpinBox_DZ->setValue(0.0);
|
GroupPoints3->SpinBox_DZ->setValue(0.0);
|
||||||
|
|
||||||
initSpinBox(GroupPoints->SpinBox_DX, COORD_MIN, COORD_MAX, step, 6); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(GroupPoints->SpinBox_DX, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
GroupPoints->SpinBox_DX->setValue(100.0);
|
GroupPoints->SpinBox_DX->setValue(100.0);
|
||||||
|
|
||||||
// init variables
|
// init variables
|
||||||
|
@ -109,7 +109,7 @@ void GenerationGUI_RevolDlg::Init()
|
|||||||
{
|
{
|
||||||
// min, max, step and decimals for spin boxes & initial values
|
// min, max, step and decimals for spin boxes & initial values
|
||||||
double SpecificStep = 5;
|
double SpecificStep = 5;
|
||||||
initSpinBox(GroupPoints->SpinBox_DX, -360.0, 360.0, SpecificStep, 3); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(GroupPoints->SpinBox_DX, -360.0, 360.0, SpecificStep, "angle_precision" );
|
||||||
GroupPoints->SpinBox_DX->setValue(45.0);
|
GroupPoints->SpinBox_DX->setValue(45.0);
|
||||||
|
|
||||||
// init variables
|
// init variables
|
||||||
@ -135,7 +135,8 @@ void GenerationGUI_RevolDlg::Init()
|
|||||||
connect(GroupPoints->CheckButton1, SIGNAL(toggled(bool)), this, SLOT(onBothway()));
|
connect(GroupPoints->CheckButton1, SIGNAL(toggled(bool)), this, SLOT(onBothway()));
|
||||||
connect(GroupPoints->CheckButton2, SIGNAL(toggled(bool)), this, SLOT(onReverse()));
|
connect(GroupPoints->CheckButton2, SIGNAL(toggled(bool)), this, SLOT(onReverse()));
|
||||||
|
|
||||||
connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), this, SLOT(SetDoubleSpinBoxStep(double)));
|
// san: We don't need this, as the default step value is not used in this dialog box
|
||||||
|
//connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), this, SLOT(SetDoubleSpinBoxStep(double)));
|
||||||
|
|
||||||
initName(tr("GEOM_REVOLUTION"));
|
initName(tr("GEOM_REVOLUTION"));
|
||||||
resize(100,100);
|
resize(100,100);
|
||||||
|
@ -106,9 +106,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 */
|
||||||
initSpinBox( GroupPoints->SpinBox_DX, 0.001, COORD_MAX, myStep, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( GroupPoints->SpinBox_DX, 0.001, COORD_MAX, myStep, "weight_precision" );
|
||||||
initSpinBox( GroupPoints->SpinBox_DY, 0.001, COORD_MAX, SpecificStep1, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( GroupPoints->SpinBox_DY, 0.001, COORD_MAX, SpecificStep1, "density_precision" );
|
||||||
initSpinBox( GroupPoints->SpinBox_DZ, 0.001, COORD_MAX, SpecificStep2, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( GroupPoints->SpinBox_DZ, 0.001, COORD_MAX, SpecificStep2, "parametric_precision" );
|
||||||
|
|
||||||
GroupPoints->SpinBox_DX->setValue( 100.0 );
|
GroupPoints->SpinBox_DX->setValue( 100.0 );
|
||||||
GroupPoints->SpinBox_DY->setValue( 1.0 );
|
GroupPoints->SpinBox_DY->setValue( 1.0 );
|
||||||
@ -141,8 +141,10 @@ void OperationGUI_ArchimedeDlg::Init()
|
|||||||
void OperationGUI_ArchimedeDlg::SetDoubleSpinBoxStep( double step )
|
void OperationGUI_ArchimedeDlg::SetDoubleSpinBoxStep( double step )
|
||||||
{
|
{
|
||||||
GroupPoints->SpinBox_DX->setSingleStep(step);
|
GroupPoints->SpinBox_DX->setSingleStep(step);
|
||||||
GroupPoints->SpinBox_DY->setSingleStep(step);
|
|
||||||
GroupPoints->SpinBox_DZ->setSingleStep(step);
|
// san: Commented so as not to override specific step settings
|
||||||
|
//GroupPoints->SpinBox_DY->setSingleStep(step);
|
||||||
|
//GroupPoints->SpinBox_DZ->setSingleStep(step);
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -149,9 +149,9 @@ OperationGUI_ChamferDlg::OperationGUI_ChamferDlg (GeometryGUI* theGeometryGUI, Q
|
|||||||
QMap< int, SalomeApp_DoubleSpinBox* >::iterator anIter;
|
QMap< int, SalomeApp_DoubleSpinBox* >::iterator anIter;
|
||||||
for (anIter = mySpinBox.begin(); anIter != mySpinBox.end(); ++anIter) {
|
for (anIter = mySpinBox.begin(); anIter != mySpinBox.end(); ++anIter) {
|
||||||
if (anIter.key() == SpinBox44 || anIter.key() == SpinBox34 || anIter.key() == SpinBox24)
|
if (anIter.key() == SpinBox44 || anIter.key() == SpinBox34 || anIter.key() == SpinBox24)
|
||||||
initSpinBox(anIter.value(), 0.001, 89.999, 5, 0);
|
initSpinBox(anIter.value(), 0.001, 89.999, 5, "angle_precision" );
|
||||||
else
|
else
|
||||||
initSpinBox(anIter.value(), 0.001, COORD_MAX, SpecificStep, 3);
|
initSpinBox(anIter.value(), 0.001, COORD_MAX, SpecificStep, "length_precision" );
|
||||||
}
|
}
|
||||||
|
|
||||||
setHelpFileName("chamfer_operation_page.html");
|
setHelpFileName("chamfer_operation_page.html");
|
||||||
|
@ -74,13 +74,15 @@ OperationGUI_ClippingDlg::OperationGUI_ClippingDlg( GeometryGUI* theGeometryGUI,
|
|||||||
TextLabelNear = new QLabel( tr( "Near" ), GroupArguments );
|
TextLabelNear = new QLabel( tr( "Near" ), GroupArguments );
|
||||||
GroupArgumentsLayout->addWidget( TextLabelNear, 0, 0 );
|
GroupArgumentsLayout->addWidget( TextLabelNear, 0, 0 );
|
||||||
|
|
||||||
SpinBox_Near = new SalomeApp_DoubleSpinBox( COORD_MIN, COORD_MAX, 10.0, 3, 10, GroupArguments );
|
SpinBox_Near = new SalomeApp_DoubleSpinBox( GroupArguments );
|
||||||
|
initSpinBox( SpinBox_Near, COORD_MIN, COORD_MAX, 10.0, "length_precision" );
|
||||||
GroupArgumentsLayout->addWidget( SpinBox_Near, 0, 1 );
|
GroupArgumentsLayout->addWidget( SpinBox_Near, 0, 1 );
|
||||||
|
|
||||||
TextLabelFar = new QLabel( tr( "Far" ), GroupArguments );
|
TextLabelFar = new QLabel( tr( "Far" ), GroupArguments );
|
||||||
GroupArgumentsLayout->addWidget( TextLabelFar, 0, 2 );
|
GroupArgumentsLayout->addWidget( TextLabelFar, 0, 2 );
|
||||||
|
|
||||||
SpinBox_Far = new SalomeApp_DoubleSpinBox( COORD_MIN, COORD_MAX, 10.0, 3, 10, GroupArguments );
|
SpinBox_Far = new SalomeApp_DoubleSpinBox( GroupArguments );
|
||||||
|
initSpinBox( SpinBox_Far, COORD_MIN, COORD_MAX, 10.0, "length_precision" );
|
||||||
GroupArgumentsLayout->addWidget( SpinBox_Far, 0, 3 );
|
GroupArgumentsLayout->addWidget( SpinBox_Far, 0, 3 );
|
||||||
|
|
||||||
resetButton = new QPushButton( tr( "Reset" ), GroupArguments );
|
resetButton = new QPushButton( tr( "Reset" ), GroupArguments );
|
||||||
|
@ -88,7 +88,7 @@ OperationGUI_Fillet1d2dDlg::OperationGUI_Fillet1d2dDlg (GeometryGUI* theGeometry
|
|||||||
|
|
||||||
// Set range of spinboxes
|
// Set range of spinboxes
|
||||||
double SpecificStep = 10.0;
|
double SpecificStep = 10.0;
|
||||||
initSpinBox(GroupVertexes->SpinBox_DX, 0.00001, COORD_MAX, SpecificStep, 5); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(GroupVertexes->SpinBox_DX, 0.00001, COORD_MAX, SpecificStep, "length_precision" );
|
||||||
|
|
||||||
setHelpFileName(myIs1D ? "fillet1d_operation_page.html" : "fillet2d_operation_page.html");
|
setHelpFileName(myIs1D ? "fillet1d_operation_page.html" : "fillet2d_operation_page.html");
|
||||||
|
|
||||||
|
@ -110,13 +110,13 @@ OperationGUI_FilletDlg::OperationGUI_FilletDlg (GeometryGUI* theGeometryGUI, QWi
|
|||||||
|
|
||||||
// Set range of spinboxes
|
// Set range of spinboxes
|
||||||
double SpecificStep = 10.0;
|
double SpecificStep = 10.0;
|
||||||
initSpinBox(Group1->SpinBox_DX, 0.001, COORD_MAX, SpecificStep, 3); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(Group1->SpinBox_DX, 0.001, COORD_MAX, SpecificStep, "length_precision" );
|
||||||
initSpinBox(Group2->SpinBox_DX, 0.001, COORD_MAX, SpecificStep, 3); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(Group2->SpinBox_DX, 0.001, COORD_MAX, SpecificStep, "length_precision" );
|
||||||
initSpinBox(Group2->SpinBox_DY, 0.001, COORD_MAX, SpecificStep, 3); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(Group2->SpinBox_DY, 0.001, COORD_MAX, SpecificStep, "length_precision" );
|
||||||
initSpinBox(Group2->SpinBox_DZ, 0.001, COORD_MAX, SpecificStep, 3); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(Group2->SpinBox_DZ, 0.001, COORD_MAX, SpecificStep, "length_precision" );
|
||||||
initSpinBox(Group3->SpinBox_DX, 0.001, COORD_MAX, SpecificStep, 3); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(Group3->SpinBox_DX, 0.001, COORD_MAX, SpecificStep, "length_precision" );
|
||||||
initSpinBox(Group3->SpinBox_DY, 0.001, COORD_MAX, SpecificStep, 3); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(Group3->SpinBox_DY, 0.001, COORD_MAX, SpecificStep, "length_precision" );
|
||||||
initSpinBox(Group3->SpinBox_DZ, 0.001, COORD_MAX, SpecificStep, 3); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(Group3->SpinBox_DZ, 0.001, COORD_MAX, SpecificStep, "length_precision" );
|
||||||
|
|
||||||
setHelpFileName("fillet_operation_page.html");
|
setHelpFileName("fillet_operation_page.html");
|
||||||
|
|
||||||
|
@ -113,9 +113,9 @@ void PrimitiveGUI_BoxDlg::Init()
|
|||||||
double step = resMgr->doubleValue("Geometry", "SettingsGeomStep", 100);
|
double step = resMgr->doubleValue("Geometry", "SettingsGeomStep", 100);
|
||||||
|
|
||||||
// min, max, step and decimals for spin boxes
|
// min, max, step and decimals for spin boxes
|
||||||
initSpinBox(GroupDimensions->SpinBox_DX, 0.000001, COORD_MAX, step, 6); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(GroupDimensions->SpinBox_DX, 0.000001, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox(GroupDimensions->SpinBox_DY, 0.000001, COORD_MAX, step, 6); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(GroupDimensions->SpinBox_DY, 0.000001, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox(GroupDimensions->SpinBox_DZ, 0.000001, COORD_MAX, step, 6); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(GroupDimensions->SpinBox_DZ, 0.000001, COORD_MAX, step, "length_precision" );
|
||||||
|
|
||||||
// init variables
|
// init variables
|
||||||
GroupPoints->LineEdit1->setReadOnly(true);
|
GroupPoints->LineEdit1->setReadOnly(true);
|
||||||
|
@ -116,12 +116,12 @@ void PrimitiveGUI_ConeDlg::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
|
||||||
initSpinBox(GroupPoints->SpinBox_DX, 0.0, COORD_MAX, step, 5); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(GroupPoints->SpinBox_DX, 0.0, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox(GroupPoints->SpinBox_DY, 0.0, COORD_MAX, step, 5); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(GroupPoints->SpinBox_DY, 0.0, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox(GroupPoints->SpinBox_DZ, 0.00001, COORD_MAX, step, 5); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(GroupPoints->SpinBox_DZ, 0.00001, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox(GroupDimensions->SpinBox_DX, 0.0, COORD_MAX, step, 5); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(GroupDimensions->SpinBox_DX, 0.0, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox(GroupDimensions->SpinBox_DY, 0.0, COORD_MAX, step, 5); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(GroupDimensions->SpinBox_DY, 0.0, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox(GroupDimensions->SpinBox_DZ, 0.00001, COORD_MAX, step, 5); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(GroupDimensions->SpinBox_DZ, 0.00001, COORD_MAX, step, "length_precision" );
|
||||||
|
|
||||||
// init variables
|
// init variables
|
||||||
GroupPoints->LineEdit1->setReadOnly(true);
|
GroupPoints->LineEdit1->setReadOnly(true);
|
||||||
|
@ -114,10 +114,10 @@ void PrimitiveGUI_CylinderDlg::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
|
||||||
initSpinBox(GroupPoints->SpinBox_DX, 0.00001, COORD_MAX, step, 5); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(GroupPoints->SpinBox_DX, 0.00001, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox(GroupPoints->SpinBox_DY, 0.00001, COORD_MAX, step, 5); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(GroupPoints->SpinBox_DY, 0.00001, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox(GroupDimensions->SpinBox_DX, 0.00001, COORD_MAX, step, 5); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(GroupDimensions->SpinBox_DX, 0.00001, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox(GroupDimensions->SpinBox_DY, 0.00001, COORD_MAX, step, 5); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(GroupDimensions->SpinBox_DY, 0.00001, COORD_MAX, step, "length_precision" );
|
||||||
|
|
||||||
// init variables
|
// init variables
|
||||||
myEditCurrentArgument = GroupPoints->LineEdit1;
|
myEditCurrentArgument = GroupPoints->LineEdit1;
|
||||||
|
@ -132,8 +132,8 @@ void PrimitiveGUI_DiskDlg::Init()
|
|||||||
double aStep = resMgr->doubleValue("Geometry", "SettingsGeomStep", 100);
|
double aStep = 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
|
||||||
initSpinBox(GroupPntVecR->SpinBox_DX, 0.00001, COORD_MAX, aStep, 5); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(GroupPntVecR->SpinBox_DX, 0.00001, COORD_MAX, aStep, "length_precision" );
|
||||||
initSpinBox(GroupDimensions->SpinBox_DX, 0.00001, COORD_MAX, aStep, 5); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(GroupDimensions->SpinBox_DX, 0.00001, COORD_MAX, aStep, "length_precision" );
|
||||||
|
|
||||||
// init variables
|
// init variables
|
||||||
myEditCurrentArgument = GroupPntVecR->LineEdit1;
|
myEditCurrentArgument = GroupPntVecR->LineEdit1;
|
||||||
|
@ -139,14 +139,14 @@ void PrimitiveGUI_FaceDlg::Init()
|
|||||||
|
|
||||||
double aDefaultSize = 100.0;
|
double aDefaultSize = 100.0;
|
||||||
/* min, max, step and decimals for spin boxes */
|
/* min, max, step and decimals for spin boxes */
|
||||||
initSpinBox( GroupPlane->SpinBox_DX, 0.00001, COORD_MAX, aStep, 5 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( GroupPlane->SpinBox_DX, 0.00001, COORD_MAX, aStep, "length_precision" );
|
||||||
GroupPlane->SpinBox_DX->setValue( aDefaultSize );
|
GroupPlane->SpinBox_DX->setValue( aDefaultSize );
|
||||||
initSpinBox( GroupPlane->SpinBox_DY, 0.00001, COORD_MAX, aStep, 5 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( GroupPlane->SpinBox_DY, 0.00001, COORD_MAX, aStep, "length_precision" );
|
||||||
GroupPlane->SpinBox_DY->setValue( aDefaultSize );
|
GroupPlane->SpinBox_DY->setValue( aDefaultSize );
|
||||||
|
|
||||||
initSpinBox( GroupDimensions->SpinBox_DX, 0.00001, COORD_MAX, aStep, 5 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( GroupDimensions->SpinBox_DX, 0.00001, COORD_MAX, aStep, "length_precision" );
|
||||||
GroupDimensions->SpinBox_DX->setValue( aDefaultSize );
|
GroupDimensions->SpinBox_DX->setValue( aDefaultSize );
|
||||||
initSpinBox( GroupDimensions->SpinBox_DY, 0.00001, COORD_MAX, aStep, 5 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( GroupDimensions->SpinBox_DY, 0.00001, COORD_MAX, aStep, "length_precision" );
|
||||||
GroupDimensions->SpinBox_DY->setValue( aDefaultSize );
|
GroupDimensions->SpinBox_DY->setValue( aDefaultSize );
|
||||||
|
|
||||||
|
|
||||||
@ -191,6 +191,8 @@ void PrimitiveGUI_FaceDlg::SetDoubleSpinBoxStep( double step )
|
|||||||
{
|
{
|
||||||
GroupPlane->SpinBox_DX->setSingleStep(step);
|
GroupPlane->SpinBox_DX->setSingleStep(step);
|
||||||
GroupPlane->SpinBox_DY->setSingleStep(step);
|
GroupPlane->SpinBox_DY->setSingleStep(step);
|
||||||
|
GroupDimensions->SpinBox_DX->setSingleStep(step);
|
||||||
|
GroupDimensions->SpinBox_DY->setSingleStep(step);
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -115,8 +115,8 @@ void PrimitiveGUI_SphereDlg::Init()
|
|||||||
double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100 );
|
double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100 );
|
||||||
|
|
||||||
/* min, max, step and decimals for spin boxes */
|
/* min, max, step and decimals for spin boxes */
|
||||||
initSpinBox( GroupPoints->SpinBox_DX, 0.000001, COORD_MAX, step, 6 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( GroupPoints->SpinBox_DX, 0.000001, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox( GroupDimensions->SpinBox_DX, 0.000001, COORD_MAX, step, 6 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( GroupDimensions->SpinBox_DX, 0.000001, COORD_MAX, step, "length_precision" );
|
||||||
GroupPoints->SpinBox_DX->setValue( 100.0 );
|
GroupPoints->SpinBox_DX->setValue( 100.0 );
|
||||||
GroupDimensions->SpinBox_DX->setValue( 100.0 );
|
GroupDimensions->SpinBox_DX->setValue( 100.0 );
|
||||||
|
|
||||||
|
@ -115,10 +115,10 @@ void PrimitiveGUI_TorusDlg::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
|
||||||
initSpinBox(GroupPoints->SpinBox_DX, 0.000001, COORD_MAX, step, 6); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(GroupPoints->SpinBox_DX, 0.000001, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox(GroupPoints->SpinBox_DY, 0.000001, COORD_MAX, step, 6); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(GroupPoints->SpinBox_DY, 0.000001, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox(GroupDimensions->SpinBox_DX, 0.000001, COORD_MAX, step, 6); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(GroupDimensions->SpinBox_DX, 0.000001, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox(GroupDimensions->SpinBox_DY, 0.000001, COORD_MAX, step, 6); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(GroupDimensions->SpinBox_DY, 0.000001, COORD_MAX, step, "length_precision" );
|
||||||
|
|
||||||
// init variables
|
// init variables
|
||||||
GroupPoints->LineEdit1->setReadOnly(true);
|
GroupPoints->LineEdit1->setReadOnly(true);
|
||||||
|
@ -86,7 +86,8 @@ RepairGUI_DivideEdgeDlg::RepairGUI_DivideEdgeDlg( GeometryGUI* theGeometryGUI, Q
|
|||||||
myIsParameterGr->addButton( rb2, 1 );
|
myIsParameterGr->addButton( rb2, 1 );
|
||||||
rb1->setChecked( true );
|
rb1->setChecked( true );
|
||||||
|
|
||||||
myValEdt = new SalomeApp_DoubleSpinBox( 0., 1., 0.1, 3, 32, GroupPoints->Box );
|
myValEdt = new SalomeApp_DoubleSpinBox( GroupPoints->Box );
|
||||||
|
initSpinBox( myValEdt, 0., 1., 0.1, "parametric_precision" );
|
||||||
myValEdt->setValue( 0.5 );
|
myValEdt->setValue( 0.5 );
|
||||||
QLabel* aLbl1 = new QLabel( tr( "GEOM_VALUE" ), GroupPoints->Box );
|
QLabel* aLbl1 = new QLabel( tr( "GEOM_VALUE" ), GroupPoints->Box );
|
||||||
|
|
||||||
|
@ -82,7 +82,8 @@ RepairGUI_GlueDlg::RepairGUI_GlueDlg( GeometryGUI* theGeometryGUI, QWidget* pare
|
|||||||
GroupPoints->LineEdit1->setReadOnly( true );
|
GroupPoints->LineEdit1->setReadOnly( true );
|
||||||
|
|
||||||
QLabel* aTolLab = new QLabel( tr( "GEOM_TOLERANCE" ), GroupPoints->Box );
|
QLabel* aTolLab = new QLabel( tr( "GEOM_TOLERANCE" ), GroupPoints->Box );
|
||||||
myTolEdt = new SalomeApp_DoubleSpinBox( 0.0, 100.0, DEFAULT_TOLERANCE_VALUE, 7, 7, GroupPoints->Box );
|
myTolEdt = new SalomeApp_DoubleSpinBox( GroupPoints->Box );
|
||||||
|
initSpinBox( myTolEdt, 0., 100., DEFAULT_TOLERANCE_VALUE, "len_tol_precision" );
|
||||||
myTolEdt->setValue( DEFAULT_TOLERANCE_VALUE );
|
myTolEdt->setValue( DEFAULT_TOLERANCE_VALUE );
|
||||||
|
|
||||||
QGridLayout* boxLayout = new QGridLayout( GroupPoints->Box );
|
QGridLayout* boxLayout = new QGridLayout( GroupPoints->Box );
|
||||||
@ -99,7 +100,7 @@ RepairGUI_GlueDlg::RepairGUI_GlueDlg( GeometryGUI* theGeometryGUI, QWidget* pare
|
|||||||
|
|
||||||
QLabel* aTolLab2 = new QLabel( tr( "GEOM_TOLERANCE" ), GroupPoints2->Box );
|
QLabel* aTolLab2 = new QLabel( tr( "GEOM_TOLERANCE" ), GroupPoints2->Box );
|
||||||
myTolEdt2 = new SalomeApp_DoubleSpinBox( GroupPoints2->Box );
|
myTolEdt2 = new SalomeApp_DoubleSpinBox( GroupPoints2->Box );
|
||||||
initSpinBox( myTolEdt2, 0, 100, 1e-7, 7 );
|
initSpinBox( myTolEdt2, 0., 100., DEFAULT_TOLERANCE_VALUE, "len_tol_precision" );
|
||||||
myTolEdt2->setValue( DEFAULT_TOLERANCE_VALUE );
|
myTolEdt2->setValue( DEFAULT_TOLERANCE_VALUE );
|
||||||
|
|
||||||
myDetectBtn = new QPushButton( tr( "GEOM_DETECT" ) + QString( " [%1]" ).arg( tr( "GLUE_FACES" ) ),
|
myDetectBtn = new QPushButton( tr( "GEOM_DETECT" ) + QString( " [%1]" ).arg( tr( "GLUE_FACES" ) ),
|
||||||
|
@ -75,7 +75,8 @@ RepairGUI_SewingDlg::RepairGUI_SewingDlg( GeometryGUI* theGeometryGUI, QWidget*
|
|||||||
|
|
||||||
QGridLayout* aLay = new QGridLayout( GroupPoints->Box );
|
QGridLayout* aLay = new QGridLayout( GroupPoints->Box );
|
||||||
aLay->setMargin( 0 ); aLay->setSpacing( 6 );
|
aLay->setMargin( 0 ); aLay->setSpacing( 6 );
|
||||||
myTolEdt = new SalomeApp_DoubleSpinBox( 0.0, 100.0, DEFAULT_TOLERANCE_VALUE, 7, 10, GroupPoints->Box );
|
myTolEdt = new SalomeApp_DoubleSpinBox( GroupPoints->Box );
|
||||||
|
initSpinBox( myTolEdt, 0.0, 100.0, DEFAULT_TOLERANCE_VALUE, "len_tol_precision" );
|
||||||
myTolEdt->setValue( DEFAULT_TOLERANCE_VALUE );
|
myTolEdt->setValue( DEFAULT_TOLERANCE_VALUE );
|
||||||
QLabel* aLbl1 = new QLabel( tr( "GEOM_TOLERANCE" ), GroupPoints->Box );
|
QLabel* aLbl1 = new QLabel( tr( "GEOM_TOLERANCE" ), GroupPoints->Box );
|
||||||
myFreeBoundBtn = new QPushButton( tr( "GEOM_DETECT" ) + QString( " [%1]" ).arg( tr( "GEOM_FREE_BOUNDARIES" ) ),
|
myFreeBoundBtn = new QPushButton( tr( "GEOM_DETECT" ) + QString( " [%1]" ).arg( tr( "GEOM_FREE_BOUNDARIES" ) ),
|
||||||
|
@ -126,8 +126,10 @@ void RepairGUI_ShapeProcessDlg::init()
|
|||||||
QGridLayout* aLay = new QGridLayout( w );
|
QGridLayout* aLay = new QGridLayout( w );
|
||||||
aLay->setMargin( 9 ); aLay->setSpacing( 6 );
|
aLay->setMargin( 9 ); aLay->setSpacing( 6 );
|
||||||
|
|
||||||
myFixShapeTol3D = new SalomeApp_DoubleSpinBox( 0., 100., 1e-7, 10, 10, w );
|
myFixShapeTol3D = new SalomeApp_DoubleSpinBox( w );
|
||||||
myFixShapeMaxTol3D = new SalomeApp_DoubleSpinBox( 0., 100., 1e-7, 10, 10, w );
|
initSpinBox( myFixShapeTol3D, 0., 100., 1e-7, "len_tol_precision" );
|
||||||
|
myFixShapeMaxTol3D = new SalomeApp_DoubleSpinBox( w );
|
||||||
|
initSpinBox( myFixShapeMaxTol3D, 0., 100., 1e-7, "len_tol_precision" );
|
||||||
|
|
||||||
aLay->addWidget( new QLabel( tr( "GEOM_3D_TOLERANCE" ), w ), 0, 0 );
|
aLay->addWidget( new QLabel( tr( "GEOM_3D_TOLERANCE" ), w ), 0, 0 );
|
||||||
aLay->addWidget( myFixShapeTol3D, 0, 1 );
|
aLay->addWidget( myFixShapeTol3D, 0, 1 );
|
||||||
@ -141,7 +143,8 @@ void RepairGUI_ShapeProcessDlg::init()
|
|||||||
QGridLayout* aLay = new QGridLayout( w );
|
QGridLayout* aLay = new QGridLayout( w );
|
||||||
aLay->setMargin( 9 ); aLay->setSpacing( 6 );
|
aLay->setMargin( 9 ); aLay->setSpacing( 6 );
|
||||||
|
|
||||||
myFixFaceSizeTol = new SalomeApp_DoubleSpinBox( 0., 100., 1e-7, 10, 10, w );
|
myFixFaceSizeTol = new SalomeApp_DoubleSpinBox( w );
|
||||||
|
initSpinBox( myFixFaceSizeTol, 0., 100., 1e-7, "len_tol_precision" );
|
||||||
|
|
||||||
aLay->addWidget( new QLabel( tr( "GEOM_TOLERANCE" ), w ), 0, 0 );
|
aLay->addWidget( new QLabel( tr( "GEOM_TOLERANCE" ), w ), 0, 0 );
|
||||||
aLay->addWidget( myFixFaceSizeTol, 0, 1 );
|
aLay->addWidget( myFixFaceSizeTol, 0, 1 );
|
||||||
@ -153,7 +156,8 @@ void RepairGUI_ShapeProcessDlg::init()
|
|||||||
QGridLayout* aLay = new QGridLayout( w );
|
QGridLayout* aLay = new QGridLayout( w );
|
||||||
aLay->setMargin( 9 ); aLay->setSpacing( 6 );
|
aLay->setMargin( 9 ); aLay->setSpacing( 6 );
|
||||||
|
|
||||||
myDropSmallEdgesTol3D = new SalomeApp_DoubleSpinBox( 0., 100., 1e-7, 10, 10, w );
|
myDropSmallEdgesTol3D = new SalomeApp_DoubleSpinBox( w );
|
||||||
|
initSpinBox( myDropSmallEdgesTol3D, 0., 100., 1e-7, "len_tol_precision" );
|
||||||
|
|
||||||
aLay->addWidget( new QLabel( tr( "GEOM_3D_TOLERANCE" ), w ), 0, 0 );
|
aLay->addWidget( new QLabel( tr( "GEOM_3D_TOLERANCE" ), w ), 0, 0 );
|
||||||
aLay->addWidget( myDropSmallEdgesTol3D, 0, 1 );
|
aLay->addWidget( myDropSmallEdgesTol3D, 0, 1 );
|
||||||
@ -165,8 +169,10 @@ void RepairGUI_ShapeProcessDlg::init()
|
|||||||
QGridLayout* aLay = new QGridLayout( w );
|
QGridLayout* aLay = new QGridLayout( w );
|
||||||
aLay->setMargin( 9 ); aLay->setSpacing( 6 );
|
aLay->setMargin( 9 ); aLay->setSpacing( 6 );
|
||||||
|
|
||||||
mySplitAngleAngle = new SalomeApp_DoubleSpinBox( 0, 360, 1, 10, 10, w );
|
mySplitAngleAngle = new SalomeApp_DoubleSpinBox( w );
|
||||||
mySplitAngleMaxTol = new SalomeApp_DoubleSpinBox( 0., 100., 1e-7, 10, 10, w );
|
initSpinBox( mySplitAngleAngle, 0, 360, 1, "angle_precision" );
|
||||||
|
mySplitAngleMaxTol = new SalomeApp_DoubleSpinBox( w );
|
||||||
|
initSpinBox( mySplitAngleMaxTol, 0., 100., 1e-7, "ang_tol_precision" );
|
||||||
|
|
||||||
aLay->addWidget( new QLabel( tr( "GEOM_ANGLE_1" ), w ), 0, 0 );
|
aLay->addWidget( new QLabel( tr( "GEOM_ANGLE_1" ), w ), 0, 0 );
|
||||||
aLay->addWidget( mySplitAngleAngle, 0, 1 );
|
aLay->addWidget( mySplitAngleAngle, 0, 1 );
|
||||||
@ -192,7 +198,8 @@ void RepairGUI_ShapeProcessDlg::init()
|
|||||||
QGridLayout* aLay = new QGridLayout( w );
|
QGridLayout* aLay = new QGridLayout( w );
|
||||||
aLay->setMargin( 9 ); aLay->setSpacing( 6 );
|
aLay->setMargin( 9 ); aLay->setSpacing( 6 );
|
||||||
|
|
||||||
mySplitContTol3D = new SalomeApp_DoubleSpinBox( 0., 100., 1e-7, 10, 10, w );
|
mySplitContTol3D = new SalomeApp_DoubleSpinBox( w );
|
||||||
|
initSpinBox( mySplitContTol3D, 0., 100., 1e-7, "len_tol_precision" );
|
||||||
mySplitContSurfCont = new QComboBox( w );
|
mySplitContSurfCont = new QComboBox( w );
|
||||||
mySplitContSurfCont->addItems( aContinueties );
|
mySplitContSurfCont->addItems( aContinueties );
|
||||||
mySplitContCurvCont = new QComboBox( w );
|
mySplitContCurvCont = new QComboBox( w );
|
||||||
@ -216,9 +223,11 @@ void RepairGUI_ShapeProcessDlg::init()
|
|||||||
myBSpline3DCurveChk = new QCheckBox( tr("GEOM_3D_CURVE_MODE"), w );
|
myBSpline3DCurveChk = new QCheckBox( tr("GEOM_3D_CURVE_MODE"), w );
|
||||||
myBSpline2DCurveChk = new QCheckBox( tr("GEOM_2D_CURVE_MODE"), w );
|
myBSpline2DCurveChk = new QCheckBox( tr("GEOM_2D_CURVE_MODE"), w );
|
||||||
|
|
||||||
myBSplineTol3D = new SalomeApp_DoubleSpinBox( 0., 100., 1e-7, 10, 10, w );
|
myBSplineTol3D = new SalomeApp_DoubleSpinBox( w );
|
||||||
|
initSpinBox( mySplitContTol3D, 0., 100., 1e-7, "len_tol_precision" );
|
||||||
|
|
||||||
myBSplineTol2D = new SalomeApp_DoubleSpinBox( 0., 100., 1e-7, 10, 10, w );
|
myBSplineTol2D = new SalomeApp_DoubleSpinBox( w );
|
||||||
|
initSpinBox( myBSplineTol2D, 0., 100., 1e-7, "param_tol_precision" );
|
||||||
|
|
||||||
myBSplineDegree = new SalomeApp_IntSpinBox( w );
|
myBSplineDegree = new SalomeApp_IntSpinBox( w );
|
||||||
myBSplineSegments = new SalomeApp_IntSpinBox( w );
|
myBSplineSegments = new SalomeApp_IntSpinBox( w );
|
||||||
@ -258,7 +267,8 @@ void RepairGUI_ShapeProcessDlg::init()
|
|||||||
myToBezier3DCurveChk = new QCheckBox( tr("GEOM_3D_CURVE_MODE"), w );
|
myToBezier3DCurveChk = new QCheckBox( tr("GEOM_3D_CURVE_MODE"), w );
|
||||||
myToBezier2DCurveChk = new QCheckBox( tr("GEOM_2D_CURVE_MODE"), w );
|
myToBezier2DCurveChk = new QCheckBox( tr("GEOM_2D_CURVE_MODE"), w );
|
||||||
|
|
||||||
myToBezierMaxTol = new SalomeApp_DoubleSpinBox( 0., 100., 1e-7, 10, 10, w );
|
myToBezierMaxTol = new SalomeApp_DoubleSpinBox( w );
|
||||||
|
initSpinBox( myToBezierMaxTol, 0., 100., 1e-7, "len_tol_precision" );
|
||||||
|
|
||||||
aLay->addWidget( myToBezierSurfModeChk, 0, 0 );
|
aLay->addWidget( myToBezierSurfModeChk, 0, 0 );
|
||||||
aLay->addWidget( myToBezier3DCurveChk, 1, 0 );
|
aLay->addWidget( myToBezier3DCurveChk, 1, 0 );
|
||||||
@ -273,7 +283,8 @@ void RepairGUI_ShapeProcessDlg::init()
|
|||||||
QGridLayout* aLay = new QGridLayout( w );
|
QGridLayout* aLay = new QGridLayout( w );
|
||||||
aLay->setMargin( 9 ); aLay->setSpacing( 6 );
|
aLay->setMargin( 9 ); aLay->setSpacing( 6 );
|
||||||
|
|
||||||
mySameParameterTol3D = new SalomeApp_DoubleSpinBox( 0., 100., 1e-7, 10, 10, w );
|
mySameParameterTol3D = new SalomeApp_DoubleSpinBox( w );
|
||||||
|
initSpinBox( mySameParameterTol3D, 0., 100., 1e-7, "len_tol_precision" );
|
||||||
|
|
||||||
aLay->addWidget( new QLabel( tr( "GEOM_3D_TOLERANCE" ), w ), 0, 0 );
|
aLay->addWidget( new QLabel( tr( "GEOM_3D_TOLERANCE" ), w ), 0, 0 );
|
||||||
aLay->addWidget( mySameParameterTol3D, 0, 1 );
|
aLay->addWidget( mySameParameterTol3D, 0, 1 );
|
||||||
|
@ -130,9 +130,9 @@ void TransformationGUI_MultiRotationDlg::Init()
|
|||||||
initSpinBox(GroupPoints->SpinBox_DX, 1, 999, SpecificStep2);
|
initSpinBox(GroupPoints->SpinBox_DX, 1, 999, SpecificStep2);
|
||||||
GroupPoints->SpinBox_DX->setValue(myNbTimes1);
|
GroupPoints->SpinBox_DX->setValue(myNbTimes1);
|
||||||
|
|
||||||
initSpinBox(GroupDimensions->SpinBox_DX1, COORD_MIN, COORD_MAX, SpecificStep1, 10); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(GroupDimensions->SpinBox_DX1, COORD_MIN, COORD_MAX, SpecificStep1, "angle_precision" );
|
||||||
initSpinBox(GroupDimensions->SpinBox_DY1, 1, 999, SpecificStep2);
|
initSpinBox(GroupDimensions->SpinBox_DY1, 1, 999, SpecificStep2);
|
||||||
initSpinBox(GroupDimensions->SpinBox_DX2, COORD_MIN, COORD_MAX, step, 10); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(GroupDimensions->SpinBox_DX2, COORD_MIN, COORD_MAX, step,"length_precision" );
|
||||||
initSpinBox(GroupDimensions->SpinBox_DY2, 1, 999, SpecificStep2);
|
initSpinBox(GroupDimensions->SpinBox_DY2, 1, 999, SpecificStep2);
|
||||||
GroupDimensions->SpinBox_DX1->setValue(myAng);
|
GroupDimensions->SpinBox_DX1->setValue(myAng);
|
||||||
GroupDimensions->SpinBox_DY1->setValue(myNbTimes1);
|
GroupDimensions->SpinBox_DY1->setValue(myNbTimes1);
|
||||||
@ -192,11 +192,13 @@ void TransformationGUI_MultiRotationDlg::Init()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void TransformationGUI_MultiRotationDlg::SetDoubleSpinBoxStep (double step)
|
void TransformationGUI_MultiRotationDlg::SetDoubleSpinBoxStep (double step)
|
||||||
{
|
{
|
||||||
GroupPoints->SpinBox_DX->setSingleStep((int)step);
|
|
||||||
GroupDimensions->SpinBox_DX1->setSingleStep(step);
|
|
||||||
GroupDimensions->SpinBox_DY1->setSingleStep((int)step);
|
|
||||||
GroupDimensions->SpinBox_DX2->setSingleStep(step);
|
GroupDimensions->SpinBox_DX2->setSingleStep(step);
|
||||||
GroupDimensions->SpinBox_DY2->setSingleStep((int)step);
|
|
||||||
|
// san: Commented so as not to override specific step settings
|
||||||
|
//GroupPoints->SpinBox_DX->setSingleStep((int)step);
|
||||||
|
//GroupDimensions->SpinBox_DX1->setSingleStep(step);
|
||||||
|
//GroupDimensions->SpinBox_DY1->setSingleStep((int)step);
|
||||||
|
//GroupDimensions->SpinBox_DY2->setSingleStep((int)step);
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -132,14 +132,14 @@ void TransformationGUI_MultiTranslationDlg::Init()
|
|||||||
|
|
||||||
int SpecificStep = 1;
|
int SpecificStep = 1;
|
||||||
// min, max, step and decimals for spin boxes & initial values
|
// min, max, step and decimals for spin boxes & initial values
|
||||||
initSpinBox(GroupPoints->SpinBox_DX, COORD_MIN, COORD_MAX, step, 10); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(GroupPoints->SpinBox_DX, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox(GroupPoints->SpinBox_DY, 1, 999, SpecificStep);
|
initSpinBox(GroupPoints->SpinBox_DY, 1, 999, SpecificStep);
|
||||||
GroupPoints->SpinBox_DX->setValue(myStepU);
|
GroupPoints->SpinBox_DX->setValue(myStepU);
|
||||||
GroupPoints->SpinBox_DY->setValue(myNbTimesU);
|
GroupPoints->SpinBox_DY->setValue(myNbTimesU);
|
||||||
|
|
||||||
initSpinBox(GroupDimensions->SpinBox_DX1, COORD_MIN, COORD_MAX, step, 10); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(GroupDimensions->SpinBox_DX1, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox(GroupDimensions->SpinBox_DY1, 1, 999, SpecificStep);
|
initSpinBox(GroupDimensions->SpinBox_DY1, 1, 999, SpecificStep);
|
||||||
initSpinBox(GroupDimensions->SpinBox_DX2, COORD_MIN, COORD_MAX, step, 10); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(GroupDimensions->SpinBox_DX2, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox(GroupDimensions->SpinBox_DY2, 1, 999, SpecificStep);
|
initSpinBox(GroupDimensions->SpinBox_DY2, 1, 999, SpecificStep);
|
||||||
GroupDimensions->SpinBox_DX1->setValue(myStepU);
|
GroupDimensions->SpinBox_DX1->setValue(myStepU);
|
||||||
GroupDimensions->SpinBox_DY1->setValue(myNbTimesU);
|
GroupDimensions->SpinBox_DY1->setValue(myNbTimesU);
|
||||||
@ -209,11 +209,13 @@ void TransformationGUI_MultiTranslationDlg::Init()
|
|||||||
void TransformationGUI_MultiTranslationDlg::SetDoubleSpinBoxStep (double step)
|
void TransformationGUI_MultiTranslationDlg::SetDoubleSpinBoxStep (double step)
|
||||||
{
|
{
|
||||||
GroupPoints->SpinBox_DX->setSingleStep(step);
|
GroupPoints->SpinBox_DX->setSingleStep(step);
|
||||||
GroupPoints->SpinBox_DY->setSingleStep((int)step);
|
GroupDimensions->SpinBox_DX1->setSingleStep(step);
|
||||||
GroupDimensions->SpinBox_DX1->setSingleStep(step);
|
|
||||||
GroupDimensions->SpinBox_DY1->setSingleStep((int)step);
|
|
||||||
GroupDimensions->SpinBox_DX2->setSingleStep(step);
|
GroupDimensions->SpinBox_DX2->setSingleStep(step);
|
||||||
GroupDimensions->SpinBox_DY2->setSingleStep((int)step);
|
|
||||||
|
// san : Commented so as not to override specific step settings
|
||||||
|
//GroupPoints->SpinBox_DY->setSingleStep((int)step);
|
||||||
|
//GroupDimensions->SpinBox_DY1->setSingleStep((int)step);
|
||||||
|
//GroupDimensions->SpinBox_DY2->setSingleStep((int)step);
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -105,7 +105,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 */
|
||||||
initSpinBox( GroupPoints->SpinBox_DX, COORD_MIN, COORD_MAX, step, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( GroupPoints->SpinBox_DX, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
GroupPoints->SpinBox_DX->setValue( 1e-05 );
|
GroupPoints->SpinBox_DX->setValue( 1e-05 );
|
||||||
|
|
||||||
// Activate Create a Copy mode
|
// Activate Create a Copy mode
|
||||||
|
@ -122,7 +122,7 @@ void TransformationGUI_PositionDlg::Init()
|
|||||||
Group1->LineEdit4->setText("");
|
Group1->LineEdit4->setText("");
|
||||||
Group1->LineEdit5->setText("");
|
Group1->LineEdit5->setText("");
|
||||||
|
|
||||||
initSpinBox(Group1->SpinBox_DX, 0, 1, 0.05, 6); // VSR:TODO : DBL_DIGITS_DISPLAY
|
initSpinBox(Group1->SpinBox_DX, 0, 1, 0.05, "parametric_precision" );
|
||||||
Group1->SpinBox_DX->setValue(0);
|
Group1->SpinBox_DX->setValue(0);
|
||||||
|
|
||||||
Group1->CheckButton2->setEnabled(false);
|
Group1->CheckButton2->setEnabled(false);
|
||||||
|
@ -122,7 +122,7 @@ void TransformationGUI_RotationDlg::Init()
|
|||||||
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
|
||||||
initSpinBox(GroupPoints->SpinBox_DX, COORD_MIN, COORD_MAX, SpecificStep, 3); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(GroupPoints->SpinBox_DX, COORD_MIN, COORD_MAX, SpecificStep, "angle_precision" );
|
||||||
GroupPoints->SpinBox_DX->setValue(anAngle);
|
GroupPoints->SpinBox_DX->setValue(anAngle);
|
||||||
|
|
||||||
// init variables
|
// init variables
|
||||||
|
@ -155,9 +155,9 @@ void TransformationGUI_ScaleDlg::Init()
|
|||||||
double aFactor = 2.0;
|
double aFactor = 2.0;
|
||||||
double SpecificStep = 0.5;
|
double SpecificStep = 0.5;
|
||||||
|
|
||||||
initSpinBox(SpinBox_FX, COORD_MIN, COORD_MAX, SpecificStep, DBL_DIGITS_DISPLAY);
|
initSpinBox(SpinBox_FX, COORD_MIN, COORD_MAX, SpecificStep, "parametric_precision" );
|
||||||
initSpinBox(SpinBox_FY, COORD_MIN, COORD_MAX, SpecificStep, DBL_DIGITS_DISPLAY);
|
initSpinBox(SpinBox_FY, COORD_MIN, COORD_MAX, SpecificStep, "parametric_precision" );
|
||||||
initSpinBox(SpinBox_FZ, COORD_MIN, COORD_MAX, SpecificStep, DBL_DIGITS_DISPLAY);
|
initSpinBox(SpinBox_FZ, COORD_MIN, COORD_MAX, SpecificStep, "parametric_precision" );
|
||||||
SpinBox_FX->setValue(aFactor);
|
SpinBox_FX->setValue(aFactor);
|
||||||
SpinBox_FY->setValue(aFactor);
|
SpinBox_FY->setValue(aFactor);
|
||||||
SpinBox_FZ->setValue(aFactor);
|
SpinBox_FZ->setValue(aFactor);
|
||||||
@ -182,8 +182,9 @@ void TransformationGUI_ScaleDlg::Init()
|
|||||||
connect(SpinBox_FX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox()));
|
connect(SpinBox_FX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox()));
|
||||||
connect(SpinBox_FY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox()));
|
connect(SpinBox_FY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox()));
|
||||||
connect(SpinBox_FZ, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox()));
|
connect(SpinBox_FZ, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox()));
|
||||||
|
|
||||||
connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), this, SLOT(SetDoubleSpinBoxStep(double)));
|
// san : Commented so as not to override specific step settings
|
||||||
|
//connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), this, SLOT(SetDoubleSpinBoxStep(double)));
|
||||||
|
|
||||||
connect(CheckBoxCopy, SIGNAL(toggled(bool)), this, SLOT(CreateCopyModeChanged(bool)));
|
connect(CheckBoxCopy, SIGNAL(toggled(bool)), this, SLOT(CreateCopyModeChanged(bool)));
|
||||||
|
|
||||||
|
@ -118,9 +118,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
|
||||||
initSpinBox(GroupPoints->SpinBox1, COORD_MIN, COORD_MAX, step, 3); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(GroupPoints->SpinBox1, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox(GroupPoints->SpinBox2, COORD_MIN, COORD_MAX, step, 3); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(GroupPoints->SpinBox2, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
initSpinBox(GroupPoints->SpinBox3, COORD_MIN, COORD_MAX, step, 3); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox(GroupPoints->SpinBox3, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||||
|
|
||||||
GroupPoints->SpinBox1->setValue(0.0);
|
GroupPoints->SpinBox1->setValue(0.0);
|
||||||
GroupPoints->SpinBox2->setValue(0.0);
|
GroupPoints->SpinBox2->setValue(0.0);
|
||||||
|
Loading…
Reference in New Issue
Block a user