]> SALOME platform Git repositories - plugins/hexoticplugin.git/blob - src/GUI/HexoticPluginGUI_HypothesisCreator.h
Salome HOME
Import a new plugin, sent by Stephane LIAUZU
[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 } HexoticHypothesisData;
44
45 /*!
46  * \brief Class for creation of Hexotic hypotheses
47 */
48 class HexoticPluginGUI_HypothesisCreator : public SMESHGUI_GenericHypothesisCreator
49 {
50   Q_OBJECT
51
52 public:
53   HexoticPluginGUI_HypothesisCreator( const QString& );
54   virtual ~HexoticPluginGUI_HypothesisCreator();
55
56   virtual bool checkParams() const;
57
58 protected:
59   virtual QFrame*  buildFrame    ();
60   virtual void     retrieveParams() const;
61   virtual QString  storeParams   () const;
62   
63   virtual QString  caption() const;
64   virtual QPixmap  icon() const;
65   virtual QString  type() const;
66
67 private:
68   bool readParamsFromHypo( HexoticHypothesisData& ) const;
69   bool readParamsFromWidgets( HexoticHypothesisData& ) const;
70   bool storeParamsToHypo( const HexoticHypothesisData& ) const;
71
72 private:
73  QLineEdit*       myName;
74  QtxIntSpinBox*   myHexesMinLevel;
75  QtxIntSpinBox*   myHexesMaxLevel;
76  QCheckBox*       myHexoticQuadrangles;
77
78  bool myIs3D;
79 };
80
81 #endif