]> SALOME platform Git repositories - plugins/ghs3dprlplugin.git/blob - src/gui/GHS3DPRLPluginGUI_HypothesisCreator.h
Salome HOME
558c32ccfe6137f186e5969bfe724d8f01dad75f
[plugins/ghs3dprlplugin.git] / src / gui / GHS3DPRLPluginGUI_HypothesisCreator.h
1 // Copyright (C) 2007-2013  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
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 QCheckBox;
43 class QLineEdit;
44
45 typedef struct
46 {
47   QString  myName;
48   QString  myMEDName;
49   int      myNbPart;
50   bool     myKeepFiles;
51   bool     myBackground;
52   bool    myToMeshHoles;
53  } GHS3DPRLHypothesisData;
54
55 /*!
56  * \brief Class for creation of GHS3DPRL hypotheses
57 */
58 class GHS3DPRLPLUGINGUI_EXPORT GHS3DPRLPluginGUI_HypothesisCreator : public SMESHGUI_GenericHypothesisCreator
59 {
60   Q_OBJECT
61
62 public:
63   GHS3DPRLPluginGUI_HypothesisCreator( const QString& );
64   virtual ~GHS3DPRLPluginGUI_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 private:
79   bool            readParamsFromHypo( GHS3DPRLHypothesisData& ) const;
80   bool            readParamsFromWidgets( GHS3DPRLHypothesisData& ) const;
81   bool            storeParamsToHypo( const GHS3DPRLHypothesisData& ) const;
82
83 private:
84  QLineEdit*       myName;
85  QLineEdit*       myMEDName;
86  QtxIntSpinBox*   myNbPart;
87  QCheckBox*       myKeepFiles;
88  QCheckBox*       myBackground;
89  QCheckBox*       myToMeshHoles;
90  bool             myIs3D;
91 };
92
93 #endif // GHS3DPRLPLUGINGUI_HypothesisCreator_H