Salome HOME
Join modifications from BR_Dev_For_4_0.
[plugins/hexoticplugin.git] / src / GUI / HexoticPluginGUI_HypothesisCreator.h
1 //  HexoticPlugin GUI: GUI for plugged-in mesher HexoticPlugin
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   : HexoticPluginGUI_HypothesisCreator.h
24 // Author  : Lioka RAZAFINDRAZAKA (CEA)
25 //  Module : HexoticPlugin
26 //  $Header: 
27
28 #ifndef HexoticPLUGINGUI_HypothesisCreator_HeaderFile
29 #define HexoticPLUGINGUI_HypothesisCreator_HeaderFile
30
31 #include <SMESHGUI_Hypotheses.h>
32
33 class QtxIntSpinBox;
34 class QtxDblSpinBox;
35 class QCheckBox;
36 class QLineEdit;
37
38 typedef struct
39 {
40   QString  myName;
41   int      myHexesMinLevel, myHexesMaxLevel;
42   bool     myHexoticQuadrangles;
43   bool     myHexoticInvalidElements;
44   bool     myHexoticIgnoreRidges;
45   int      myHexoticSharpAngleThreshold;
46 } HexoticHypothesisData;
47
48 /*!
49  * \brief Class for creation of Hexotic hypotheses
50 */
51 class HexoticPluginGUI_HypothesisCreator : public SMESHGUI_GenericHypothesisCreator
52 {
53   Q_OBJECT
54
55 public:
56   HexoticPluginGUI_HypothesisCreator( const QString& );
57   virtual ~HexoticPluginGUI_HypothesisCreator();
58
59   virtual bool checkParams() const;
60
61 protected:
62   virtual QFrame*  buildFrame    ();
63   virtual void     retrieveParams() const;
64   virtual QString  storeParams   () const;
65   
66   virtual QString  caption() const;
67   virtual QPixmap  icon() const;
68   virtual QString  type() const;
69
70 private:
71   bool readParamsFromHypo( HexoticHypothesisData& ) const;
72   bool readParamsFromWidgets( HexoticHypothesisData& ) const;
73   bool storeParamsToHypo( const HexoticHypothesisData& ) const;
74
75 private:
76  QLineEdit*       myName;
77  QtxIntSpinBox*   myHexesMinLevel;
78  QtxIntSpinBox*   myHexesMaxLevel;
79  QCheckBox*       myHexoticQuadrangles;
80  QCheckBox*       myHexoticIgnoreRidges;
81  QCheckBox*       myHexoticInvalidElements;
82  QtxIntSpinBox*   myHexoticSharpAngleThreshold;
83
84  bool myIs3D;
85 };
86
87 #endif