]> SALOME platform Git repositories - plugins/netgenplugin.git/blob - src/GUI/NETGENPluginGUI_HypothesisCreator.h
Salome HOME
c86b99f74e5d5d0064c3dcbfb8295f8df985df38
[plugins/netgenplugin.git] / src / GUI / NETGENPluginGUI_HypothesisCreator.h
1 //  NETGENPlugin GUI: GUI for plugged-in mesher NETGENPlugin
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.com
20 //
21 //
22 //
23 //  File   : NETGENPluginGUI_HypothesisCreator.h
24 //  Author : Michael Zorin
25 //  Module : NETGENPlugin
26 //  $Header: 
27
28 #ifndef NETGENPLUGINGUI_HypothesisCreator_HeaderFile
29 #define NETGENPLUGINGUI_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   double              myMaxSize, myGrowthRate, myNbSegPerEdge, myNbSegPerRadius;
41   int                 myFineness;
42   bool                mySecondOrder, myAllowQuadrangles, myOptimize;
43   QString             myName;
44 } NetgenHypothesisData;
45
46 /*!
47  * \brief Class for creation of NETGEN2D and NETGEN3D hypotheses
48 */
49 class NETGENPluginGUI_HypothesisCreator : public SMESHGUI_GenericHypothesisCreator
50 {
51   Q_OBJECT
52
53 public:
54   NETGENPluginGUI_HypothesisCreator( const QString& );
55   virtual ~NETGENPluginGUI_HypothesisCreator();
56
57   virtual bool checkParams() const;
58
59 protected:
60   virtual QFrame*  buildFrame    ();
61   virtual void     retrieveParams() const;
62   virtual QString  storeParams   () const;
63   
64   virtual QString  caption() const;
65   virtual QPixmap  icon() const;
66   virtual QString  type() const;
67
68 protected slots:
69   virtual void     onFinenessChanged();
70
71 private:
72   bool readParamsFromHypo( NetgenHypothesisData& ) const;
73   bool readParamsFromWidgets( NetgenHypothesisData& ) const;
74   bool storeParamsToHypo( const NetgenHypothesisData& ) const;
75
76 private:
77  QLineEdit*       myName;
78  QtxDblSpinBox*   myMaxSize;
79  QCheckBox*       mySecondOrder;
80  QCheckBox*       myOptimize;
81  QtxComboBox*     myFineness;
82  QtxDblSpinBox*   myGrowthRate;
83  QtxDblSpinBox*   myNbSegPerEdge;
84  QtxDblSpinBox*   myNbSegPerRadius;
85  QCheckBox*       myAllowQuadrangles;
86
87  bool myIs2D;
88 };
89
90 #endif