]> SALOME platform Git repositories - plugins/ghs3dprlplugin.git/blob - src/gui/GHS3DPRLPluginGUI_HypothesisCreator.h
Salome HOME
Merge from BR_V5_DEV 16Feb09
[plugins/ghs3dprlplugin.git] / src / gui / GHS3DPRLPluginGUI_HypothesisCreator.h
1 // Copyright (C) 2007-2008 OPEN CASCADE, 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
26 #ifndef GHS3DPRLPLUGINGUI_HypothesisCreator_H
27 #define GHS3DPRLPLUGINGUI_HypothesisCreator_H
28
29 #include <SMESHGUI_Hypotheses.h>
30
31 class QtxIntSpinBox;
32 class QCheckBox;
33 class QLineEdit;
34
35 typedef struct
36 {
37   QString  myName;
38   QString  myMEDName;
39   int      myNbPart;
40   bool     myKeepFiles;
41   bool     myBackground;
42   bool    myToMeshHoles;
43  } GHS3DPRLHypothesisData;
44
45 /*!
46  * \brief Class for creation of GHS3DPRL hypotheses
47 */
48 class GHS3DPRLPluginGUI_HypothesisCreator : public SMESHGUI_GenericHypothesisCreator
49 {
50   Q_OBJECT
51
52 public:
53   GHS3DPRLPluginGUI_HypothesisCreator( const QString& );
54   virtual ~GHS3DPRLPluginGUI_HypothesisCreator();
55
56   virtual bool    checkParams() const;
57   virtual QString helpPage() const;
58
59 protected:
60   virtual QFrame* buildFrame    ();
61   virtual void    retrieveParams() const;
62   virtual QString storeParams   () const;
63
64   virtual QString caption() const;
65   virtual QPixmap icon() const;
66   virtual QString type() const;
67
68 private:
69   bool            readParamsFromHypo( GHS3DPRLHypothesisData& ) const;
70   bool            readParamsFromWidgets( GHS3DPRLHypothesisData& ) const;
71   bool            storeParamsToHypo( const GHS3DPRLHypothesisData& ) const;
72
73 private:
74  QLineEdit*       myName;
75  QLineEdit*       myMEDName;
76  QtxIntSpinBox*   myNbPart;
77  QCheckBox*       myKeepFiles;
78  QCheckBox*       myBackground;
79  QCheckBox*       myToMeshHoles;
80  bool             myIs3D;
81 };
82
83 #endif // GHS3DPRLPLUGINGUI_HypothesisCreator_H