1 // SALOME SALOMEGUI : implementation of desktop and GUI kernel
3 // Copyright (C) 2003 CEA/DEN, EDF R&D
7 // File : SALOMEGUI_SetValueDlg.h
8 // Author : Vadim SANDLER
12 #ifndef SALOMEGUI_SETVALUEDLG_H
13 #define SALOMEGUI_SETVALUEDLG_H
22 //=================================================================================
23 // class : SALOMEGUI_SetValueDlg
24 // purpose : Common dialog box for setting integer, double and string values
25 //=================================================================================
26 class SALOMEGUI_SetValueDlg : public QDialog
29 static QString getString ( const QString& caption,
31 const QString& oldValue = QString::null,
33 QWidget* parent = 0 );
34 static int getInteger( const QString& caption,
36 const int oldValue = 0,
38 QWidget* parent = 0 );
39 static int getInteger( const QString& caption,
43 const int oldValue = 0,
45 QWidget* parent = 0 );
46 static double getDouble ( const QString& caption,
48 const double oldValue = 0.0,
50 QWidget* parent = 0 );
55 SALOMEGUI_SetValueDlg( QWidget* parent = 0 );
56 ~SALOMEGUI_SetValueDlg();
58 void setValue( const QString& value );
60 void setValidator( QValidator* v );
61 void setLabel( const QString& label );
65 QLineEdit* myLineEdit;
66 QPushButton* myButtonOk;
67 QPushButton* myButtonCancel;
70 #endif // SALOMEGUI_SETVALUEDLG_H