Salome HOME
Merge from V4_1_0_maintainance branch (from tag mergeto_BR_QT4_Dev_08Jul08)
[plugins/ghs3dplugin.git] / src / GUI / GHS3DPluginGUI_HypothesisCreator.h
1 //  GHS3DPlugin GUI: GUI for plugged-in mesher GHS3DPlugin
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   : GHS3DPluginGUI_HypothesisCreator.h
24 //  Author : Michael Zorin
25 //  Module : GHS3DPlugin
26
27 #ifndef GHS3DPLUGINGUI_HypothesisCreator_HeaderFile
28 #define GHS3DPLUGINGUI_HypothesisCreator_HeaderFile
29
30 #include "GHS3DPlugin_Defs.hxx"
31 #include <SMESHGUI_Hypotheses.h>
32
33 class QWidget;
34 class QComboBox;
35 class QCheckBox;
36 class QLineEdit;
37 class QSpinBox;
38
39 typedef struct
40 {
41   bool    myToMeshHoles;
42   int     myMaximumMemory;
43   int     myInitialMemory;
44   int     myOptimizationLevel;
45   bool    myKeepFiles;
46   QString myWorkingDir;
47   QString myName;
48   short   myVerboseLevel;
49   bool    myToCreateNewNodes;
50   bool    myBoundaryRecovery;
51   QString myTextOption;
52
53 } GHS3DHypothesisData;
54
55 /*!
56   \brief Class for creation of GHS3D2D and GHS3D3D hypotheses
57 */
58 class GHS3DPLUGIN_EXPORT GHS3DPluginGUI_HypothesisCreator : public SMESHGUI_GenericHypothesisCreator
59 {
60   Q_OBJECT
61
62 public:
63   GHS3DPluginGUI_HypothesisCreator( const QString& );
64   virtual ~GHS3DPluginGUI_HypothesisCreator();
65
66   virtual bool     checkParams() const;
67   virtual QString  helpPage() 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   void             onDirBtnClicked();
80   void             updateWidgets();
81
82 private:
83   bool             readParamsFromHypo( GHS3DHypothesisData& ) const;
84   bool             readParamsFromWidgets( GHS3DHypothesisData& ) const;
85   bool             storeParamsToHypo( const GHS3DHypothesisData& ) const;
86
87 private:
88   QWidget*         myStdGroup;
89   QLineEdit*       myName;
90   QCheckBox*       myToMeshHolesCheck;
91   QComboBox*       myOptimizationLevelCombo;
92
93   QWidget*         myAdvGroup;
94   QCheckBox*       myMaximumMemoryCheck;
95   QSpinBox*        myMaximumMemorySpin;
96   QCheckBox*       myInitialMemoryCheck;
97   QSpinBox*        myInitialMemorySpin;
98   QLineEdit*       myWorkingDir;
99   QCheckBox*       myKeepFiles;
100   QSpinBox*        myVerboseLevelSpin;
101   QCheckBox*       myToCreateNewNodesCheck;
102   QCheckBox*       myBoundaryRecoveryCheck;
103   QLineEdit*       myTextOption;
104 };
105
106 #endif