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