<parameter name="quadratic_mode" value="0"/>
<parameter name="max_angle" value="2"/>
<parameter name="documentation" value="smesh_help"/>
+ <!-- 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="-7" />
+ <parameter name="parametric_precision" value="-6" />
+ <parameter name="area_precision" value="-6" />
+ <parameter name="vol_precision" value="-6" />
</section>
<section name="smesh_help" >
<parameter name="sub_menu" value="%1 module"/>
"SMESH", "nb_segments_per_edge" );
setPreferenceProperty( nbSeg, "min", 1 );
setPreferenceProperty( nbSeg, "max", 10000000 );
+
+ // Quantities with individual precision settings
+ int precGroup = addPreference( tr( "SMESH_PREF_GROUP_PRECISION" ), genTab );
+ setPreferenceProperty( precGroup, "columns", 2 );
+
+ const int nbQuantities = 6;
+ int precs[nbQuantities], ii = 0;
+ precs[ii++] = addPreference( tr( "SMESH_PREF_length_precision" ), precGroup,
+ LightApp_Preferences::IntSpin, "SMESH", "length_precision" );
+ precs[ii++] = addPreference( tr( "SMESH_PREF_angle_precision" ), precGroup,
+ LightApp_Preferences::IntSpin, "SMESH", "angle_precision" );
+ precs[ii++] = addPreference( tr( "SMESH_PREF_len_tol_precision" ), precGroup,
+ LightApp_Preferences::IntSpin, "SMESH", "len_tol_precision" );
+ precs[ii++] = addPreference( tr( "SMESH_PREF_parametric_precision" ), precGroup,
+ LightApp_Preferences::IntSpin, "SMESH", "parametric_precision" );
+ precs[ii++] = addPreference( tr( "SMESH_PREF_area_precision" ), precGroup,
+ LightApp_Preferences::IntSpin, "SMESH", "area_precision" );
+ precs[ii ] = addPreference( tr( "SMESH_PREF_vol_precision" ), precGroup,
+ LightApp_Preferences::IntSpin, "SMESH", "vol_precision" );
+
+ // Set property for precision value for spinboxes
+ for ( ii = 0; ii < nbQuantities; ii++ ){
+ setPreferenceProperty( precs[ii], "min", -10 );
+ setPreferenceProperty( precs[ii], "max", 10 );
+ setPreferenceProperty( precs[ii], "precision", 2 );
+ }
// Mesh tab ------------------------------------------------------------------------
int meshTab = addPreference( tr( "PREF_TAB_MESH" ) );
TextLabelTol = new QLabel(tr("SMESH_TOLERANCE"), GroupArgs);
TextLabelTol->setAlignment(Qt::AlignCenter);
SpinBoxTol = new SMESHGUI_SpinBox(GroupArgs);
- SpinBoxTol->RangeStepAndValidator(0.0, COORD_MAX, 0.00001, 6);
+ SpinBoxTol->RangeStepAndValidator(0.0, COORD_MAX, 0.00001, "len_tol_precision" );
GroupArgsLayout->addWidget(TextLabelMeshes, 0, 0);
GroupArgsLayout->addWidget(SelectButton, 0, 1);
SMESHGUI_ClippingDlgLayout->setMargin(MARGIN);
// Controls for selecting, creating, deleting planes
- QGroupBox* GroupPlanes = new QGroupBox(tr("Clipping planes"), this);
+ QGroupBox* GroupPlanes = new QGroupBox(tr("CLIP_PLANES"), this);
QHBoxLayout* GroupPlanesLayout = new QHBoxLayout(GroupPlanes);
GroupPlanesLayout->setSpacing(SPACING);
GroupPlanesLayout->setMargin(MARGIN);
SpinBoxDistance = new SMESHGUI_SpinBox(GroupParameters);
- TextLabelRot1 = new QLabel(tr("Rotation around X (Y to Z):"), GroupParameters);
+ TextLabelRot1 = new QLabel(tr("ROTATION_AROUND_X_Y2Z"), GroupParameters);
SpinBoxRot1 = new SMESHGUI_SpinBox(GroupParameters);
- TextLabelRot2 = new QLabel(tr("Rotation around Y (X to Z):"), GroupParameters);
+ TextLabelRot2 = new QLabel(tr("ROTATION_AROUND_Y_X2Z"), GroupParameters);
SpinBoxRot2 = new SMESHGUI_SpinBox(GroupParameters);
- PreviewCheckBox = new QCheckBox(tr("Show preview"), GroupParameters);
+ PreviewCheckBox = new QCheckBox(tr("SHOW_PREVIEW"), GroupParameters);
PreviewCheckBox->setChecked(true);
- AutoApplyCheckBox = new QCheckBox(tr("Auto Apply"), GroupParameters);
+ AutoApplyCheckBox = new QCheckBox(tr("AUTO_APPLY"), GroupParameters);
AutoApplyCheckBox->setChecked(false);
GroupParametersLayout->addWidget(TextLabelOrientation, 0, 0);
SMESHGUI_ClippingDlgLayout->addWidget(GroupButtons);
// Initial state
- SpinBoxDistance->RangeStepAndValidator(0.0, 1.0, 0.01, 3);
- SpinBoxRot1->RangeStepAndValidator(-180.0, 180.0, 1, 3);
- SpinBoxRot2->RangeStepAndValidator(-180.0, 180.0, 1, 3);
+ SpinBoxDistance->RangeStepAndValidator(0.0, 1.0, 0.01, "length_precision" );
+ SpinBoxRot1->RangeStepAndValidator(-180.0, 180.0, 1, "angle_precision" );
+ SpinBoxRot2->RangeStepAndValidator(-180.0, 180.0, 1, "angle_precision" );
- ComboBoxOrientation->addItem(tr("|| X-Y"));
- ComboBoxOrientation->addItem(tr("|| Y-Z"));
- ComboBoxOrientation->addItem(tr("|| Z-X"));
+ ComboBoxOrientation->addItem(tr("ALONG_XY"));
+ ComboBoxOrientation->addItem(tr("ALONG_YZ"));
+ ComboBoxOrientation->addItem(tr("ALONG_ZX"));
SpinBoxDistance->SetValue(0.5);
return;
if (theItem == 0) {
- TextLabelRot1->setText(tr("Rotation around X (Y to Z):"));
- TextLabelRot2->setText(tr("Rotation around Y (X to Z):"));
+ TextLabelRot1->setText(tr("ROTATION_AROUND_X_Y2Z"));
+ TextLabelRot2->setText(tr("ROTATION_AROUND_Y_X2Z"));
}
else if (theItem == 1) {
- TextLabelRot1->setText(tr("Rotation around Y (Z to X):"));
- TextLabelRot2->setText(tr("Rotation around Z (Y to X):"));
+ TextLabelRot1->setText(tr("ROTATION_AROUND_Y_Z2X"));
+ TextLabelRot2->setText(tr("ROTATION_AROUND_Z_Y2X"));
}
else if (theItem == 2) {
- TextLabelRot1->setText(tr("Rotation around Z (X to Y):"));
- TextLabelRot2->setText(tr("Rotation around X (Z to Y):"));
+ TextLabelRot1->setText(tr("ROTATION_AROUND_Z_X2Y"));
+ TextLabelRot2->setText(tr("ROTATION_AROUND_X_Z2Y"));
}
if((QComboBox*)sender() == ComboBoxOrientation)
QString aName;
for(int i = 1; i<=aNbPlanes; i++) {
- aName = QString(tr("Plane# %1")).arg(i);
+ aName = QString(tr("PLANE_NUM")).arg(i);
ComboBoxPlanes->addItem(aName);
}
if (anIsControlsEnable) {
onSelectPlane(aPos);
} else {
- ComboBoxPlanes->addItem(tr("No planes"));
+ ComboBoxPlanes->addItem(tr("NO_PLANES"));
SpinBoxRot1->SetValue(0.0);
SpinBoxRot2->SetValue(0.0);
SpinBoxDistance->SetValue(0.5);
void SMESHGUI_EditMeshDlg::Init()
{
if (myAction == 0) {
- SpinBoxTolerance->RangeStepAndValidator(0.0, COORD_MAX, 0.00001, 5);
+ SpinBoxTolerance->RangeStepAndValidator(0.0, COORD_MAX, 0.00001, "len_tol_precision");
SpinBoxTolerance->SetValue(1e-05);
}
/***************************************************************/
// Initialisations
- XSpin->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- YSpin->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- ZSpin->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- AngleSpin->RangeStepAndValidator(-180.0, 180.0, 5.0, 3);
+ XSpin->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ YSpin->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ ZSpin->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ AngleSpin->RangeStepAndValidator(-180.0, 180.0, 5.0, "angle_precision");
mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
SMESHGUI_ExtrusionDlgLayout->addWidget(GroupButtons);
/* Initialisations */
- SpinBox_Vx->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.01, 3);
- SpinBox_Vy->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.01, 3);
- SpinBox_Vz->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.01, 3);
+ SpinBox_Vx->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.01, "length_precision");
+ SpinBox_Vy->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.01, "length_precision");
+ SpinBox_Vz->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.01, "length_precision");
- SpinBox_Dx->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- SpinBox_Dy->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- SpinBox_Dz->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
+ SpinBox_Dx->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_Dy->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_Dz->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
SpinBox_NbSteps->setRange(1, 999999);
- SpinBox_VDist->RangeStepAndValidator(0, COORD_MAX, 10.0, 3);
+ SpinBox_VDist->RangeStepAndValidator(0, COORD_MAX, 10.0, "length_precision");
RadioButton1->setChecked(true);
RadioButton3->setChecked(true);
QLabel* aZLabel = new QLabel(tr("SMESH_Z"), aCoordGrp);
myZ = new SMESHGUI_SpinBox(aCoordGrp);
- myX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
- myY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
- myZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
+ myX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ myY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ myZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
myX->SetValue(0);
myY->SetValue(0);
myZ->SetValue(0);
QLabel* aZLabel = new QLabel(tr("SMESH_Z"), aCoordGrp);
myZ = new SMESHGUI_SpinBox(aCoordGrp);
- myX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
- myY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
- myZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
+ myX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ myY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ myZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
aCoordGrpLayout->addWidget(myCoordBtn);
aCoordGrpLayout->addWidget(aXLabel);
aCoordGrpLayout->addWidget(myZ);
//------------------------------------------------------------
- myX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 25.0, DBL_DIGITS_DISPLAY);
- myY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 25.0, DBL_DIGITS_DISPLAY);
- myZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 25.0, DBL_DIGITS_DISPLAY);
+ myX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 25.0, "length_precision");
+ myY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 25.0, "length_precision");
+ myZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 25.0, "length_precision");
//------------------------------------------------------------
QVBoxLayout* aLay = new QVBoxLayout(aFrame);
QLabel* aLab = new QLabel (tr("MAXIMUM_ANGLE"), aMaxAngleGrp);
myMaxAngleSpin = new SMESHGUI_SpinBox (aMaxAngleGrp);
- myMaxAngleSpin->RangeStepAndValidator(0, 180.0, 1.0, 3);
+ myMaxAngleSpin->RangeStepAndValidator(0, 180.0, 1.0, "angle_precision");
myMaxAngleSpin->SetValue(30.0);
aMaxAngleGrpLayout->addWidget(aLab);
double step = 25.0;
/* min, max, step and decimals for spin boxes */
- SpinBox_X->RangeStepAndValidator( COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY );
- SpinBox_Y->RangeStepAndValidator( COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY );
- SpinBox_Z->RangeStepAndValidator( COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY );
+ SpinBox_X->RangeStepAndValidator( COORD_MIN, COORD_MAX, step, "length_precision" );
+ SpinBox_Y->RangeStepAndValidator( COORD_MIN, COORD_MAX, step, "length_precision" );
+ SpinBox_Z->RangeStepAndValidator( COORD_MIN, COORD_MAX, step, "length_precision" );
SpinBox_X->SetValue( 0.0 );
SpinBox_Y->SetValue( 0.0 );
SpinBox_Z->SetValue( 0.0 );
#include "SMESHGUI_Preferences_ColorDlg.h"
#include "SMESHGUI.h"
+#include "SMESHGUI_SpinBox.h"
#include "SMESHGUI_Utils.h"
// SALOME GUI includes
#include <SUIT_Desktop.h>
#include <QtxColorButton.h>
-#include <QtxDoubleSpinBox.h>
-#include <QtxIntSpinBox.h>
#include <VTKViewer_MarkerWidget.h>
+#include <SalomeApp_IntSpinBox.h>
// Qt includes
#include <QGroupBox>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QGridLayout>
-#include <QSpinBox>
#include <QCheckBox>
#define SPACING 6
btn0DElementsColor = new QtxColorButton( ButtonGroup1 );
QLabel* TextLabel_0DElements_Size = new QLabel( tr( "Size of 0D elements" ), ButtonGroup1 );
- SpinBox_0DElements_Size = new QSpinBox( ButtonGroup1 );
+ SpinBox_0DElements_Size = new SalomeApp_IntSpinBox( ButtonGroup1 );
+ SpinBox_0DElements_Size->setAcceptNames( false ); // No Notebook variables allowed
SpinBox_0DElements_Size->setRange( 1, 10 );
SpinBox_0DElements_Size->setSingleStep( 1 );
SpinBox_0DElements_Size->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
SpinBox_0DElements_Size->setButtonSymbols( QSpinBox::PlusMinus );
QLabel* TextLabel_Width = new QLabel( tr( "Width" ), ButtonGroup1 );
- SpinBox_Width = new QSpinBox( ButtonGroup1 );
+ SpinBox_Width = new SalomeApp_IntSpinBox( ButtonGroup1 );
+ SpinBox_Width->setAcceptNames( false ); // No Notebook variables allowed
SpinBox_Width->setRange( 0, 5 );
SpinBox_Width->setSingleStep( 1 );
SpinBox_Width->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
SpinBox_Width->setButtonSymbols( QSpinBox::PlusMinus );
QLabel* TextLabel_ShrinkCoeff = new QLabel( tr( "Shrink coef." ), ButtonGroup1 );
- SpinBox_Shrink = new QtxIntSpinBox( ButtonGroup1 );
+ SpinBox_Shrink = new SalomeApp_IntSpinBox( ButtonGroup1 );
+ SpinBox_Shrink->setAcceptNames( false ); // No Notebook variables allowed
SpinBox_Shrink->setRange( 20, 100 );
SpinBox_Shrink->setSingleStep( 1 );
SpinBox_Shrink->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
btnOrientationColor = new QtxColorButton( ButtonGroup3 );
QLabel* TextLabel_Orientation_Scale = new QLabel( tr( "Scale" ), ButtonGroup3 );
- SpinBox_Orientation_Scale = new QtxDoubleSpinBox( ButtonGroup3 );
- SpinBox_Orientation_Scale->setRange( 0.05, 0.5 );
- SpinBox_Orientation_Scale->setSingleStep( 0.05 );
+ SpinBox_Orientation_Scale = new SMESHGUI_SpinBox( ButtonGroup3 );
+ SpinBox_Orientation_Scale->setAcceptNames( false ); // No Notebook variables allowed
+ SpinBox_Orientation_Scale->RangeStepAndValidator( .05, .5, .05, "parametric_precision" );
SpinBox_Orientation_Scale->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
SpinBox_Orientation_Scale->setButtonSymbols( QSpinBox::PlusMinus );
#include <QDialog>
class QCheckBox;
-class QSpinBox;
class SMESHGUI;
-class QtxDoubleSpinBox;
-class QtxIntSpinBox;
+class SMESHGUI_SpinBox;
+class SalomeApp_IntSpinBox;
class QtxColorButton;
class VTKViewer_MarkerWidget;
QtxColorButton* btnBackFaceColor;
QtxColorButton* btnOutlineColor;
QtxColorButton* btn0DElementsColor;
- QSpinBox* SpinBox_0DElements_Size;
- QSpinBox* SpinBox_Width;
- QtxIntSpinBox* SpinBox_Shrink;
+ SalomeApp_IntSpinBox* SpinBox_0DElements_Size;
+ SalomeApp_IntSpinBox* SpinBox_Width;
+ SalomeApp_IntSpinBox* SpinBox_Shrink;
QtxColorButton* btnNodeColor;
VTKViewer_MarkerWidget* MarkerWidget;
QtxColorButton* btnOrientationColor;
- QtxDoubleSpinBox* SpinBox_Orientation_Scale;
+ SMESHGUI_SpinBox* SpinBox_Orientation_Scale;
QCheckBox* CheckBox_Orientation_3DVectors;
};
#include "SMESHGUI_Preferences_ScalarBarDlg.h"
#include "SMESHGUI.h"
+#include "SMESHGUI_SpinBox.h"
#include "SMESHGUI_VTKUtils.h"
#include "SMESHGUI_Utils.h"
#include <LightApp_Application.h>
#include <LightApp_SelectionMgr.h>
#include <SALOME_ListIO.hxx>
+#include <SalomeApp_IntSpinBox.h>
-#include <QtxDoubleSpinBox.h>
#include <QtxColorButton.h>
// Qt includes
#include <QLineEdit>
#include <QPushButton>
#include <QRadioButton>
-#include <QSpinBox>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QGridLayout>
QHBoxLayout* myLabColorGrpLayout = new QHBoxLayout( myLabColorGrp );
myLabColorGrpLayout->setSpacing( SPACING_SIZE ); myLabColorGrpLayout->setMargin( MARGIN_SIZE );
- myColorsSpin = new QSpinBox( myLabColorGrp );
+ myColorsSpin = new SalomeApp_IntSpinBox( myLabColorGrp );
+ myColorsSpin->setAcceptNames( false ); // No Notebook variables allowed
myColorsSpin->setRange( 2, 256 );
myColorsSpin->setSingleStep( 1 );
myColorsSpin->setMinimumWidth( MINIMUM_WIDTH );
myColorsSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- myLabelsSpin = new QSpinBox( myLabColorGrp );
+ myLabelsSpin = new SalomeApp_IntSpinBox( myLabColorGrp );
+ myLabelsSpin->setAcceptNames( false ); // No Notebook variables allowed
myLabelsSpin->setRange( 2, 65 );
myLabelsSpin->setSingleStep( 1 );
myLabelsSpin->setMinimumWidth( MINIMUM_WIDTH );
QGridLayout* myOriginDimGrpLayout = new QGridLayout( myOriginDimGrp );
myOriginDimGrpLayout->setSpacing( SPACING_SIZE ); myOriginDimGrpLayout->setMargin( MARGIN_SIZE );
- myXSpin = new QtxDoubleSpinBox (0.0, 1.0, 0.1, myOriginDimGrp);
+ myXSpin = new SMESHGUI_SpinBox(myOriginDimGrp);
+ myXSpin->setAcceptNames( false );
+ myXSpin->RangeStepAndValidator( 0.0, 1.0, 0.1, "parametric_precision" );
myXSpin->setMinimumWidth( MINIMUM_WIDTH );
myXSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- myYSpin = new QtxDoubleSpinBox(0.0, 1.0, 0.1, myOriginDimGrp);
+ myYSpin = new SMESHGUI_SpinBox(myOriginDimGrp);
+ myYSpin->setAcceptNames( false );
+ myYSpin->RangeStepAndValidator( 0.0, 1.0, 0.1, "parametric_precision" );
myYSpin->setMinimumWidth( MINIMUM_WIDTH );
myYSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- myWidthSpin = new QtxDoubleSpinBox(0.0, 1.0, 0.1, myOriginDimGrp);
+ myWidthSpin = new SMESHGUI_SpinBox(myOriginDimGrp);
+ myWidthSpin->setAcceptNames( false );
+ myWidthSpin->RangeStepAndValidator( 0.0, 1.0, 0.1, "parametric_precision" );
myWidthSpin->setMinimumWidth( MINIMUM_WIDTH );
myWidthSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- myHeightSpin = new QtxDoubleSpinBox(0.0, 1.0, 0.1, myOriginDimGrp);
+ myHeightSpin = new SMESHGUI_SpinBox(myOriginDimGrp);
+ myHeightSpin->setAcceptNames( false );
+ myHeightSpin->RangeStepAndValidator( 0.0, 1.0, 0.1, "parametric_precision" );
myHeightSpin->setMinimumWidth( MINIMUM_WIDTH );
myHeightSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
class QPushButton;
class QToolButton;
class QRadioButton;
-class QSpinBox;
class SMESHGUI;
class SMESH_Actor;
-class QtxDoubleSpinBox;
+class SMESHGUI_SpinBox;
+class SalomeApp_IntSpinBox;
class QtxColorButton;
class LightApp_SelectionMgr;
QCheckBox* myLabelsShadowCheck;
QGroupBox* myLabColorGrp;
- QSpinBox* myColorsSpin;
- QSpinBox* myLabelsSpin;
+ SalomeApp_IntSpinBox* myColorsSpin;
+ SalomeApp_IntSpinBox* myLabelsSpin;
QGroupBox* myOrientationGrp;
QRadioButton* myVertRadioBtn;
QRadioButton* myHorizRadioBtn;
QGroupBox* myOriginDimGrp;
- QtxDoubleSpinBox* myXSpin;
- QtxDoubleSpinBox* myYSpin;
- QtxDoubleSpinBox* myWidthSpin;
- QtxDoubleSpinBox* myHeightSpin;
+ SMESHGUI_SpinBox* myXSpin;
+ SMESHGUI_SpinBox* myYSpin;
+ SMESHGUI_SpinBox* myWidthSpin;
+ SMESHGUI_SpinBox* myHeightSpin;
QGroupBox* myButtonGrp;
QPushButton* myOkBtn;
SMESHGUI_RevolutionDlgLayout->addWidget(GroupButtons);
/* Initialisations */
- SpinBox_X->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- SpinBox_Y->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- SpinBox_Z->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
+ SpinBox_X->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_Y->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_Z->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
RadioButton3->setChecked(true);
- SpinBox_Angle->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5.0, 3);
+ SpinBox_Angle->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5.0, "angle_precision");
SpinBox_NbSteps->setRange(1, 999999);
- SpinBox_Tolerance->RangeStepAndValidator(0.0, COORD_MAX, 0.00001, 6);
+ SpinBox_Tolerance->RangeStepAndValidator(0.0, COORD_MAX, 0.00001, "len_tol_precision");
RadioButton1->setChecked(true);
SMESHGUI_RotationDlgLayout->addWidget(GroupButtons);
/* Initialisations */
- SpinBox_X->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- SpinBox_Y->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- SpinBox_Z->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
-
- SpinBox_Angle->RangeStepAndValidator(-360.0, +360.0, 5.0, 3);
+ SpinBox_X->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_Y->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_Z->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+
+ SpinBox_Angle->RangeStepAndValidator(-360.0, +360.0, 5.0, "angle_precision");
myConstructorId = 0;
RadioButton1->setChecked(true);
SMESHGUI_ScaleDlgLayout->addWidget(GroupButtons);
/* Initialisations */
- SpinBox1_1->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
- SpinBox1_2->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
- SpinBox1_3->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
- //SpinBox_FX->RangeStepAndValidator(0.0, COORD_MAX, 1.0, DBL_DIGITS_DISPLAY);
- //SpinBox_FY->RangeStepAndValidator(0.0, COORD_MAX, 1.0, DBL_DIGITS_DISPLAY);
- //SpinBox_FZ->RangeStepAndValidator(0.0, COORD_MAX, 1.0, DBL_DIGITS_DISPLAY);
- SpinBox_FX->RangeStepAndValidator(1.e-6, 1.e+6, 1.0, DBL_DIGITS_DISPLAY);
+ SpinBox1_1->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox1_2->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox1_3->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_FX->RangeStepAndValidator(1.e-6, 1.e+6, 1.0, "parametric_precision");
SpinBox_FX->SetStep(0.1);
- SpinBox_FY->RangeStepAndValidator(1.e-6, 1.e+6, 1.0, DBL_DIGITS_DISPLAY);
+ SpinBox_FY->RangeStepAndValidator(1.e-6, 1.e+6, 1.0, "parametric_precision");
SpinBox_FY->SetStep(0.1);
- SpinBox_FZ->RangeStepAndValidator(1.e-6, 1.e+6, 1.0, DBL_DIGITS_DISPLAY);
+ SpinBox_FZ->RangeStepAndValidator(1.e-6, 1.e+6, 1.0, "parametric_precision");
SpinBox_FZ->SetStep(0.1);
RadioButton1->setChecked(true);
SpinBox_IterationLimit->setRange(1, 999999);
SpinBox_IterationLimit->setValue(20);
- SpinBox_AspectRatio->RangeStepAndValidator(0.0, +999999.999, 0.1, 3);
+ SpinBox_AspectRatio->RangeStepAndValidator(0.0, +999999.999, 0.1, "parametric_precision");
SpinBox_AspectRatio->SetValue(1.1);
GroupArguments->show();
//
#include "SMESHGUI_SpinBox.h"
+#include <SUIT_Session.h>
+#include <SUIT_ResourceMgr.h>
+
// Qt includes
-#include <QDoubleValidator>
#include <QLineEdit>
+#include <QVariant>
//=================================================================================
// class : SMESHGUI_SpinBox()
return SalomeApp_DoubleSpinBox::lineEdit();
}
-//=================================================================================
-// function : validator()
-// purpose : returns validator
-//=================================================================================
-QDoubleValidator* SMESHGUI_SpinBox::validator() const
-{
- return (QDoubleValidator*)editor()->validator();
-}
-
//=================================================================================
// function : RangeStepAndValidator()
// purpose :
void SMESHGUI_SpinBox::RangeStepAndValidator( double min,
double max,
double step,
- unsigned short precision )
+ const char* quantity )
{
- setPrecision(precision*(-1)); // PAL8769. Minus is for using 'g' double->string conversion specifier,
- // see QtxDoubleSpinBox::mapValueToText( double v )
- setDecimals(32);
+ // Obtain precision from preferences
+ SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
+ int precision = resMgr->integerValue( "SMESH", quantity, -3 );
+
+ setPrecision(precision); // PAL8769. Minus is for using 'g' double->string conversion specifier,
+ // see QtxDoubleSpinBox::mapValueToText( double v )
+ // san: this can be achieved using preferences
+ setDecimals(qAbs(precision));
setRange(min, max);
setSingleStep( step );
setDefaultValue( min );
+
+ // Add a hint for the user saying how to tune precision
+ QString userPropName = QObject::tr( QString( "SMESH_PREF_%1" ).arg( quantity ).toLatin1().constData() );
+ setProperty( "validity_tune_hint",
+ QVariant( QObject::tr( "SMESH_PRECISION_HINT" ).arg( userPropName ) ) );
}
void RangeStepAndValidator( double = -1000000.0,
double = +1000000.0,
double = 100.0,
- unsigned short = 3 );
+ const char* = "length_precision" );
void SetValue( double );
double GetValue() const;
QString GetString() const;
QLineEdit* editor() const;
- QDoubleValidator* validator() const;
public slots:
void SetStep( double );
SMESHGUI_SymmetryDlgLayout->addWidget(GroupButtons);
/* Initialisations */
- SpinBox_X->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- SpinBox_Y->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- SpinBox_Z->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
+ SpinBox_X->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_Y->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_Z->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
RadioButton1->setChecked(true);
SMESHGUI_TranslationDlgLayout->addWidget(GroupButtons);
/* Initialisations */
- SpinBox1_1->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
- SpinBox1_2->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
- SpinBox1_3->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
- SpinBox2_1->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
- SpinBox2_2->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
- SpinBox2_3->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
+ SpinBox1_1->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox1_2->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox1_3->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox2_1->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox2_2->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox2_3->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
RadioButton1->setChecked(true);
<source>NO_MESH_SELECTED</source>
<translation>No mesh selected</translation>
</message>
+ <message>
+ <source>SMESH_PREF_def_precision</source>
+ <translation>Default precision</translation>
+ </message>
+ <message>
+ <source>SMESH_PREF_length_precision</source>
+ <translation>Length precision</translation>
+ </message>
+ <message>
+ <source>SMESH_PREF_angle_precision</source>
+ <translation>Angular precision</translation>
+ </message>
+ <message>
+ <source>SMESH_PREF_len_tol_precision</source>
+ <translation>Length tolerance precision</translation>
+ </message>
+ <message>
+ <source>SMESH_PREF_parametric_precision</source>
+ <translation>Parametric precision</translation>
+ </message>
+ <message>
+ <source>SMESH_PREF_area_precision</source>
+ <translation>Area precision</translation>
+ </message>
+ <message>
+ <source>SMESH_PREF_vol_precision</source>
+ <translation>Volume precision</translation>
+ </message>
+ <message>
+ <source>SMESH_PRECISION_HINT</source>
+ <translation>
+Input value precision can be adjusted using
+'%1' parameter in Mesh module preferences.</translation>
+ </message>
</context>
<context>
<name>SMESHGUI</name>
<source>PREF_NOTIFY_MODE</source>
<translation>Show a computation result notification</translation>
</message>
+ <message>
+ <source>SMESH_PREF_GROUP_PRECISION</source>
+ <translation>Input fields precision</translation>
+ </message>
<message>
<source>PREF_GROUP_ELEMENTS</source>
<translation>Elements</translation>
<translation>No concurent submeshes detected</translation>
</message>
</context>
+ <context>
+ <name>SMESHGUI_ClippingDlg</name>
+ <message>
+ <source>CLIP_PLANES</source>
+ <translation>Clipping planes</translation>
+ </message>
+ <message>
+ <source>ROTATION_AROUND_X_Y2Z</source>
+ <translation>Rotation around X (Y to Z):</translation>
+ </message>
+ <message>
+ <source>ROTATION_AROUND_Y_X2Z</source>
+ <translation>Rotation around Y (X to Z):</translation>
+ </message>
+ <message>
+ <source>ROTATION_AROUND_Z_Y2X</source>
+ <translation>Rotation around Z (Y to X):</translation>
+ </message>
+ <message>
+ <source>ROTATION_AROUND_X_Z2Y</source>
+ <translation>Rotation around X (Z to Y):</translation>
+ </message>
+ <message>
+ <source>ROTATION_AROUND_Y_Z2X</source>
+ <translation>Rotation around Y (Z to X):</translation>
+ </message>
+ <message>
+ <source>ROTATION_AROUND_Z_X2Y</source>
+ <translation>Rotation around Z (X to Y):</translation>
+ </message>
+ <message>
+ <source>SHOW_PREVIEW</source>
+ <translation>Show preview</translation>
+ </message>
+ <message>
+ <source>AUTO_APPLY</source>
+ <translation>Auto Apply</translation>
+ </message>
+ <message>
+ <source>ALONG_XY</source>
+ <translation>|| X-Y</translation>
+ </message>
+ <message>
+ <source>ALONG_YZ</source>
+ <translation>|| Y-Z</translation>
+ </message>
+ <message>
+ <source>ALONG_ZX</source>
+ <translation>|| Z-X</translation>
+ </message>
+ <message>
+ <source>PLANE_NUM</source>
+ <translation>Plane# %1</translation>
+ </message>
+ <message>
+ <source>NO_PLANES</source>
+ <translation>No planes</translation>
+ </message>
+ </context>
</TS>
//
#include "StdMeshersGUI_DistrTable.h"
+#include <SMESHGUI_SpinBox.h>
+
// Qt incldues
#include <QItemDelegate>
#include <QTableWidget>
-#include <QDoubleSpinBox>
#include <QPushButton>
#include <QVBoxLayout>
#include <QHBoxLayout>
struct EditorData
{
int r, c;
- QDoubleSpinBox* sb;
+ SMESHGUI_SpinBox* sb;
EditorData() { reset(); }
void reset() { r = -1; c = -1; sb = 0; }
};
void addRow();
void deleteRow();
- void setEditor( int, int, QDoubleSpinBox* );
+ void setEditor( int, int, SMESHGUI_SpinBox* );
protected:
void closeEditor( QWidget*, QAbstractItemDelegate::EndEditHint );
const QStyleOptionViewItem& /*option*/,
const QModelIndex& index ) const
{
- QDoubleSpinBox* sb = new QDoubleSpinBox( parent );
- sb->setFrame(false);
- sb->setMinimum( index.column() == StdMeshersGUI_DistrTableFrame::ArgColumn ?
+ SMESHGUI_SpinBox* sb = new SMESHGUI_SpinBox( parent );
+
+ sb->setAcceptNames(false); // No Notebook variables allowed
+ double aMin = index.column() == StdMeshersGUI_DistrTableFrame::ArgColumn ?
myTable->argMinimum( index.row() ) :
- myTable->funcMinimum( index.row() ) );
- sb->setMaximum( index.column() == StdMeshersGUI_DistrTableFrame::ArgColumn ?
+ myTable->funcMinimum( index.row() );
+ double aMax = index.column() == StdMeshersGUI_DistrTableFrame::ArgColumn ?
myTable->argMaximum( index.row() ) :
- myTable->funcMaximum( index.row() ) );
- sb->setSingleStep( index.column() == StdMeshersGUI_DistrTableFrame::ArgColumn ?
+ myTable->funcMaximum( index.row() );
+ double aStep = index.column() == StdMeshersGUI_DistrTableFrame::ArgColumn ?
myTable->argStep( index.row() ) :
- myTable->funcStep( index.row() ) );
- myTable->setEditor( index.row(), index.column(), sb );
+ myTable->funcStep( index.row() );
+ sb->RangeStepAndValidator( aMin, aMax, aStep, "parametric_precision" );
+ sb->setFrame(false);
+
+ myTable->setEditor( index.row(), index.column(), sb );
return sb;
}
setEditorData( QWidget* editor, const QModelIndex& index ) const
{
QString value = index.model()->data(index, Qt::DisplayRole).toString();
- QDoubleSpinBox* sb = static_cast<QDoubleSpinBox*>(editor);
+ SMESHGUI_SpinBox* sb = static_cast<SMESHGUI_SpinBox*>(editor);
bool bOk = false;
double v = value.toDouble( &bOk );
setModelData( QWidget* editor, QAbstractItemModel* model,
const QModelIndex& index ) const
{
- QDoubleSpinBox* sb = static_cast<QDoubleSpinBox*>(editor);
+ SMESHGUI_SpinBox* sb = static_cast<SMESHGUI_SpinBox*>(editor);
model->setData( index, QString::number( sb->value() ), Qt::DisplayRole );
}
void
StdMeshersGUI_DistrTableFrame::Table::
-setEditor( int r, int c, QDoubleSpinBox* sb )
+setEditor( int r, int c, SMESHGUI_SpinBox* sb )
{
myEditorData.r = r;
myEditorData.c = c;
//
#include "StdMeshersGUI_FixedPointsParamWdg.h"
-#include <QtxIntSpinBox.h>
-#include <QtxDoubleSpinBox.h>
+#include <SMESHGUI_SpinBox.h>
+
+#include <SalomeApp_IntSpinBox.h>
// Qt includes
#include <QPushButton>
{
QWidget* w = 0;
if ( (index.column() == 1 ) ) {
- QtxIntSpinBox* sb = new QtxIntSpinBox( parent );
+ SalomeApp_IntSpinBox* sb = new SalomeApp_IntSpinBox( parent );
+ sb->setAcceptNames( false ); // No Notebook variables allowed
sb->setFrame( false );
sb->setRange( 1, 999);
w = sb;
QAbstractItemModel* model,
const QModelIndex& index ) const
{
- model->setData( index, qobject_cast<QtxIntSpinBox*>( editor )->value(), Qt::EditRole );
- model->setData( index, qobject_cast<QtxIntSpinBox*>( editor )->value(), Qt::UserRole );
+ model->setData( index, qobject_cast<SalomeApp_IntSpinBox*>( editor )->value(), Qt::EditRole );
+ model->setData( index, qobject_cast<SalomeApp_IntSpinBox*>( editor )->value(), Qt::UserRole );
}
//================================================================================
myListWidget = new QListWidget( this );
myTreeWidget = new QTreeWidget( this );
- mySpinBox = new QtxDoubleSpinBox( this );
+ mySpinBox = new SMESHGUI_SpinBox( this );
myAddButton = new QPushButton( tr( "SMESH_BUT_ADD" ), this );
myRemoveButton = new QPushButton( tr( "SMESH_BUT_REMOVE" ), this );
mySameValues = new QCheckBox( tr("SMESH_SAME_NB_SEGMENTS"), this);
myListWidget->setMinimumWidth( 80 );
myTreeWidget->setMinimumWidth( 200 );
- mySpinBox->setRange( 0, 1 );
- mySpinBox->setSingleStep( 0.1 );
- mySpinBox->setDecimals( 4 );
- mySpinBox->setPrecision( 4 );
+ mySpinBox->setAcceptNames( false ); // No Notebook variables allowed
+ mySpinBox->RangeStepAndValidator( 0., 1., .1, "parametric_precision" );
myListWidget->setMinimumWidth( 70 );
connect( myAddButton, SIGNAL( clicked() ), SLOT( onAdd() ) );
#include <QStringList>
class SMESHGUI;
-class QtxDoubleSpinBox;
+class SMESHGUI_SpinBox;
class QPushButton;
class QLineEdit;
class QCheckBox;
private:
QListWidget* myListWidget;
QTreeWidget* myTreeWidget;
- QtxDoubleSpinBox* mySpinBox;
+ SMESHGUI_SpinBox* mySpinBox;
QPushButton* myAddButton;
QPushButton* myRemoveButton;
QCheckBox* mySameValues;
// 3) scale
myGroupLayout->addWidget( myLScale = new QLabel( tr( "SMESH_NB_SEGMENTS_SCALE_PARAM" ), GroupC1 ), row, 0 );
myScale = new SMESHGUI_SpinBox( GroupC1 );
- myScale->RangeStepAndValidator( 1E-5, 1E+5, 0.1, 6 );
+ myScale->RangeStepAndValidator( 1E-5, 1E+5, 0.1, "parametric_precision" );
myGroupLayout->addWidget( myScale, row, 1 );
row++;
if( hypType()=="LocalLength" && sb )
{
if (sb->objectName() == tr("SMESH_LOCAL_LENGTH_PARAM"))
- sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, 6 );
+ sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, "length_precision" );
else if (sb->objectName() == tr("SMESH_LOCAL_LENGTH_PRECISION"))
- sb->RangeStepAndValidator( 0.0, 1.0, 0.05, 7 );
+ sb->RangeStepAndValidator( 0.0, 1.0, 0.05, "len_tol_precision" );
}
else if( hypType()=="Arithmetic1D" && sb )
{
- sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, 6 );
+ sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, "parametric_precision" );
}
else if( hypType()=="MaxLength" && sb )
{
- sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, 6 );
+ sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, "length_precision" );
sb->setEnabled( !widget< QCheckBox >( 1 )->isChecked() );
}
else if( hypType()=="MaxElementArea" && sb )
{
- sb->RangeStepAndValidator( VALUE_SMALL_2, VALUE_MAX_2, 1.0, 6 );
+ sb->RangeStepAndValidator( VALUE_SMALL_2, VALUE_MAX_2, 1.0, "area_precision" );
}
else if( hypType()=="MaxElementVolume" && sb )
{
- sb->RangeStepAndValidator( VALUE_SMALL_3, VALUE_MAX_3, 1.0, 6 );
+ sb->RangeStepAndValidator( VALUE_SMALL_3, VALUE_MAX_3, 1.0, "vol_precision" );
}
else if( hypType()=="StartEndLength" && sb )
{
- sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, 6 );
+ sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, "length_precision" );
}
else if( hypType()=="Deflection1D" && sb )
{
- sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, 6 );
+ sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, "parametric_precision" );
}
else if ( sb ) // default validator for possible ancestors
{
- sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, 6 );
+ sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, "length_precision" );
}
}