1 // Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 #ifndef NB_SEGMENTS_CREATOR_HEADER
22 #define NB_SEGMENTS_CREATOR_HEADER
24 #include "SMESH_StdMeshersGUI.hxx"
26 #include "StdMeshersGUI_StdHypothesisCreator.h"
28 #include <SALOMEconfig.h>
29 #include CORBA_SERVER_HEADER(SMESH_Mesh)
33 class SMESHGUI_SpinBox;
34 class StdMeshersGUI_DistrTableFrame;
35 class StdMeshersGUI_DistrPreview;
43 int myNbSeg, myDistrType, myConv;
45 SMESH::double_array myTable;
46 QString myName, myExpr;
48 } NbSegmentsHypothesisData;
50 class STDMESHERSGUI_EXPORT StdMeshersGUI_NbSegmentsCreator : public StdMeshersGUI_StdHypothesisCreator
55 StdMeshersGUI_NbSegmentsCreator();
56 virtual ~StdMeshersGUI_NbSegmentsCreator();
58 virtual bool checkParams() const;
61 virtual QFrame* buildFrame();
62 virtual void retrieveParams() const;
63 virtual QString storeParams() const;
66 virtual void onValueChanged();
69 bool readParamsFromHypo( NbSegmentsHypothesisData& ) const;
70 bool readParamsFromWidgets( NbSegmentsHypothesisData& ) const;
71 bool storeParamsToHypo( const NbSegmentsHypothesisData& ) const;
74 QtxIntSpinBox* myNbSeg;
76 SMESHGUI_SpinBox* myScale;
77 StdMeshersGUI_DistrTableFrame* myTable;
78 StdMeshersGUI_DistrPreview* myPreview;
79 QLineEdit *myName, *myExpr;
81 QLabel *myLScale, *myLTable, *myLExpr, *myLConv, *myInfo;
82 QGridLayout* myGroupLayout;
83 int myTableRow, myPreviewRow;
84 QRadioButton* myCutNeg;