1 // Copyright (C) 2007-2010 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"
37 #include <SALOMEconfig.h>
38 #include CORBA_SERVER_HEADER(SMESH_Mesh)
48 class SalomeApp_IntSpinBox;
49 class SMESHGUI_IdValidator;
50 class SMESHGUI_SpinBox;
51 class SMESHGUI_FilterDlg;
54 class LightApp_SelectionMgr;
55 class SMESH_LogicalFilter;
57 //=================================================================================
58 // class : SMESHGUI_SmoothingDlg
60 //=================================================================================
61 class SMESHGUI_EXPORT SMESHGUI_SmoothingDlg : public QDialog
66 SMESHGUI_SmoothingDlg( SMESHGUI* );
67 ~SMESHGUI_SmoothingDlg();
71 void closeEvent( QCloseEvent* );
72 void enterEvent( QEvent* ); /* mouse enter the QWidget */
73 void hideEvent( QHideEvent* ); /* ESC key */
74 void keyPressEvent( QKeyEvent* );
75 void setFilters( const bool theIsElem );
79 SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */
80 SMESHGUI_IdValidator* myIdValidator;
81 LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
83 int myNbOkElements; /* to check when elements are defined */
84 int myNbOkNodes; /* to check when fixed nodes are defined */
85 int myConstructorId; /* Current constructor id = radio button id */
86 QLineEdit* myEditCurrentArgument; /* Current LineEdit */
87 SVTK_Selector* mySelector;
89 SMESH::SMESH_IDSource_var mySelectedObject;
92 SMESH::SMESH_Mesh_var myMesh;
94 SMESH_LogicalFilter* myMeshOrSubMeshOrGroupFilter;
96 QGroupBox* GroupConstructors;
97 QRadioButton* Constructor1;
98 QGroupBox* GroupButtons;
99 QPushButton* buttonOk;
100 QPushButton* buttonCancel;
101 QPushButton* buttonApply;
102 QPushButton* buttonHelp;
103 QGroupBox* GroupArguments;
104 QLabel* TextLabelElements;
105 QPushButton* SelectElementsButton;
106 QLineEdit* LineEditElements;
107 QCheckBox* CheckBoxMesh;
108 QLabel* TextLabelNodes;
109 QPushButton* SelectNodesButton;
110 QLineEdit* LineEditNodes;
111 QLabel* TextLabelMethod;
112 QComboBox* ComboBoxMethod;
113 QLabel* TextLabelLimit;
114 SalomeApp_IntSpinBox* SpinBox_IterationLimit;
115 QLabel* TextLabelAspectRatio;
116 SMESHGUI_SpinBox* SpinBox_AspectRatio;
117 QCheckBox* CheckBoxParametric;
119 QString myHelpFileName;
121 QPushButton* myElemFilterBtn;
122 SMESHGUI_FilterDlg* myFilterDlg;
126 void ClickOnCancel();
129 void SetEditCurrentArgument();
130 void SelectionIntoArgument();
131 void DeactivateActiveDialog();
132 void ActivateThisDialog();
133 void onTextChange( const QString& );
134 void onSelectMesh( bool );
135 void setElemFilters();
136 void setNodeFilters();
139 #endif // SMESHGUI_SMOOTHINGDLG_H