]> SALOME platform Git repositories - plugins/blsurfplugin.git/blob - src/GUI/BLSURFPluginGUI_HypothesisCreator.h
Salome HOME
catch exceptions in BLSURF, report errors to GUI
[plugins/blsurfplugin.git] / src / GUI / BLSURFPluginGUI_HypothesisCreator.h
1 //  BLSURFPlugin GUI: GUI for plugged-in mesher BLSURFPlugin
2 //
3 //  Copyright (C) 2003  CEA
4 // 
5 //  This library is free software; you can redistribute it and/or 
6 //  modify it under the terms of the GNU Lesser General Public 
7 //  License as published by the Free Software Foundation; either 
8 //  version 2.1 of the License. 
9 // 
10 //  This library is distributed in the hope that it will be useful, 
11 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
12 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
13 //  Lesser General Public License for more details. 
14 // 
15 //  You should have received a copy of the GNU Lesser General Public 
16 //  License along with this library; if not, write to the Free Software 
17 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
18 // 
19 //  See http://www.salome-platform.org or email : webmaster.salome@opencascade.org
20 //
21 //
22 //
23 //  File   : BLSURFPluginGUI_HypothesisCreator.h
24 // Authors : Francis KLOSS (OCC) & Patrick LAUG (INRIA) & Lioka RAZAFINDRAZAKA (CEA)
25 //           & Aurelien ALLEAUME (DISTENE)
26 //  Module : BLSURFPlugin
27 //  $Header: 
28
29 #ifndef BLSURFPLUGINGUI_HypothesisCreator_HeaderFile
30 #define BLSURFPLUGINGUI_HypothesisCreator_HeaderFile
31
32 #include <SMESHGUI_Hypotheses.h>
33
34 class QtxDblSpinBox;
35 class QtxComboBox;
36 class QCheckBox;
37 class QLineEdit;
38
39 typedef struct
40 {
41   int     myTopology;
42   int     myPhysicalMesh, myGeometricMesh;
43   double  myPhySize, myAngleMeshS, myGradation;
44   bool    myAllowQuadrangles, myDecimesh;
45   QString myName;
46 } BlsurfHypothesisData;
47
48 /*!
49  * \brief Class for creation of BLSURF hypotheses
50 */
51
52 class BLSURFPlugin_Hypothesis;
53
54 class BLSURFPluginGUI_HypothesisCreator : public SMESHGUI_GenericHypothesisCreator
55 {
56   Q_OBJECT
57
58 public:
59   BLSURFPluginGUI_HypothesisCreator( const QString& );
60   virtual ~BLSURFPluginGUI_HypothesisCreator();
61
62   virtual bool checkParams() const;
63
64 protected:
65   virtual QFrame*  buildFrame    ();
66   virtual void     retrieveParams() const;
67   virtual QString  storeParams   () const;
68   
69   virtual QString  caption() const;
70   virtual QPixmap  icon() const;
71   virtual QString  type() const;
72
73 protected slots:
74   virtual void onPhysicalMeshChanged();
75   virtual void onGeometricMeshChanged();
76
77 private:
78   bool readParamsFromHypo( BlsurfHypothesisData& ) const;
79   bool readParamsFromWidgets( BlsurfHypothesisData& ) const;
80   bool storeParamsToHypo( const BlsurfHypothesisData& ) const;
81
82 private:
83  QLineEdit*       myName;
84  QtxComboBox*     myTopology;
85  QtxComboBox*     myPhysicalMesh;
86  QtxDblSpinBox*   myPhySize;
87  QtxComboBox*     myGeometricMesh;
88  QtxDblSpinBox*   myAngleMeshS;
89  QtxDblSpinBox*   myGradation;
90  QCheckBox*       myAllowQuadrangles;
91  QCheckBox*       myDecimesh;
92
93  bool myIs2D;
94 };
95
96 #endif