]> SALOME platform Git repositories - plugins/netgenplugin.git/blob - src/GUI/NETGENPluginGUI_HypothesisCreator.h
Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[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 #ifdef WIN32
32   #ifdef NETGENPLUGIN_GUI_EXPORTS
33     #define NETGENPLUGIN_GUI_EXPORT __declspec( dllexport )
34   #else
35     #define NETGENPLUGIN_GUI_EXPORT __declspec( dllimport )
36   #endif
37 #else
38   #define NETGENPLUGIN_GUI_EXPORT
39 #endif
40
41 #include <SMESHGUI_Hypotheses.h>
42
43 class QtxDblSpinBox;
44 class QtxComboBox;
45 class QCheckBox;
46 class QLineEdit;
47
48 typedef struct
49 {
50   double              myMaxSize, myGrowthRate, myNbSegPerEdge, myNbSegPerRadius;
51   int                 myFineness;
52   bool                mySecondOrder, myAllowQuadrangles, myOptimize;
53   QString             myName;
54 } NetgenHypothesisData;
55
56 /*!
57  * \brief Class for creation of NETGEN2D and NETGEN3D hypotheses
58 */
59 class NETGENPLUGIN_GUI_EXPORT NETGENPluginGUI_HypothesisCreator : public SMESHGUI_GenericHypothesisCreator
60 {
61   Q_OBJECT
62
63 public:
64   NETGENPluginGUI_HypothesisCreator( const QString& );
65   virtual ~NETGENPluginGUI_HypothesisCreator();
66
67   virtual bool checkParams() const;
68
69 protected:
70   virtual QFrame*  buildFrame    ();
71   virtual void     retrieveParams() const;
72   virtual QString  storeParams   () const;
73   
74   virtual QString  caption() const;
75   virtual QPixmap  icon() const;
76   virtual QString  type() const;
77
78 protected slots:
79   virtual void     onFinenessChanged();
80
81 private:
82   bool readParamsFromHypo( NetgenHypothesisData& ) const;
83   bool readParamsFromWidgets( NetgenHypothesisData& ) const;
84   bool storeParamsToHypo( const NetgenHypothesisData& ) const;
85
86 private:
87  QLineEdit*       myName;
88  QtxDblSpinBox*   myMaxSize;
89  QCheckBox*       mySecondOrder;
90  QCheckBox*       myOptimize;
91  QtxComboBox*     myFineness;
92  QtxDblSpinBox*   myGrowthRate;
93  QtxDblSpinBox*   myNbSegPerEdge;
94  QtxDblSpinBox*   myNbSegPerRadius;
95  QCheckBox*       myAllowQuadrangles;
96
97  bool myIs2D;
98 };
99
100 #endif