Salome HOME
Dump Puthon extension
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_SmoothingDlg.h
1 // SMESH SMESHGUI : GUI for SMESH component
2 //
3 // Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
5 //
6 // This library is free software; you can redistribute it and/or 
7 // modify it under the terms of the GNU Lesser General Public 
8 // License as published by the Free Software Foundation; either 
9 // version 2.1 of the License. 
10 //
11 // This library is distributed in the hope that it will be useful, 
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of 
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
14 // Lesser General Public License for more details. 
15 //
16 // You should have received a copy of the GNU Lesser General Public 
17 // License along with this library; if not, write to the Free Software 
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 // File   : SMESHGUI_SmoothingDlg.h
23 // Author : Michael ZORIN, Open CASCADE S.A.S.
24 //
25
26 #ifndef SMESHGUI_SMOOTHINGDLG_H
27 #define SMESHGUI_SMOOTHINGDLG_H
28
29 // SMESH includes
30 #include "SMESH_SMESHGUI.hxx"
31
32 // Qt includes
33 #include <QDialog>
34
35 // IDL includes
36 #include <SALOMEconfig.h>
37 #include CORBA_SERVER_HEADER(SMESH_Mesh)
38
39 class QGroupBox;
40 class QLabel;
41 class QLineEdit;
42 class QPushButton;
43 class QRadioButton;
44 class QComboBox;
45 class QCheckBox;
46 class SalomeApp_IntSpinBox;
47 class SMESHGUI_IdValidator;
48 class SMESHGUI_SpinBox;
49 class SMESHGUI;
50 class SMESH_Actor;
51 class SVTK_Selector;
52 class LightApp_SelectionMgr;
53 class SMESH_LogicalFilter;
54
55 //=================================================================================
56 // class    : SMESHGUI_SmoothingDlg
57 // purpose  :
58 //=================================================================================
59 class SMESHGUI_EXPORT SMESHGUI_SmoothingDlg : public QDialog
60
61   Q_OBJECT
62
63 public:
64   SMESHGUI_SmoothingDlg( SMESHGUI* );
65   ~SMESHGUI_SmoothingDlg();
66
67 private:
68   void                   Init();
69   void                   closeEvent( QCloseEvent* );
70   void                   enterEvent( QEvent* );        /* mouse enter the QWidget */
71   void                   hideEvent( QHideEvent* );     /* ESC key */
72   void                   keyPressEvent( QKeyEvent* );
73
74   bool                   isValid();
75   
76   SMESHGUI*              mySMESHGUI;              /* Current SMESHGUI object */
77   SMESHGUI_IdValidator*  myIdValidator;
78   LightApp_SelectionMgr* mySelectionMgr;          /* User shape selection */
79   QString                myElementsId;
80   int                    myNbOkElements;          /* to check when elements are defined */
81   int                    myNbOkNodes;             /* to check when fixed nodes are defined */
82   int                    myConstructorId;         /* Current constructor id = radio button id */
83   QLineEdit*             myEditCurrentArgument;   /* Current  LineEdit */
84   SVTK_Selector*         mySelector;
85
86   SMESH::SMESH_IDSource_var mySelectedObject;
87
88   bool                   myBusy;
89   SMESH::SMESH_Mesh_var  myMesh;
90   SMESH_Actor*           myActor;
91   SMESH_LogicalFilter*   myMeshOrSubMeshOrGroupFilter;
92
93   QGroupBox*             GroupConstructors;
94   QRadioButton*          Constructor1;
95   QGroupBox*             GroupButtons;
96   QPushButton*           buttonOk;
97   QPushButton*           buttonCancel;
98   QPushButton*           buttonApply;
99   QPushButton*           buttonHelp;
100   QGroupBox*             GroupArguments;
101   QLabel*                TextLabelElements;
102   QPushButton*           SelectElementsButton;
103   QLineEdit*             LineEditElements;
104   QCheckBox*             CheckBoxMesh;
105   QLabel*                TextLabelNodes;
106   QPushButton*           SelectNodesButton;
107   QLineEdit*             LineEditNodes;
108   QLabel*                TextLabelMethod;
109   QComboBox*             ComboBoxMethod;
110   QLabel*                TextLabelLimit;
111   SalomeApp_IntSpinBox*  SpinBox_IterationLimit;
112   QLabel*                TextLabelAspectRatio;
113   SMESHGUI_SpinBox*      SpinBox_AspectRatio;
114   QCheckBox*             CheckBoxParametric;
115
116   QString                myHelpFileName;
117     
118 private slots:
119   void                   ClickOnOk();
120   void                   ClickOnCancel();
121   bool                   ClickOnApply();
122   void                   ClickOnHelp();
123   void                   SetEditCurrentArgument();
124   void                   SelectionIntoArgument();
125   void                   DeactivateActiveDialog();
126   void                   ActivateThisDialog();
127   void                   onTextChange( const QString& );
128   void                   onSelectMesh( bool );
129 };
130
131 #endif // SMESHGUI_SMOOTHINGDLG_H