#include <SMESHGUI_SpinBox.h>

Public Slots | |
| void | SetStep (double) |
Public Member Functions | |
| SMESHGUI_SpinBox (QWidget *) | |
| ~SMESHGUI_SpinBox () | |
| void | RangeStepAndValidator (double=-1000000.0, double=+1000000.0, double=100.0, const char *="length_precision") |
| void | SetValue (double) |
| double | GetValue () const |
| QString | GetString () const |
| QLineEdit * | editor () const |
Definition at line 47 of file SMESHGUI_SpinBox.h.
| SMESHGUI_SpinBox::SMESHGUI_SpinBox | ( | QWidget * | parent | ) |
Definition at line 41 of file SMESHGUI_SpinBox.cxx.
: SalomeApp_DoubleSpinBox( parent ) { }
| SMESHGUI_SpinBox::~SMESHGUI_SpinBox | ( | ) |
Definition at line 50 of file SMESHGUI_SpinBox.cxx.
{
}
| QLineEdit * SMESHGUI_SpinBox::editor | ( | ) | const |
Definition at line 95 of file SMESHGUI_SpinBox.cxx.
Referenced by SMESHGUI_ExtrusionAlongPathDlg.eventFilter(), SetValue(), and SMESHGUI_ExtrusionAlongPathDlg.SMESHGUI_ExtrusionAlongPathDlg().
{
return SalomeApp_DoubleSpinBox::lineEdit();
}
| QString SMESHGUI_SpinBox::GetString | ( | ) | const |
Definition at line 86 of file SMESHGUI_SpinBox.cxx.
{
return cleanText();
}
| double SMESHGUI_SpinBox::GetValue | ( | ) | const |
Definition at line 77 of file SMESHGUI_SpinBox.cxx.
Referenced by SMESHGUI_TranslationDlg.ClickOnApply(), SMESHGUI_SmoothingDlg.ClickOnApply(), SMESHGUI_RotationDlg.ClickOnApply(), SMESHGUI_RevolutionDlg.ClickOnApply(), SMESHGUI_NodesDlg.ClickOnApply(), SMESHGUI_ExtrusionAlongPathDlg.ClickOnApply(), SMESHGUI_BuildCompoundDlg.ClickOnApply(), SMESHGUI_ClippingDlg.getDistance(), SMESHGUI_ExtrusionDlg.getExtrusionVector(), SMESHGUI_SymmetryDlg.getMirror(), StdMeshersGUI_StdHypothesisCreator.getParamFromCustomWidget(), SMESHGUI_ClippingDlg.getRotation1(), SMESHGUI_ClippingDlg.getRotation2(), SMESHGUI_ScaleDlg.getScale(), SMESHGUI_RotationDlg.IsAxisOk(), SMESHGUI_RevolutionDlg.IsAxisOk(), SMESHGUI_SymmetryDlg.IsMirrorOk(), SMESHGUI_ExtrusionDlg.isValuesValid(), SMESHGUI_ExtrusionAlongPathDlg.OnAngleAdded(), SMESHGUI_MoveNodesDlg.onApply(), SMESHGUI_MakeNodeAtPointOp.onApply(), SMESHGUI_MergeDlg.onDetect(), SMESHGUI_TranslationDlg.onDisplaySimulation(), SMESHGUI_RotationDlg.onDisplaySimulation(), SMESHGUI_RevolutionDlg.onDisplaySimulation(), SMESHGUI_ExtrusionAlongPathDlg.onDisplaySimulation(), SMESHGUI_FindElemByPointOp.onFind(), SMESHGUI_MakeNodeAtPointOp.onSelectionDone(), SMESHGUI_UnionOfTrianglesDlg.process(), SMESHGUI_MoveNodesDlg.redisplayPreview(), SMESHGUI_MakeNodeAtPointOp.redisplayPreview(), SMESHGUI_FindElemByPointOp.redisplayPreview(), SMESHGUI_SymmetryDlg.SelectionIntoArgument(), SMESHGUI_RotationDlg.SelectionIntoArgument(), SMESHGUI_RevolutionDlg.SelectionIntoArgument(), SMESHGUI_NodesDlg.SelectionIntoArgument(), SMESHGUI_FilterTable.AdditionalWidget.SetPrecision(), SMESHGUI_FindElemByPointOp.SMESHGUI_FindElemByPointOp(), and SMESHGUI_NodesDlg.ValueChangedInSpinBox().
{
return value();
}
| void SMESHGUI_SpinBox::RangeStepAndValidator | ( | double | min = -1000000.0, |
| double | max = +1000000.0, |
||
| double | step = 100.0, |
||
| const char * | quantity = "length_precision" |
||
| ) |
Definition at line 104 of file SMESHGUI_SpinBox.cxx.
Referenced by SMESHGUI_FilterTable.AdditionalWidget.AdditionalWidget(), StdMeshersGUI_StdHypothesisCreator.attuneStdWidget(), StdMeshersGUI_NbSegmentsCreator.buildFrame(), StdMeshersGUI_DistrTableFrame.SpinBoxDelegate.createEditor(), SMESHGUI_MoveNodesDlg.createMainFrame(), SMESHGUI_MakeNodeAtPointDlg.createMainFrame(), SMESHGUI_FindElemByPointDlg.createMainFrame(), SMESHGUI_NodesDlg.Init(), SMESHGUI_MergeDlg.Init(), SMESHGUI_FilterTable.AdditionalWidget.SetPrecision(), SMESHGUI_BuildCompoundDlg.SMESHGUI_BuildCompoundDlg(), SMESHGUI_ClippingDlg.SMESHGUI_ClippingDlg(), SMESHGUI_ExtrusionAlongPathDlg.SMESHGUI_ExtrusionAlongPathDlg(), SMESHGUI_ExtrusionDlg.SMESHGUI_ExtrusionDlg(), SMESHGUI_Preferences_ColorDlg.SMESHGUI_Preferences_ColorDlg(), SMESHGUI_Preferences_ScalarBarDlg.SMESHGUI_Preferences_ScalarBarDlg(), SMESHGUI_RevolutionDlg.SMESHGUI_RevolutionDlg(), SMESHGUI_RotationDlg.SMESHGUI_RotationDlg(), SMESHGUI_ScaleDlg.SMESHGUI_ScaleDlg(), SMESHGUI_SmoothingDlg.SMESHGUI_SmoothingDlg(), SMESHGUI_SymmetryDlg.SMESHGUI_SymmetryDlg(), SMESHGUI_TranslationDlg.SMESHGUI_TranslationDlg(), StdMeshersGUI_FixedPointsParamWdg.StdMeshersGUI_FixedPointsParamWdg(), and StdMeshersGUI_StdHypothesisCreator.stdParams().
{
// 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( 20 ); // 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 SMESHGUI_SpinBox::SetStep | ( | double | newStep | ) | [slot] |
Definition at line 58 of file SMESHGUI_SpinBox.cxx.
Referenced by SMESHGUI_ScaleDlg.SMESHGUI_ScaleDlg().
{
setSingleStep( newStep );
}
| void SMESHGUI_SpinBox::SetValue | ( | double | v | ) |
Definition at line 67 of file SMESHGUI_SpinBox.cxx.
References editor().
Referenced by SMESHGUI_MakeNodeAtPointDlg.ButtonToggled(), SMESHGUI_FindElemByPointDlg.createMainFrame(), SMESHGUI_TranslationDlg.Init(), SMESHGUI_SymmetryDlg.Init(), SMESHGUI_ScaleDlg.Init(), SMESHGUI_RotationDlg.Init(), SMESHGUI_RevolutionDlg.Init(), SMESHGUI_NodesDlg.Init(), SMESHGUI_MergeDlg.Init(), SMESHGUI_ExtrusionDlg.Init(), SMESHGUI_ExtrusionAlongPathDlg.Init(), SMESHGUI_BuildCompoundDlg.Init(), SMESHGUI_MakeNodeAtPointOp.onApply(), SMESHGUI_MoveNodesDlg.onSelectionDone(), SMESHGUI_MakeNodeAtPointOp.onSelectionDone(), SMESHGUI_BuildCompoundDlg.onSelectMerge(), SMESHGUI_MakeNodeAtPointOp.redisplayPreview(), SMESHGUI_MoveNodesDlg.reset(), SMESHGUI_TranslationDlg.SelectionIntoArgument(), SMESHGUI_SymmetryDlg.SelectionIntoArgument(), SMESHGUI_ScaleDlg.SelectionIntoArgument(), SMESHGUI_RotationDlg.SelectionIntoArgument(), SMESHGUI_RevolutionDlg.SelectionIntoArgument(), SMESHGUI_NodesDlg.SelectionIntoArgument(), SMESHGUI_ExtrusionDlg.SelectionIntoArgument(), SMESHGUI_ExtrusionAlongPathDlg.SelectionIntoArgument(), SMESHGUI_ClippingDlg.setDistance(), SMESHGUI_FilterTable.AdditionalWidget.SetPrecision(), SMESHGUI_ClippingDlg.setRotation(), SMESHGUI_ClippingDlg.SMESHGUI_ClippingDlg(), SMESHGUI_SmoothingDlg.SMESHGUI_SmoothingDlg(), SMESHGUI_MakeNodeAtPointOp.startOperation(), StdMeshersGUI_StdHypothesisCreator.stdParams(), and SMESHGUI_ClippingDlg.synchronize().
{
setValue(valueFromText(textFromValue(v)));
editor()->setCursorPosition( 0 );
}