Salome HOME
cf9d195ff174681e70afa55b8eb5a7dfd7d3a0c7
[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_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   SMESHGUI*              mySMESHGUI;              /* Current SMESHGUI object */
75   SMESHGUI_IdValidator*  myIdValidator;
76   LightApp_SelectionMgr* mySelectionMgr;          /* User shape selection */
77   QString                myElementsId;
78   int                    myNbOkElements;          /* to check when elements are defined */
79   int                    myNbOkNodes;             /* to check when fixed nodes are defined */
80   int                    myConstructorId;         /* Current constructor id = radio button id */
81   QLineEdit*             myEditCurrentArgument;   /* Current  LineEdit */
82   SVTK_Selector*         mySelector;
83
84   bool                   myBusy;
85   SMESH::SMESH_Mesh_var  myMesh;
86   SMESH_Actor*           myActor;
87   SMESH_LogicalFilter*   myMeshOrSubMeshOrGroupFilter;
88
89   QGroupBox*             GroupConstructors;
90   QRadioButton*          Constructor1;
91   QGroupBox*             GroupButtons;
92   QPushButton*           buttonOk;
93   QPushButton*           buttonCancel;
94   QPushButton*           buttonApply;
95   QPushButton*           buttonHelp;
96   QGroupBox*             GroupArguments;
97   QLabel*                TextLabelElements;
98   QPushButton*           SelectElementsButton;
99   QLineEdit*             LineEditElements;
100   QCheckBox*             CheckBoxMesh;
101   QLabel*                TextLabelNodes;
102   QPushButton*           SelectNodesButton;
103   QLineEdit*             LineEditNodes;
104   QLabel*                TextLabelMethod;
105   QComboBox*             ComboBoxMethod;
106   QLabel*                TextLabelLimit;
107   QSpinBox*              SpinBox_IterationLimit;
108   QLabel*                TextLabelAspectRatio;
109   SMESHGUI_SpinBox*      SpinBox_AspectRatio;
110   QCheckBox*             CheckBoxParametric;
111
112   QString                myHelpFileName;
113     
114 private slots:
115   void                   ClickOnOk();
116   void                   ClickOnCancel();
117   void                   ClickOnApply();
118   void                   ClickOnHelp();
119   void                   SetEditCurrentArgument();
120   void                   SelectionIntoArgument();
121   void                   DeactivateActiveDialog();
122   void                   ActivateThisDialog();
123   void                   onTextChange( const QString& );
124   void                   onSelectMesh( bool );
125 };
126
127 #endif // SMESHGUI_SMOOTHINGDLG_H