]> SALOME platform Git repositories - modules/smesh.git/blob - src/SMESHGUI/SMESHGUI_SmoothingDlg.h
Salome HOME
fix a comment
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_SmoothingDlg.h
1 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  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
23 // SMESH SMESHGUI : GUI for SMESH component
24 // File   : SMESHGUI_SmoothingDlg.h
25 // Author : Michael ZORIN, Open CASCADE S.A.S.
26 //
27 #ifndef SMESHGUI_SMOOTHINGDLG_H
28 #define SMESHGUI_SMOOTHINGDLG_H
29
30 // SMESH includes
31 #include "SMESH_SMESHGUI.hxx"
32
33 // Qt includes
34 #include <QDialog>
35
36 // SALOME GUI includes
37 #include <SALOME_InteractiveObject.hxx>
38
39 // IDL includes
40 #include <SALOMEconfig.h>
41 #include CORBA_SERVER_HEADER(SMESH_Mesh)
42
43 class QGroupBox;
44 class QLabel;
45 class QLineEdit;
46 class QPushButton;
47 class QRadioButton;
48 class QComboBox;
49 class QCheckBox;
50 class SMESHGUI;
51 class SalomeApp_IntSpinBox;
52 class SMESHGUI_IdValidator;
53 class SMESHGUI_SpinBox;
54 class SMESHGUI_FilterDlg;
55 class SMESH_Actor;
56 class SVTK_Selector;
57 class LightApp_SelectionMgr;
58 class SMESH_LogicalFilter;
59
60 //=================================================================================
61 // class    : SMESHGUI_SmoothingDlg
62 // purpose  :
63 //=================================================================================
64 class SMESHGUI_EXPORT SMESHGUI_SmoothingDlg : public QDialog
65
66   Q_OBJECT
67
68 public:
69   SMESHGUI_SmoothingDlg( SMESHGUI* );
70   ~SMESHGUI_SmoothingDlg();
71
72 private:
73   void                   Init();
74   void                   closeEvent( QCloseEvent* );
75   void                   enterEvent( QEvent* );        /* mouse enter the QWidget */
76   void                   hideEvent( QHideEvent* );     /* ESC key */
77   void                   keyPressEvent( QKeyEvent* );
78   void                   setFilters( const bool theIsElem );
79
80   bool                   isValid();
81   
82   SMESHGUI*              mySMESHGUI;              /* Current SMESHGUI object */
83   SMESHGUI_IdValidator*  myIdValidator;
84   LightApp_SelectionMgr* mySelectionMgr;          /* User shape selection */
85   int                    myNbOkElements;          /* to check when elements are defined */
86   int                    myNbOkNodes;             /* to check when fixed nodes are defined */
87   int                    myConstructorId;         /* Current constructor id = radio button id */
88   QLineEdit*             myEditCurrentArgument;   /* Current  LineEdit */
89   SVTK_Selector*         mySelector;
90
91   SMESH::SMESH_IDSource_var mySelectedObject;
92
93   bool                   myBusy;
94   SMESH::SMESH_Mesh_var  myMesh;
95   SMESH_Actor*           myActor;
96   Handle(SALOME_InteractiveObject) myIO;
97   SMESH_LogicalFilter*   myMeshOrSubMeshOrGroupFilter;
98
99   QGroupBox*             GroupConstructors;
100   QRadioButton*          Constructor1;
101   QGroupBox*             GroupButtons;
102   QPushButton*           buttonOk;
103   QPushButton*           buttonCancel;
104   QPushButton*           buttonApply;
105   QPushButton*           buttonHelp;
106   QGroupBox*             GroupArguments;
107   QLabel*                TextLabelElements;
108   QPushButton*           SelectElementsButton;
109   QLineEdit*             LineEditElements;
110   QCheckBox*             CheckBoxMesh;
111   QLabel*                TextLabelNodes;
112   QPushButton*           SelectNodesButton;
113   QLineEdit*             LineEditNodes;
114   QLabel*                TextLabelMethod;
115   QComboBox*             ComboBoxMethod;
116   QLabel*                TextLabelLimit;
117   SalomeApp_IntSpinBox*  SpinBox_IterationLimit;
118   QLabel*                TextLabelAspectRatio;
119   SMESHGUI_SpinBox*      SpinBox_AspectRatio;
120   QCheckBox*             CheckBoxParametric;
121
122   QString                myHelpFileName;
123
124   QPushButton*           myElemFilterBtn;
125   SMESHGUI_FilterDlg*    myFilterDlg;
126    
127 private slots:
128   void                   ClickOnOk();
129   void                   ClickOnCancel();
130   bool                   ClickOnApply();
131   void                   ClickOnHelp();
132   void                   SetEditCurrentArgument();
133   void                   SelectionIntoArgument();
134   void                   DeactivateActiveDialog();
135   void                   ActivateThisDialog();
136   void                   onTextChange( const QString& );
137   void                   onSelectMesh( bool );
138   void                   setElemFilters();
139   void                   setNodeFilters();
140 };
141
142 #endif // SMESHGUI_SMOOTHINGDLG_H