Salome HOME
f6cc44ee2e5798e925876f02fe0a7d2ce5106c21
[plugins/ghs3dprlplugin.git] / src / gui / GHS3DPRLPluginGUI_HypothesisCreator.h
1 // Copyright (C) 2007-2024  CEA, EDF
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, or (at your option) any later version.
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
20 // ---
21 // File   : GHS3DPRLPluginGUI_HypothesisCreator.h
22 // Author : Christian VAN WAMBEKE (CEA) (from Hexotic plugin Lioka RAZAFINDRAZAKA)
23 // ---
24 //
25 #ifndef GHS3DPRLPLUGINGUI_HypothesisCreator_H
26 #define GHS3DPRLPLUGINGUI_HypothesisCreator_H
27
28 #ifdef WIN32
29   #if defined GHS3DPRLPluginGUI_EXPORTS
30     #define GHS3DPRLPLUGINGUI_EXPORT __declspec( dllexport )
31   #else
32     #define GHS3DPRLPLUGINGUI_EXPORT __declspec( dllimport )
33   #endif
34 #else
35   #define GHS3DPRLPLUGINGUI_EXPORT
36 #endif
37
38
39 #include <SMESHGUI_Hypotheses.h>
40
41 class QtxIntSpinBox;
42 class QtxDoubleSpinBox;
43 class QCheckBox;
44 class QLineEdit;
45 class SMESH_AdvOptionsWdg;
46
47 typedef struct
48 {
49   QString  myName;
50   QString  myMEDName;
51   int      myNbPart;
52   bool     myKeepFiles;
53   bool     myBackground;
54   bool     myMultithread;
55   //bool     myToMeshHoles;
56   //bool     myToMergeSubdomains;
57   float     myGradation;
58   float     myMinSize;
59   float     myMaxSize;
60   QString   myAdvOptions;
61  } GHS3DPRLHypothesisData;
62
63 /*!
64  * \brief Class for creation of GHS3DPRL hypotheses
65 */
66 class GHS3DPRLPLUGINGUI_EXPORT GHS3DPRLPluginGUI_HypothesisCreator : public SMESHGUI_GenericHypothesisCreator
67 {
68   Q_OBJECT
69
70 public:
71   GHS3DPRLPluginGUI_HypothesisCreator( const QString& );
72   virtual ~GHS3DPRLPluginGUI_HypothesisCreator();
73
74   virtual bool    checkParams() const;
75   virtual QString helpPage() const;
76
77 protected:
78   virtual QFrame* buildFrame    ();
79   virtual void    retrieveParams() const;
80   virtual QString storeParams   () const;
81
82   virtual QString caption() const;
83   virtual QPixmap icon() const;
84   virtual QString type() const;
85
86 private:
87   bool            readParamsFromHypo( GHS3DPRLHypothesisData& ) const;
88   bool            readParamsFromWidgets( GHS3DPRLHypothesisData& ) const;
89   bool            storeParamsToHypo( const GHS3DPRLHypothesisData& ) const;
90
91 private:
92   QLineEdit*           myName;
93   QLineEdit*           myMEDName;
94   QtxIntSpinBox*       myNbPart;
95   QCheckBox*           myKeepFiles;
96   QCheckBox*           myBackground;
97   QCheckBox*           myMultithread;
98   QtxDoubleSpinBox*    myGradation;
99   QtxDoubleSpinBox*    myMinSize;
100   QtxDoubleSpinBox*    myMaxSize;
101   bool                 myIs3D;
102   SMESH_AdvOptionsWdg* myAdvTable;
103 };
104
105 #endif // GHS3DPRLPLUGINGUI_HypothesisCreator_H