2 // File : SMESHGUI_SpinBox.cxx
3 // Created : 14 august 2002
4 // Author : Lucien PIGNOLONI
7 // Copyright : OPEN CASCADE
10 #include "SMESHGUI_SpinBox.h"
12 #include <qvalidator.h>
14 //=================================================================================
15 // class : SMESHGUI_SpinBox()
16 // purpose : constructor of specific widget accepting floats in double precision.
17 //=================================================================================
18 SMESHGUI_SpinBox::SMESHGUI_SpinBox( QWidget* parent, const char* name )
19 : QAD_SpinBoxDbl( parent, name)
24 //=================================================================================
25 // function : SetStep() [SLOT]
27 //=================================================================================
28 void SMESHGUI_SpinBox::SetStep( double newStep )
30 setLineStep( newStep );
33 //=================================================================================
34 // function : ~SMESHGUI_SpinBox()
35 // purpose : destructor
36 //=================================================================================
37 SMESHGUI_SpinBox::~SMESHGUI_SpinBox()
41 //=================================================================================
42 // function : SetValue()
44 //=================================================================================
45 void SMESHGUI_SpinBox::SetValue( double v )
50 //=================================================================================
51 // function : GetValue()
52 // purpose : returns a double
53 //=================================================================================
54 double SMESHGUI_SpinBox::GetValue( )
59 //=================================================================================
60 // function : GetString()
61 // purpose : returns a QString
62 //=================================================================================
63 QString SMESHGUI_SpinBox::GetString( )
68 //=================================================================================
69 // function : RangeStepAndValidator()
71 //=================================================================================
72 void SMESHGUI_SpinBox::RangeStepAndValidator( double min, double max, double step, unsigned short decimals )
76 ( ( QDoubleValidator* )validator() )->setRange( min, max, decimals ) ;