Salome HOME
6885b738e25e7acadcea5ed41e88e42107d215a1
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_ExtrusionAlongPathDlg.h
1 // SMESH SMESHGUI : GUI for SMESH component
2 //
3 // Copyright (C) 2003  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 // File   : SMESHGUI_ExtrusionAlongPathDlg.h
23 // Author : Vadim SANDLER, Open CASCADE S.A.S.
24 //
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 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 QDialog
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   SMESHGUI*                 mySMESHGUI;            /* Current SMESHGUI object */
82   SMESHGUI_IdValidator*     myIdValidator;
83   LightApp_SelectionMgr*    mySelectionMgr;        /* User shape selection */
84   SVTK_Selector*            mySelector;
85
86   QWidget*                  myEditCurrentArgument; /* Current  argument */
87
88   bool                      myBusy;
89   SMESH::SMESH_Mesh_var     myMesh;
90   SMESH_Actor*              myMeshActor;
91   SMESH::SMESH_IDSource_var myIDSource;
92   SMESH::SMESH_Mesh_var     myPathMesh;
93   GEOM::GEOM_Object_var     myPathShape;
94   SUIT_SelectionFilter*     myElementsFilter;
95   SUIT_SelectionFilter*     myPathMeshFilter;
96   int                       myType;
97
98   // widgets
99   QGroupBox*                ConstructorsBox;
100   QButtonGroup*             GroupConstructors;
101   QRadioButton*             Elements1dRB;
102   QRadioButton*             Elements2dRB;
103
104   QGroupBox*                GroupArguments;
105   QLabel*                   ElementsLab;
106   QToolButton*              SelectElementsButton;
107   QLineEdit*                ElementsLineEdit;
108   QCheckBox*                MeshCheck;
109   QGroupBox*                PathGrp;
110   QToolButton*              SelectPathMeshButton;
111   QLineEdit*                PathMeshLineEdit;
112   QToolButton*              SelectPathShapeButton;
113   QLineEdit*                PathShapeLineEdit;
114   QToolButton*              SelectStartPointButton;
115   QLineEdit*                StartPointLineEdit;
116   QCheckBox*                LinearAnglesCheck;
117   QGroupBox*                AnglesGrp;
118   QListWidget*              AnglesList;
119   QToolButton*              AddAngleButton;
120   QToolButton*              RemoveAngleButton;
121   SMESHGUI_SpinBox*         AngleSpin;
122   QGroupBox*                BasePointGrp;
123   QToolButton*              SelectBasePointButton;
124   SMESHGUI_SpinBox*         XSpin;
125   SMESHGUI_SpinBox*         YSpin;
126   SMESHGUI_SpinBox*         ZSpin;
127   QCheckBox*                MakeGroupsCheck;
128
129   QGroupBox*                GroupButtons;
130   QPushButton*              OkButton;
131   QPushButton*              ApplyButton;
132   QPushButton*              CloseButton;
133   QPushButton*              HelpButton;
134
135   QString                   myHelpFileName;
136
137 protected slots:
138   void                      reject();
139
140 private slots:
141   void                      ConstructorsClicked( int );
142   void                      ClickOnOk();
143   bool                      ClickOnApply();
144   void                      ClickOnHelp();
145   void                      SetEditCurrentArgument();
146   void                      SelectionIntoArgument();
147   void                      DeactivateActiveDialog();
148   void                      ActivateThisDialog();
149   void                      onTextChange( const QString& );
150   void                      onSelectMesh();
151   void                      OnAngleAdded();
152   void                      OnAngleRemoved();
153 };
154
155 #endif // SMESHGUI_EXTRUSIONALONGPATHDLG_H