]> SALOME platform Git repositories - plugins/hybridplugin.git/blob - src/GUI/GHS3DPluginGUI_HypothesisCreator.h
Salome HOME
Merge from BR_V5_DEV 16Feb09
[plugins/hybridplugin.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 #include "GHS3DPlugin_Defs.hxx"
28 #include <SMESHGUI_Hypotheses.h>
29
30 class QWidget;
31 class QComboBox;
32 class QCheckBox;
33 class QLineEdit;
34 class QSpinBox;
35
36 typedef struct
37 {
38   bool    myToMeshHoles;
39   int     myMaximumMemory;
40   int     myInitialMemory;
41   int     myOptimizationLevel;
42   bool    myKeepFiles;
43   QString myWorkingDir;
44   QString myName;
45   short   myVerboseLevel;
46   bool    myToCreateNewNodes;
47   bool    myBoundaryRecovery;
48   QString myTextOption;
49
50 } GHS3DHypothesisData;
51
52 /*!
53   \brief Class for creation of GHS3D2D and GHS3D3D hypotheses
54 */
55 class GHS3DPLUGIN_EXPORT GHS3DPluginGUI_HypothesisCreator : public SMESHGUI_GenericHypothesisCreator
56 {
57   Q_OBJECT
58
59 public:
60   GHS3DPluginGUI_HypothesisCreator( const QString& );
61   virtual ~GHS3DPluginGUI_HypothesisCreator();
62
63   virtual bool     checkParams() const;
64   virtual QString  helpPage() const;
65
66 protected:
67   virtual QFrame*  buildFrame    ();
68   virtual void     retrieveParams() const;
69   virtual QString  storeParams   () const;
70
71   virtual QString  caption() const;
72   virtual QPixmap  icon() const;
73   virtual QString  type() const;
74
75 protected slots:
76   void             onDirBtnClicked();
77   void             updateWidgets();
78
79 private:
80   bool             readParamsFromHypo( GHS3DHypothesisData& ) const;
81   bool             readParamsFromWidgets( GHS3DHypothesisData& ) const;
82   bool             storeParamsToHypo( const GHS3DHypothesisData& ) const;
83
84 private:
85   QWidget*         myStdGroup;
86   QLineEdit*       myName;
87   QCheckBox*       myToMeshHolesCheck;
88   QComboBox*       myOptimizationLevelCombo;
89
90   QWidget*         myAdvGroup;
91   QCheckBox*       myMaximumMemoryCheck;
92   QSpinBox*        myMaximumMemorySpin;
93   QCheckBox*       myInitialMemoryCheck;
94   QSpinBox*        myInitialMemorySpin;
95   QLineEdit*       myWorkingDir;
96   QCheckBox*       myKeepFiles;
97   QSpinBox*        myVerboseLevelSpin;
98   QCheckBox*       myToCreateNewNodesCheck;
99   QCheckBox*       myBoundaryRecoveryCheck;
100   QLineEdit*       myTextOption;
101 };
102
103 #endif