]> SALOME platform Git repositories - modules/smesh.git/blob - src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.h
Salome HOME
Fix OwnHypothesis()
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_ExtrusionAlongPathDlg.h
1 // Copyright (C) 2007-2013  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_ExtrusionAlongPathDlg.h
25 // Author : Vadim SANDLER, Open CASCADE S.A.S.
26 //
27 #ifndef SMESHGUI_EXTRUSIONALONGPATHDLG_H
28 #define SMESHGUI_EXTRUSIONALONGPATHDLG_H
29
30 // SMESH includes
31 #include "SMESH_SMESHGUI.hxx"
32 #include "SMESHGUI_PreviewDlg.h"
33
34 // IDL includes
35 #include <SALOMEconfig.h>
36 #include CORBA_SERVER_HEADER(SMESH_Mesh)
37
38 class QButtonGroup;
39 class QRadioButton;
40 class QGroupBox;
41 class QLabel;
42 class QToolButton;
43 class QLineEdit;
44 class QCheckBox;
45 class QListWidget;
46 class QPushButton;
47
48 class SMESHGUI;
49 class SMESH_Actor;
50 class SMESHGUI_IdValidator;
51 class SMESHGUI_SpinBox;
52 class SMESHGUI_FilterDlg;
53 class SVTK_Selector;
54 class LightApp_SelectionMgr;
55 class SUIT_SelectionFilter;
56
57 //=================================================================================
58 // class    : SMESHGUI_ExtrusionAlongPathDlg
59 // purpose  :
60 //=================================================================================
61 class SMESHGUI_EXPORT SMESHGUI_ExtrusionAlongPathDlg : public SMESHGUI_PreviewDlg
62 {
63   Q_OBJECT
64
65   class SetBusy;
66   friend class SetBusy;
67
68 public:
69   SMESHGUI_ExtrusionAlongPathDlg( SMESHGUI* );
70   ~SMESHGUI_ExtrusionAlongPathDlg();
71
72   bool                      eventFilter( QObject*, QEvent* );
73
74 private:
75   void                      Init( bool = true );
76   void                      enterEvent( QEvent* );                           /* mouse enter the QWidget */
77   void                      keyPressEvent( QKeyEvent* );
78   int                       GetConstructorId();
79   void                      SetEditCurrentArgument( QToolButton* );
80
81   bool                      isValid();
82   bool                      isValuesValid();
83   
84   SMESH::long_array_var     getSelectedElements();
85   SMESH::double_array_var   getAngles();
86
87   void                      updateLinearAngles();
88   
89   SMESHGUI_IdValidator*     myIdValidator;
90   LightApp_SelectionMgr*    mySelectionMgr;        /* User shape selection */
91   SVTK_Selector*            mySelector;
92
93   QWidget*                  myEditCurrentArgument; /* Current  argument */
94
95   bool                      myBusy;
96   SMESH::SMESH_Mesh_var     myMesh;
97   SMESH_Actor*              myMeshActor;
98   SMESH::SMESH_IDSource_var myIDSource;
99   //SMESH::SMESH_Mesh_var     myPathMesh;
100   SMESH::SMESH_IDSource_var myPath;
101   //GEOM::GEOM_Object_var     myPathShape;
102   SUIT_SelectionFilter*     myElementsFilter;
103   SUIT_SelectionFilter*     myPathMeshFilter;
104   int                       myType;
105   QList<double>             myAnglesList;
106
107   // widgets
108   QGroupBox*                ConstructorsBox;
109   QButtonGroup*             GroupConstructors;
110   QRadioButton*             Elements1dRB;
111   QRadioButton*             Elements2dRB;
112
113   QGroupBox*                GroupArguments;
114   QLabel*                   ElementsLab;
115   QToolButton*              SelectElementsButton;
116   QLineEdit*                ElementsLineEdit;
117   QCheckBox*                MeshCheck;
118   QGroupBox*                PathGrp;
119   QToolButton*              SelectPathMeshButton;
120   QLineEdit*                PathMeshLineEdit;
121   //QToolButton*              SelectPathShapeButton;
122   //QLineEdit*                PathShapeLineEdit;
123   QToolButton*              SelectStartPointButton;
124   QLineEdit*                StartPointLineEdit;
125   QCheckBox*                LinearAnglesCheck;
126   QGroupBox*                AnglesGrp;
127   QListWidget*              AnglesList;
128   QToolButton*              AddAngleButton;
129   QToolButton*              RemoveAngleButton;
130   SMESHGUI_SpinBox*         AngleSpin;
131   QGroupBox*                BasePointGrp;
132   QToolButton*              SelectBasePointButton;
133   SMESHGUI_SpinBox*         XSpin;
134   SMESHGUI_SpinBox*         YSpin;
135   SMESHGUI_SpinBox*         ZSpin;
136   QCheckBox*                MakeGroupsCheck;
137
138   QGroupBox*                GroupButtons;
139   QPushButton*              OkButton;
140   QPushButton*              ApplyButton;
141   QPushButton*              CloseButton;
142   QPushButton*              HelpButton;
143
144   QString                   myHelpFileName;
145
146   QPushButton*              myFilterBtn;
147   SMESHGUI_FilterDlg*       myFilterDlg;
148    
149 protected slots:
150   void                      reject();
151   virtual void              onDisplaySimulation( bool );
152
153 private slots:
154   void                      ConstructorsClicked( int );
155   void                      ClickOnOk();
156   bool                      ClickOnApply();
157   void                      ClickOnHelp();
158   void                      SetEditCurrentArgument();
159   void                      SelectionIntoArgument();
160   void                      DeactivateActiveDialog();
161   void                      ActivateThisDialog();
162   void                      onTextChange( const QString& );
163   void                      onSelectMesh();
164   void                      OnAngleAdded();
165   void                      OnAngleRemoved();
166   void                      setFilters();
167 };
168
169 #endif // SMESHGUI_EXTRUSIONALONGPATHDLG_H