1 // Copyright (C) 2012-2015 ALNEOS
2 // Copyright (C) 2016 EDF R&D
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.alneos.com/ or email : contact@alneos.fr
20 #ifndef GMSHPLUGINGUI_HypothesisCreator_HeaderFile
21 #define GMSHPLUGINGUI_HypothesisCreator_HeaderFile
23 #include "GMSHPluginGUI.h"
25 #include <SMESHGUI_Hypotheses.h>
27 #include <TopAbs_ShapeEnum.hxx>
31 class SMESHGUI_SpinBox;
32 class GeomSelectionTools;
41 int my2DAlgo,my3DAlgo,myRecomb2DAlgo;
43 int mySubdivAlgo,myRemeshAlgo,myRemeshPara,mySmouthSteps;
44 bool myUseIncomplElem;
46 double mySizeFactor,myMaxSize, myMinSize;
47 QString myMaxSizeVar, myMinSizeVar, mySmouthStepsVar, mySizeFactorVar;
51 * \brief Class for creation of GMSH2D and GMSH3D hypotheses
53 class GMSHPLUGIN_GUI_EXPORT GMSHPluginGUI_HypothesisCreator : public SMESHGUI_GenericHypothesisCreator
58 GMSHPluginGUI_HypothesisCreator( const QString& );
59 virtual ~GMSHPluginGUI_HypothesisCreator();
61 virtual bool checkParams(QString& msg) const;
62 virtual QString helpPage() const;
65 virtual QFrame* buildFrame ();
66 virtual void retrieveParams() const;
67 virtual QString storeParams () const;
69 virtual QString caption() const;
70 virtual QPixmap icon() const;
71 virtual QString type() const;
75 virtual void onAddCompound();
76 virtual void onRemoveCompound();
79 bool readParamsFromHypo( GmshHypothesisData& ) const;
80 bool readParamsFromWidgets( GmshHypothesisData& ) const;
81 bool storeParamsToHypo( const GmshHypothesisData& ) const;
82 GeomSelectionTools* getGeomSelectionTools();
88 QComboBox* myRecomb2DAlgo;
89 QCheckBox* myRecombineAll;
90 QComboBox* mySubdivAlgo;
91 QComboBox* myRemeshAlgo;
92 QComboBox* myRemeshPara;
93 SMESHGUI_SpinBox* mySmouthSteps;
94 SMESHGUI_SpinBox* mySizeFactor;
95 SMESHGUI_SpinBox* myMaxSize;
96 SMESHGUI_SpinBox* myMinSize;
97 QCheckBox* myUseIncomplElem;
98 QCheckBox* mySecondOrder;
102 QTableWidget* myCompoundTable;
103 GeomSelectionTools* myGeomSelectionTools;
104 QSet<QString> myCompoundSet;
105 QSet<QString> myCompoundToRemove;