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/
21 #ifndef NB_SEGMENTS_CREATOR_HEADER
22 #define NB_SEGMENTS_CREATOR_HEADER
24 #include "StdMeshersGUI_StdHypothesisCreator.h"
26 #include <SALOMEconfig.h>
27 #include CORBA_SERVER_HEADER(SMESH_Mesh)
31 class SMESHGUI_SpinBox;
32 class StdMeshersGUI_DistrTableFrame;
33 class StdMeshersGUI_DistrPreview;
41 int myNbSeg, myDistrType, myConv;
43 SMESH::double_array myTable;
44 QString myName, myExpr;
46 } NbSegmentsHypothesisData;
48 class StdMeshersGUI_NbSegmentsCreator : public StdMeshersGUI_StdHypothesisCreator
53 StdMeshersGUI_NbSegmentsCreator();
54 virtual ~StdMeshersGUI_NbSegmentsCreator();
56 virtual bool checkParams() const;
59 virtual QFrame* buildFrame();
60 virtual void retrieveParams() const;
61 virtual QString storeParams() const;
64 virtual void onValueChanged();
67 bool readParamsFromHypo( NbSegmentsHypothesisData& ) const;
68 bool readParamsFromWidgets( NbSegmentsHypothesisData& ) const;
69 bool storeParamsToHypo( const NbSegmentsHypothesisData& ) const;
72 QtxIntSpinBox* myNbSeg;
74 SMESHGUI_SpinBox* myScale;
75 StdMeshersGUI_DistrTableFrame* myTable;
76 StdMeshersGUI_DistrPreview* myPreview;
77 QLineEdit *myName, *myExpr;
79 QLabel *myLScale, *myLTable, *myLExpr, *myLConv, *myInfo;
80 QGridLayout* myGroupLayout;
81 int myTableRow, myPreviewRow;
82 QRadioButton* myCutNeg;