Salome HOME
Import a new plugin, sent by Stephane LIAUZU
[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 //  Module : BLSURFPlugin
26 //  $Header: 
27
28 #ifndef BLSURFPLUGINGUI_HypothesisCreator_HeaderFile
29 #define BLSURFPLUGINGUI_HypothesisCreator_HeaderFile
30
31 #include <SMESHGUI_Hypotheses.h>
32
33 class QtxDblSpinBox;
34 class QtxComboBox;
35 class QCheckBox;
36 class QLineEdit;
37
38 typedef struct
39 {
40   int     myPhysicalMesh, myGeometricMesh;
41   double  myPhySize, myAngleMeshS, myGradation;
42   bool    myAllowQuadrangles, myDecimesh;
43   QString myName;
44 } BlsurfHypothesisData;
45
46 /*!
47  * \brief Class for creation of BLSURF hypotheses
48 */
49
50 class BLSURFPlugin_Hypothesis;
51
52 class BLSURFPluginGUI_HypothesisCreator : public SMESHGUI_GenericHypothesisCreator
53 {
54   Q_OBJECT
55
56 public:
57   BLSURFPluginGUI_HypothesisCreator( const QString& );
58   virtual ~BLSURFPluginGUI_HypothesisCreator();
59
60   virtual bool checkParams() const;
61
62 protected:
63   virtual QFrame*  buildFrame    ();
64   virtual void     retrieveParams() const;
65   virtual QString  storeParams   () const;
66   
67   virtual QString  caption() const;
68   virtual QPixmap  icon() const;
69   virtual QString  type() const;
70
71 protected slots:
72   virtual void onPhysicalMeshChanged();
73   virtual void onGeometricMeshChanged();
74
75 private:
76   bool readParamsFromHypo( BlsurfHypothesisData& ) const;
77   bool readParamsFromWidgets( BlsurfHypothesisData& ) const;
78   bool storeParamsToHypo( const BlsurfHypothesisData& ) const;
79
80 private:
81  QLineEdit*       myName;
82  QtxComboBox*     myPhysicalMesh;
83  QtxDblSpinBox*   myPhySize;
84  QtxComboBox*     myGeometricMesh;
85  QtxDblSpinBox*   myAngleMeshS;
86  QtxDblSpinBox*   myGradation;
87  QCheckBox*       myAllowQuadrangles;
88  QCheckBox*       myDecimesh;
89
90  bool myIs2D;
91 };
92
93 #endif