1 // Copyright (C) 2007-2013 CEA/DEN, EDF R&D
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 // File : HexoticPluginGUI_HypothesisCreator.h
22 // Author : Lioka RAZAFINDRAZAKA (CEA)
25 #ifndef HexoticPLUGINGUI_HypothesisCreator_H
26 #define HexoticPLUGINGUI_HypothesisCreator_H
28 #include "HexoticPluginGUI.h"
30 #include <SMESHGUI_Hypotheses.h>
31 #include "StdMeshersGUI_ObjectReferenceParamWdg.h"
32 #include "HexoticPlugin_Hypothesis.hxx"
38 class HexoticPluginGUI_StdWidget;
39 class HexoticPluginGUI_SizeMapsWidget;
44 int myHexesMinLevel, myHexesMaxLevel;
45 double myMinSize, myMaxSize;
46 bool myHexoticInvalidElements;
47 bool myHexoticIgnoreRidges;
48 double myHexoticSharpAngleThreshold;
50 QString myHexoticWorkingDir;
51 int myHexoticVerbosity;
52 int myHexoticMaxMemory;
54 HexoticPlugin_Hypothesis::THexoticSizeMaps mySizeMaps;
55 } HexoticHypothesisData;
58 * \brief Class for creation of Hexotic hypotheses
60 class HEXOTICPLUGIN_GUI_EXPORT HexoticPluginGUI_HypothesisCreator : public SMESHGUI_GenericHypothesisCreator
65 HexoticPluginGUI_HypothesisCreator( const QString& );
66 virtual ~HexoticPluginGUI_HypothesisCreator();
68 virtual bool checkParams(QString&) const;
69 virtual QString helpPage() const;
72 virtual QFrame* buildFrame ();
73 virtual void retrieveParams() const;
74 virtual QString storeParams () const;
76 virtual QString caption() const;
77 virtual QPixmap icon() const;
78 virtual QString type() const;
81 bool readParamsFromHypo( HexoticHypothesisData& ) const;
82 bool readParamsFromWidgets( HexoticHypothesisData& ) const;
83 bool readSizeMapsFromWidgets( HexoticHypothesisData& ) const;
84 void insertLocalSizeInWidget( std::string entry, std::string shapeName, double size, int row ) const;
85 bool storeParamsToHypo( const HexoticHypothesisData& ) const;
86 void resizeEvent(QResizeEvent *event);
87 void printData(HexoticHypothesisData&) const;
89 GEOM::GEOM_Object_var entryToObject( std::string entry) const;
93 // QWidget* myStdGroup;
95 HexoticPluginGUI_StdWidget* myStdWidget;
96 HexoticPluginGUI_SizeMapsWidget* mySmpWidget;
97 StdMeshersGUI_ObjectReferenceParamWdg* myGeomSelWdg;
100 bool mySizeMapRemoved;
103 void onAddLocalSize();
104 void onRemoveLocalSize();