Salome HOME
Update copyright information
[modules/smesh.git] / src / StdMeshersGUI / StdMeshersGUI_LayerDistributionParamWdg.h
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  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.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 // File   : StdMeshersGUI_LayerDistributionParamWdg.h
23 // Author : Open CASCADE S.A.S.
24 //
25 #ifndef STDMESHERSGUI_LAYERDISTRIBUTIONPARAMWGD_H
26 #define STDMESHERSGUI_LAYERDISTRIBUTIONPARAMWGD_H
27
28 // SMESH includes
29 #include "SMESH_StdMeshersGUI.hxx"
30
31 // Qt includes
32 #include <QWidget>
33 #include <QStringList>
34
35 // IDL includes
36 #include <SALOMEconfig.h>
37 #include CORBA_SERVER_HEADER(SMESH_Hypothesis)
38
39 class SMESHGUI;
40 class QPushButton;
41 class QMenu;
42 class QAction;
43 class QDialog;
44
45 /*!
46  *  \brief Widget controlling hypothesis parameter that is another hypothesis
47  */
48 class STDMESHERSGUI_EXPORT StdMeshersGUI_LayerDistributionParamWdg : public QWidget
49 {
50   Q_OBJECT
51
52 public:
53   StdMeshersGUI_LayerDistributionParamWdg(SMESH::SMESH_Hypothesis_ptr,
54                                           const QString&,
55                                           QDialog*);
56   ~StdMeshersGUI_LayerDistributionParamWdg();
57
58   SMESH::SMESH_Hypothesis_var GetHypothesis() { return myHyp; }
59
60   QString GetValue() const { return myParamValue; }
61
62   bool IsOk() const { return !myHyp->_is_nil(); }
63
64 private slots:
65   void onCreate(); 
66   void onEdit(); 
67   void onHypTypePopup( QAction* );
68
69 private:
70   void init();
71   void set(SMESH::SMESH_Hypothesis_ptr);
72   
73 private:
74  SMESH::SMESH_Hypothesis_var myHyp;
75  SMESHGUI*                   mySMESHGUI;
76
77  QPushButton*           myCreateButton;
78  QPushButton*           myEditButton;
79  QMenu*                 myHypTypePopup;
80  QDialog*               myDlg;
81  QString                myName;
82  QString                myParamValue;
83
84  QStringList            myHypTypes;
85 };
86
87 #endif // STDMESHERSGUI_LAYERDISTRIBUTIONPARAMWGD_H