1 // Copyright (C) 2003 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
20 // File : StdMeshersGUI_NbSegmentsCreator.h
21 // Author : Open CASCADE S.A.S.
24 #ifndef STDMESHERSGUI_NBSEGMENTSCREATOR_H
25 #define STDMESHERSGUI_NBSEGMENTSCREATOR_H
28 #include "SMESH_StdMeshersGUI.hxx"
30 #include "StdMeshersGUI_StdHypothesisCreator.h"
33 #include <SALOMEconfig.h>
34 #include CORBA_SERVER_HEADER(SMESH_Mesh)
38 class SMESHGUI_SpinBox;
39 class StdMeshersGUI_DistrTableFrame;
40 class StdMeshersGUI_DistrPreview;
49 int myNbSeg, myDistrType, myConv;
51 SMESH::double_array myTable;
52 QString myName, myExpr;
54 } NbSegmentsHypothesisData;
56 class STDMESHERSGUI_EXPORT StdMeshersGUI_NbSegmentsCreator : public StdMeshersGUI_StdHypothesisCreator
61 StdMeshersGUI_NbSegmentsCreator();
62 virtual ~StdMeshersGUI_NbSegmentsCreator();
64 virtual bool checkParams() const;
67 virtual QFrame* buildFrame();
68 virtual void retrieveParams() const;
69 virtual QString storeParams() const;
72 virtual void onValueChanged();
75 bool readParamsFromHypo( NbSegmentsHypothesisData& ) const;
76 bool readParamsFromWidgets( NbSegmentsHypothesisData& ) const;
77 bool storeParamsToHypo( const NbSegmentsHypothesisData& ) const;
80 QtxIntSpinBox* myNbSeg;
82 SMESHGUI_SpinBox* myScale;
83 StdMeshersGUI_DistrTableFrame* myTable;
84 StdMeshersGUI_DistrPreview* myPreview;
85 QLineEdit *myName, *myExpr;
88 QLabel *myLScale, *myLTable, *myLExpr, *myInfo;
89 QGridLayout* myGroupLayout;
90 int myTableRow, myPreviewRow;
91 QRadioButton* myCutNeg;
94 #endif // STDMESHERSGUI_NBSEGMENTSCREATOR_H