]> SALOME platform Git repositories - plugins/ghs3dplugin.git/blob - src/GUI/GHS3DPluginGUI_HypothesisCreator.h
Salome HOME
windows port
[plugins/ghs3dplugin.git] / src / GUI / GHS3DPluginGUI_HypothesisCreator.h
1 //  Copyright (C) 2004-2008  CEA/DEN, EDF R&D
2 //
3 //  This library is free software; you can redistribute it and/or
4 //  modify it under the terms of the GNU Lesser General Public
5 //  License as published by the Free Software Foundation; either
6 //  version 2.1 of the License.
7 //
8 //  This library is distributed in the hope that it will be useful,
9 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
10 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 //  Lesser General Public License for more details.
12 //
13 //  You should have received a copy of the GNU Lesser General Public
14 //  License along with this library; if not, write to the Free Software
15 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 //  GHS3DPlugin GUI: GUI for plugged-in mesher GHS3DPlugin
20 //  File   : GHS3DPluginGUI_HypothesisCreator.h
21 //  Author : Michael Zorin
22 //  Module : GHS3DPlugin
23 //
24 #ifndef GHS3DPLUGINGUI_HypothesisCreator_HeaderFile
25 #define GHS3DPLUGINGUI_HypothesisCreator_HeaderFile
26
27 #ifdef WIN32
28   #if defined GHS3DPluginGUI_EXPORTS
29     #define GHS3DPLUGINGUI_EXPORT __declspec( dllexport )
30   #else
31     #define GHS3DPLUGINGUI_EXPORT __declspec( dllimport )
32   #endif
33 #else
34   #define GHS3DPLUGINGUI_EXPORT
35 #endif
36
37 #include <SMESHGUI_Hypotheses.h>
38
39 class QWidget;
40 class QComboBox;
41 class QCheckBox;
42 class QLineEdit;
43 class QSpinBox;
44
45 typedef struct
46 {
47   bool    myToMeshHoles;
48   int     myMaximumMemory;
49   int     myInitialMemory;
50   int     myOptimizationLevel;
51   bool    myKeepFiles;
52   QString myWorkingDir;
53   QString myName;
54   short   myVerboseLevel;
55   bool    myToCreateNewNodes;
56   bool    myBoundaryRecovery;
57   QString myTextOption;
58
59 } GHS3DHypothesisData;
60
61 /*!
62   \brief Class for creation of GHS3D2D and GHS3D3D hypotheses
63 */
64 class GHS3DPLUGINGUI_EXPORT GHS3DPluginGUI_HypothesisCreator : public SMESHGUI_GenericHypothesisCreator
65 {
66   Q_OBJECT
67
68 public:
69   GHS3DPluginGUI_HypothesisCreator( const QString& );
70   virtual ~GHS3DPluginGUI_HypothesisCreator();
71
72   virtual bool     checkParams() const;
73   virtual QString  helpPage() const;
74
75 protected:
76   virtual QFrame*  buildFrame    ();
77   virtual void     retrieveParams() const;
78   virtual QString  storeParams   () const;
79
80   virtual QString  caption() const;
81   virtual QPixmap  icon() const;
82   virtual QString  type() const;
83
84 protected slots:
85   void             onDirBtnClicked();
86   void             updateWidgets();
87
88 private:
89   bool             readParamsFromHypo( GHS3DHypothesisData& ) const;
90   bool             readParamsFromWidgets( GHS3DHypothesisData& ) const;
91   bool             storeParamsToHypo( const GHS3DHypothesisData& ) const;
92
93 private:
94   QWidget*         myStdGroup;
95   QLineEdit*       myName;
96   QCheckBox*       myToMeshHolesCheck;
97   QComboBox*       myOptimizationLevelCombo;
98
99   QWidget*         myAdvGroup;
100   QCheckBox*       myMaximumMemoryCheck;
101   QSpinBox*        myMaximumMemorySpin;
102   QCheckBox*       myInitialMemoryCheck;
103   QSpinBox*        myInitialMemorySpin;
104   QLineEdit*       myWorkingDir;
105   QCheckBox*       myKeepFiles;
106   QSpinBox*        myVerboseLevelSpin;
107   QCheckBox*       myToCreateNewNodesCheck;
108   QCheckBox*       myBoundaryRecoveryCheck;
109   QLineEdit*       myTextOption;
110 };
111
112 #endif