1 // Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // SMESH SMESHGUI : GUI for SMESH component
24 // File : SMESHGUI_SmoothingDlg.h
25 // Author : Michael ZORIN, Open CASCADE S.A.S.
27 #ifndef SMESHGUI_SMOOTHINGDLG_H
28 #define SMESHGUI_SMOOTHINGDLG_H
31 #include "SMESH_SMESHGUI.hxx"
36 // SALOME GUI includes
37 #include <SALOME_InteractiveObject.hxx>
40 #include <SALOMEconfig.h>
41 #include CORBA_SERVER_HEADER(SMESH_Mesh)
51 class SalomeApp_IntSpinBox;
52 class SMESHGUI_IdValidator;
53 class SMESHGUI_SpinBox;
54 class SMESHGUI_FilterDlg;
57 class LightApp_SelectionMgr;
58 class SMESH_LogicalFilter;
60 //=================================================================================
61 // class : SMESHGUI_SmoothingDlg
63 //=================================================================================
64 class SMESHGUI_EXPORT SMESHGUI_SmoothingDlg : public QDialog
69 SMESHGUI_SmoothingDlg( SMESHGUI* );
70 ~SMESHGUI_SmoothingDlg();
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 );
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;
91 SMESH::SMESH_IDSource_var mySelectedObject;
94 SMESH::SMESH_Mesh_var myMesh;
96 Handle(SALOME_InteractiveObject) myIO;
97 SMESH_LogicalFilter* myMeshOrSubMeshOrGroupFilter;
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;
122 QString myHelpFileName;
124 QPushButton* myElemFilterBtn;
125 SMESHGUI_FilterDlg* myFilterDlg;
129 void ClickOnCancel();
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();
142 #endif // SMESHGUI_SMOOTHINGDLG_H