]> SALOME platform Git repositories - plugins/blsurfplugin.git/blob - src/GUI/BLSURFPluginGUI_HypothesisCreator.h
Salome HOME
Merge from BR_V5_DEV 17Feb09
[plugins/blsurfplugin.git] / src / GUI / BLSURFPluginGUI_HypothesisCreator.h
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D
2 //
3 //  This library is free software; you can redistribute it and/or
4 //  modify it under the terms of the GNU Lesser General Public
5 //  License as published by the Free Software Foundation; either
6 //  version 2.1 of the License.
7 //
8 //  This library is distributed in the hope that it will be useful,
9 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
10 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 //  Lesser General Public License for more details.
12 //
13 //  You should have received a copy of the GNU Lesser General Public
14 //  License along with this library; if not, write to the Free Software
15 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 // ---
20 // File    : BLSURFPluginGUI_HypothesisCreator.h
21 // Authors : Francis KLOSS (OCC) & Patrick LAUG (INRIA) & Lioka RAZAFINDRAZAKA (CEA)
22 //           & Aurelien ALLEAUME (DISTENE)
23 // ---
24 //
25 #ifndef BLSURFPLUGINGUI_HypothesisCreator_H
26 #define BLSURFPLUGINGUI_HypothesisCreator_H
27
28 #ifdef WIN32
29   #ifdef BLSURFPLUGIN_GUI_EXPORTS
30     #define BLSURFPLUGIN_GUI_EXPORT __declspec( dllexport )
31   #else
32     #define BLSURFPLUGIN_GUI_EXPORT __declspec( dllimport )
33   #endif
34 #else
35   #define BLSURFPLUGIN_GUI_EXPORT
36 #endif
37
38 #include <SMESHGUI_Hypotheses.h>
39 #include <SALOMEconfig.h>
40 #include CORBA_SERVER_HEADER(BLSURFPlugin_Algorithm)
41
42 class QGroupBox;
43 class QtxDoubleSpinBox;
44 class QComboBox;
45 class QCheckBox;
46 class QLineEdit;
47 class QTableWidget;
48 class QSpinBox;
49 class QMenu;
50 class QAction;
51
52 typedef struct
53 {
54   int     myTopology, myVerbosity;
55   int     myPhysicalMesh, myGeometricMesh;
56   double  myAngleMeshS, myAngleMeshC, myGradation;
57   QString myPhySize, myGeoMin, myGeoMax, myPhyMin, myPhyMax;
58   bool    myAllowQuadrangles, myDecimesh;
59   QString myName;
60
61 } BlsurfHypothesisData;
62
63 /*!
64  * \brief Class for creation of BLSURF hypotheses
65 */
66 class BLSURFPLUGIN_GUI_EXPORT BLSURFPluginGUI_HypothesisCreator : public SMESHGUI_GenericHypothesisCreator
67 {
68   Q_OBJECT
69
70 public:
71   BLSURFPluginGUI_HypothesisCreator( const QString& );
72   virtual ~BLSURFPluginGUI_HypothesisCreator();
73
74   virtual bool     checkParams() const;
75   virtual QString  helpPage() const;
76
77 protected:
78   virtual QFrame*  buildFrame    ();
79   virtual void     retrieveParams() const;
80   virtual QString  storeParams   () const;
81   
82   virtual QString  caption() const;
83   virtual QPixmap  icon() const;
84   virtual QString  type() const;
85
86 protected slots:
87   void             onPhysicalMeshChanged();
88   void             onGeometricMeshChanged();
89   void             onAddOption();
90   void             onDeleteOption();
91   void             onOptionChosenInPopup( QAction* );
92
93 private:
94   bool             readParamsFromHypo( BlsurfHypothesisData& ) const;
95   QString          readParamsFromWidgets( BlsurfHypothesisData& ) const;
96   bool             storeParamsToHypo( const BlsurfHypothesisData& ) const;
97
98 private:
99   QWidget*            myStdGroup;
100   QLineEdit*          myName;
101   QComboBox*          myPhysicalMesh;
102   QLineEdit*          myPhySize;
103   QLineEdit*          myPhyMin;
104   QLineEdit*          myPhyMax;
105   QComboBox*          myGeometricMesh;
106   QtxDoubleSpinBox*   myAngleMeshS;
107   QtxDoubleSpinBox*   myAngleMeshC;
108   QLineEdit*          myGeoMin;
109   QLineEdit*          myGeoMax;
110   QtxDoubleSpinBox*   myGradation;
111   QCheckBox*          myAllowQuadrangles;
112   QCheckBox*          myDecimesh;
113
114   QWidget*            myAdvGroup;
115   QComboBox*          myTopology;
116   QSpinBox*           myVerbosity;
117   QTableWidget*       myOptionTable;
118
119   BLSURFPlugin::string_array_var myOptions;
120 };
121
122 #endif // BLSURFPLUGINGUI_HypothesisCreator_H