]> SALOME platform Git repositories - modules/smesh.git/blob - src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.h
Salome HOME
Minor DOC changes
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_ExtrusionAlongPathDlg.h
1 // Copyright (C) 2007-2016  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_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 LightApp_SelectionMgr;
49 class SMESHGUI;
50 class SMESHGUI_3TypesSelector;
51 class SMESHGUI_FilterDlg;
52 class SMESHGUI_IdValidator;
53 class SMESHGUI_SpinBox;
54 class SMESH_Actor;
55 class SUIT_SelectionFilter;
56 class SVTK_Selector;
57
58 //=================================================================================
59 // class    : SMESHGUI_ExtrusionAlongPathDlg
60 // purpose  :
61 //=================================================================================
62 class SMESHGUI_EXPORT SMESHGUI_ExtrusionAlongPathDlg : public SMESHGUI_PreviewDlg
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   void                      SetEditCurrentArgument( QPushButton* );
80
81   bool                      isValid();
82   bool                      isValuesValid();
83   
84   SMESH::double_array_var   getAngles();
85
86   void                      updateLinearAngles();
87   
88   SMESHGUI_IdValidator*     myIdValidator;
89   LightApp_SelectionMgr*    mySelectionMgr;        /* User shape selection */
90   SVTK_Selector*            mySelector;
91   QWidget*                  myEditCurrentArgument; /* Current  argument */
92
93   bool                      myBusy;
94   SMESH::SMESH_IDSource_var myPath;
95   SUIT_SelectionFilter*     myPathMeshFilter;
96   QList<double>             myAnglesList;
97
98   // widgets
99   SMESHGUI_3TypesSelector*  SelectorWdg;
100   QGroupBox*                GroupArguments;
101   QGroupBox*                PathGrp;
102   QPushButton*              SelectPathMeshButton;
103   QLineEdit*                PathMeshLineEdit;
104   QPushButton*              SelectStartPointButton;
105   QLineEdit*                StartPointLineEdit;
106   QCheckBox*                LinearAnglesCheck;
107   QGroupBox*                AnglesGrp;
108   QListWidget*              AnglesList;
109   QToolButton*              AddAngleButton;
110   QToolButton*              RemoveAngleButton;
111   SMESHGUI_SpinBox*         AngleSpin;
112   QGroupBox*                BasePointGrp;
113   QPushButton*              SelectBasePointButton;
114   SMESHGUI_SpinBox*         XSpin;
115   SMESHGUI_SpinBox*         YSpin;
116   SMESHGUI_SpinBox*         ZSpin;
117   QCheckBox*                MakeGroupsCheck;
118
119   QGroupBox*                GroupButtons;
120   QPushButton*              OkButton;
121   QPushButton*              ApplyButton;
122   QPushButton*              CloseButton;
123   QPushButton*              HelpButton;
124
125   QString                   myHelpFileName;
126
127 protected slots:
128   void                      reject();
129   virtual void              onDisplaySimulation( bool );
130
131 private slots:
132   void                      ClickOnOk();
133   bool                      ClickOnApply();
134   void                      ClickOnHelp();
135   void                      CheckIsEnable();
136   void                      SetEditCurrentArgument();
137   void                      SelectionIntoArgument();
138   void                      DeactivateActiveDialog();
139   void                      ActivateThisDialog();
140   void                      onTextChange( const QString& );
141   void                      OnAngleAdded();
142   void                      OnAngleRemoved();
143   void                      onOpenView();
144   void                      onCloseView();
145 };
146
147 #endif // SMESHGUI_EXTRUSIONALONGPATHDLG_H