-//======================================================================================
-// function : SMESHGUI_aParameterDlg()
-// purpose : Constructs a SMESHGUI_aParametertDlg for double values
-//
-// parent : parent widget
-// title : is the title for the user in dialog box
-// label : text label for the value
-//
-// bottom : the minimal value to be entered
-// top : the maximum value to be entered
-// decimals : number of decimals to be entered
-//
-// The dialog will by default be modal, unless you set 'modal' to
-// false when constructing dialog
-//
-//======================================================================================
-SMESHGUI_aParameterDlg::SMESHGUI_aParameterDlg( QWidget* parent,
- QString title,
- QString label,
- const double bottom,
- const double top,
- const int decimals,
- bool modal )
-: QDialog( parent, "MyParameterDialog", modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ),
- myIntSpin( 0 ), myDblSpin( 0 )
-{
- /* creating widgets */
- init( true );
- /* title */
- setCaption( title );
- /* caption */
- myTextLabel->setText( label );
- /* range */
- myDblSpin->setRange( bottom, top );
- ((QDoubleValidator*)(myDblSpin->validator()))->setRange( bottom, top, decimals );
-
- /* Move widget on the botton right corner of main widget */
- QAD_Tools::centerWidget( this, parent );
-}