Salome HOME
Merge from OCC_development_generic_2006
[modules/smesh.git] / src / StdMeshersGUI / StdMeshersGUI_NbSegmentsCreator.h
1
2 #ifndef NB_SEGMENTS_CREATOR_HEADER
3 #define NB_SEGMENTS_CREATOR_HEADER
4
5 #include "StdMeshersGUI_StdHypothesisCreator.h"
6
7 #include <SALOMEconfig.h>
8 #include CORBA_SERVER_HEADER(SMESH_Mesh)
9
10 class QtxIntSpinBox;
11 class QtxComboBox;
12 class SMESHGUI_SpinBox;
13 class StdMeshersGUI_DistrTableFrame;
14 class StdMeshersGUI_DistrPreview;
15 class QLineEdit;
16 class QButtonGroup;
17 class QGridLayout;
18 class QRadioButton;
19
20 typedef struct
21 {
22   int                 myNbSeg, myDistrType, myConv;
23   double              myScale;
24   SMESH::double_array myTable;
25   QString             myName, myExpr;
26
27 } NbSegmentsHypothesisData;
28
29 class StdMeshersGUI_NbSegmentsCreator : public StdMeshersGUI_StdHypothesisCreator
30 {
31   Q_OBJECT
32
33 public:
34   StdMeshersGUI_NbSegmentsCreator();
35   virtual ~StdMeshersGUI_NbSegmentsCreator();
36
37   virtual bool checkParams() const;
38
39 protected:
40   virtual QFrame*  buildFrame();
41   virtual void     retrieveParams() const;
42   virtual QString  storeParams() const;
43
44 protected slots:
45   virtual void     onValueChanged();
46
47 private:
48   bool readParamsFromHypo( NbSegmentsHypothesisData& ) const;
49   bool readParamsFromWidgets( NbSegmentsHypothesisData& ) const;
50   bool storeParamsToHypo( const NbSegmentsHypothesisData& ) const;
51
52 private:
53   QtxIntSpinBox*   myNbSeg;
54   QtxComboBox*     myDistr;
55   SMESHGUI_SpinBox*   myScale;
56   StdMeshersGUI_DistrTableFrame*  myTable;
57   StdMeshersGUI_DistrPreview* myPreview;
58   QLineEdit       *myName, *myExpr;
59   QButtonGroup*    myConv;
60   QLabel          *myLScale, *myLTable, *myLExpr, *myLConv, *myInfo;
61   QGridLayout*     myGroupLayout;
62   int              myTableRow, myPreviewRow;
63   QRadioButton*    myCutNeg;
64 };
65
66 #endif