Salome HOME
Add support for tetra, pyramid and prism
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_aParameterDlg.h
1 //  SMESH SMESHGUI : GUI for SMESH component
2 //
3 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
5 // 
6 //  This library is free software; you can redistribute it and/or 
7 //  modify it under the terms of the GNU Lesser General Public 
8 //  License as published by the Free Software Foundation; either 
9 //  version 2.1 of the License. 
10 // 
11 //  This library is distributed in the hope that it will be useful, 
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
14 //  Lesser General Public License for more details. 
15 // 
16 //  You should have received a copy of the GNU Lesser General Public 
17 //  License along with this library; if not, write to the Free Software 
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
19 // 
20 //  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
21 //
22 //
23 //
24 //  File   : SMESHGUI_aParameterDlg.h
25 //  Author : Nicolas REJNERI
26 //  Module : SMESH
27 //  $Header$
28
29 #ifndef SMESHGUI_aParameterDlg_H
30 #define SMESHGUI_aParameterDlg_H
31
32 // QT Includes
33 #include <qdialog.h>
34
35 class QLabel;
36 class QPushButton;
37 class QSpinBox;
38 class SMESHGUI;
39 class QAD_SpinBoxDbl;
40
41 //=================================================================================
42 // class    : SMESHGUI_aParameterDlg
43 // purpose  :
44 //=================================================================================
45 class SMESHGUI_aParameterDlg : public QDialog
46
47     Q_OBJECT
48
49 public:
50     SMESHGUI_aParameterDlg( QWidget*     parent   = 0,
51                             QString      title    = QString::null,
52                             QString      label    = QString::null,
53                             const double bottom   = -1E6,
54                             const double top      = +1E6,
55                             const int    decimals = 3,
56                             bool         modal    = TRUE );
57     SMESHGUI_aParameterDlg( QWidget*     parent   = 0,
58                             QString      title    = QString::null,
59                             QString      label    = QString::null,
60                             const int    bottom   = 0,
61                             const int    top      = 1000,
62                             bool         modal    = TRUE );
63
64     ~SMESHGUI_aParameterDlg();
65
66     void   setValue( const double val );
67     void   setValue( const int    val );
68     double getDblValue();
69     int    getIntValue();
70
71 protected:
72     void init( bool isDouble );
73
74 private:
75     SMESHGUI*       mySMESHGUI ;
76
77     QPushButton*    myButtonOk;
78     QPushButton*    myButtonCancel;
79     QLabel*         myTextLabel;
80     QSpinBox*       myIntSpin;
81     QAD_SpinBoxDbl* myDblSpin;
82 };
83
84 #endif // SMESHGUI_aParameterDlg.h