Salome HOME
Porting SMESH module to Qt 4
[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 QSpinBox;
47 class SMESHGUI_SpinBox;
48 class SMESHGUI;
49 class SMESH_Actor;
50 class SVTK_Selector;
51 class LightApp_SelectionMgr;
52 class SMESH_LogicalFilter;
53
54 //=================================================================================
55 // class    : SMESHGUI_SmoothingDlg
56 // purpose  :
57 //=================================================================================
58 class SMESHGUI_EXPORT SMESHGUI_SmoothingDlg : public QDialog
59
60   Q_OBJECT
61
62 public:
63   SMESHGUI_SmoothingDlg( SMESHGUI* );
64   ~SMESHGUI_SmoothingDlg();
65
66 private:
67   void                   Init();
68   void                   closeEvent( QCloseEvent* );
69   void                   enterEvent( QEvent* );        /* mouse enter the QWidget */
70   void                   hideEvent( QHideEvent* );     /* ESC key */
71   void                   keyPressEvent( QKeyEvent* );
72
73   SMESHGUI*              mySMESHGUI;              /* Current SMESHGUI object */
74   LightApp_SelectionMgr* mySelectionMgr;          /* User shape selection */
75   QString                myElementsId;
76   int                    myNbOkElements;          /* to check when elements are defined */
77   int                    myNbOkNodes;             /* to check when fixed nodes are defined */
78   int                    myConstructorId;         /* Current constructor id = radio button id */
79   QLineEdit*             myEditCurrentArgument;   /* Current  LineEdit */
80   SVTK_Selector*         mySelector;
81
82   bool                   myBusy;
83   SMESH::SMESH_Mesh_var  myMesh;
84   SMESH_Actor*           myActor;
85   SMESH_LogicalFilter*   myMeshOrSubMeshOrGroupFilter;
86
87   QGroupBox*             GroupConstructors;
88   QRadioButton*          Constructor1;
89   QGroupBox*             GroupButtons;
90   QPushButton*           buttonOk;
91   QPushButton*           buttonCancel;
92   QPushButton*           buttonApply;
93   QPushButton*           buttonHelp;
94   QGroupBox*             GroupArguments;
95   QLabel*                TextLabelElements;
96   QPushButton*           SelectElementsButton;
97   QLineEdit*             LineEditElements;
98   QCheckBox*             CheckBoxMesh;
99   QLabel*                TextLabelNodes;
100   QPushButton*           SelectNodesButton;
101   QLineEdit*             LineEditNodes;
102   QLabel*                TextLabelMethod;
103   QComboBox*             ComboBoxMethod;
104   QLabel*                TextLabelLimit;
105   QSpinBox*              SpinBox_IterationLimit;
106   QLabel*                TextLabelAspectRatio;
107   SMESHGUI_SpinBox*      SpinBox_AspectRatio;
108   QCheckBox*             CheckBoxParametric;
109
110   QString                myHelpFileName;
111     
112 private slots:
113   void                   ClickOnOk();
114   void                   ClickOnCancel();
115   void                   ClickOnApply();
116   void                   ClickOnHelp();
117   void                   SetEditCurrentArgument();
118   void                   SelectionIntoArgument();
119   void                   DeactivateActiveDialog();
120   void                   ActivateThisDialog();
121   void                   onTextChange( const QString& );
122   void                   onSelectMesh( bool );
123 };
124
125 #endif // SMESHGUI_SMOOTHINGDLG_H