]> SALOME platform Git repositories - modules/smesh.git/blob - src/SMESHGUI/SMESHGUI_SmoothingDlg.h
Salome HOME
bos #29143 [CEA] Compute takes too much time in polyhedron per solid use case
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_SmoothingDlg.h
1 // Copyright (C) 2007-2021  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, or (at your option) any later version.
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                   enterEvent( QEvent* );        /* mouse enter the QWidget */
75   void                   keyPressEvent( QKeyEvent* );
76   void                   setFilters( const bool theIsElem );
77
78   bool                   isValid();
79   
80   SMESHGUI*              mySMESHGUI;              /* Current SMESHGUI object */
81   SMESHGUI_IdValidator*  myIdValidator;
82   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;
88
89   SMESH::SMESH_IDSource_var mySelectedObject;
90
91   bool                   myBusy;
92   SMESH::SMESH_Mesh_var  myMesh;
93   SMESH_Actor*           myActor;
94   Handle(SALOME_InteractiveObject) myIO;
95   SMESH_LogicalFilter*   myMeshOrSubMeshOrGroupFilter;
96
97   QGroupBox*             GroupConstructors;
98   QRadioButton*          Constructor1;
99   QGroupBox*             GroupButtons;
100   QPushButton*           buttonOk;
101   QPushButton*           buttonCancel;
102   QPushButton*           buttonApply;
103   QPushButton*           buttonHelp;
104   QGroupBox*             GroupArguments;
105   QLabel*                TextLabelElements;
106   QPushButton*           SelectElementsButton;
107   QLineEdit*             LineEditElements;
108   QCheckBox*             CheckBoxMesh;
109   QLabel*                TextLabelNodes;
110   QPushButton*           SelectNodesButton;
111   QLineEdit*             LineEditNodes;
112   QLabel*                TextLabelMethod;
113   QComboBox*             ComboBoxMethod;
114   QLabel*                TextLabelLimit;
115   SalomeApp_IntSpinBox*  SpinBox_IterationLimit;
116   QLabel*                TextLabelAspectRatio;
117   SMESHGUI_SpinBox*      SpinBox_AspectRatio;
118   QCheckBox*             CheckBoxParametric;
119
120   QString                myHelpFileName;
121
122   QPushButton*           myElemFilterBtn;
123   SMESHGUI_FilterDlg*    myFilterDlg;
124    
125 protected slots:
126   virtual void           reject();
127
128
129 private slots:
130   void                   ClickOnOk();
131   bool                   ClickOnApply();
132   void                   ClickOnHelp();
133   void                   SetEditCurrentArgument();
134   void                   SelectionIntoArgument();
135   void                   DeactivateActiveDialog();
136   void                   ActivateThisDialog();
137   void                   onTextChange( const QString& );
138   void                   onSelectMesh( bool );
139   void                   onOpenView();
140   void                   onCloseView();
141   void                   setElemFilters();
142   void                   setNodeFilters();
143 };
144
145 #endif // SMESHGUI_SMOOTHINGDLG_H