Salome HOME
Bug IPAL19515 - Qt4 porting. Smoothing. Name of whole mesh, submesh or group doesn...
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_RevolutionDlg.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_RevolutionDlg.h
23 // Author : Michael ZORIN, Open CASCADE S.A.S.
24 //
25
26 #ifndef SMESHGUI_REVOLUTIONDLG_H
27 #define SMESHGUI_REVOLUTIONDLG_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 QGroupBox;
41 class QLabel;
42 class QLineEdit;
43 class QPushButton;
44 class QRadioButton;
45 class QCheckBox;
46 class QSpinBox;
47 class SMESHGUI_IdValidator;
48 class SMESHGUI_SpinBox;
49 class SMESHGUI;
50 class SMESH_Actor;
51 class SVTK_Selector;
52 class LightApp_SelectionMgr;
53 class SMESH_LogicalFilter;
54
55 //=================================================================================
56 // class    : SMESHGUI_RevolutionDlg
57 // purpose  :
58 //=================================================================================
59 class SMESHGUI_EXPORT SMESHGUI_RevolutionDlg : public QDialog
60
61   Q_OBJECT
62
63 public:
64   SMESHGUI_RevolutionDlg( SMESHGUI* );
65   ~SMESHGUI_RevolutionDlg();
66
67 private:
68   void                    Init( bool = true);
69   void                    closeEvent( QCloseEvent* );
70   void                    enterEvent( QEvent* );           /* mouse enter the QWidget */
71   void                    hideEvent( QHideEvent* );        /* ESC key */
72   void                    keyPressEvent( QKeyEvent* );
73   int                     GetConstructorId();
74   bool                    IsAxisOk();
75   
76   SMESHGUI*               mySMESHGUI;              /* Current SMESHGUI object */
77   SMESHGUI_IdValidator*   myIdValidator;
78   LightApp_SelectionMgr*  mySelectionMgr;          /* User shape selection */
79   int                     myNbOkElements;          /* to check when elements are defined */
80   QString                 myElementsId;
81   QWidget*                myEditCurrentArgument;   /* Current  argument */
82   SVTK_Selector*          mySelector;
83   
84   bool                    myBusy;
85   SMESH::SMESH_Mesh_var   myMesh;
86   SMESH_Actor*            myActor;
87   SMESH_LogicalFilter*    myMeshOrSubMeshOrGroupFilter;
88
89   QGroupBox*              ConstructorsBox;
90   QButtonGroup*           GroupConstructors;
91   QRadioButton*           RadioButton1;
92   QRadioButton*           RadioButton2;
93   QGroupBox*              GroupButtons;
94   QPushButton*            buttonOk;
95   QPushButton*            buttonCancel;
96   QPushButton*            buttonApply;
97   QPushButton*            buttonHelp;
98   QGroupBox*              GroupArguments;
99   QGroupBox*              GroupAxis;
100   QLabel*                 TextLabelElements;
101   QPushButton*            SelectElementsButton;
102   QLineEdit*              LineEditElements;
103   QCheckBox*              CheckBoxMesh;
104   QCheckBox*              MakeGroupsCheck;
105   
106   QLabel*                 TextLabelPoint;
107   QPushButton*            SelectPointButton;
108   QLabel*                 TextLabelX;
109   SMESHGUI_SpinBox*       SpinBox_X;
110   QLabel*                 TextLabelY;
111   SMESHGUI_SpinBox*       SpinBox_Y;
112   QLabel*                 TextLabelZ;
113   SMESHGUI_SpinBox*       SpinBox_Z;
114   QLabel*                 TextLabelVector;
115   QPushButton*            SelectVectorButton;
116   QLabel*                 TextLabelDX;
117   SMESHGUI_SpinBox*       SpinBox_DX;
118   QLabel*                 TextLabelDY;
119   SMESHGUI_SpinBox*       SpinBox_DY;
120   QLabel*                 TextLabelDZ;
121   SMESHGUI_SpinBox*       SpinBox_DZ;
122   
123   QLabel*                 TextLabelAngle;
124   SMESHGUI_SpinBox*       SpinBox_Angle;
125   QLabel*                 TextLabelNbSteps;
126   QSpinBox*               SpinBox_NbSteps;
127   QLabel*                 TextLabelTolerance;
128   SMESHGUI_SpinBox*       SpinBox_Tolerance;
129   
130   QString                 myHelpFileName;
131   
132 private slots:
133   void                    ConstructorsClicked( int );
134   void                    ClickOnOk();
135   void                    ClickOnCancel();
136   void                    ClickOnApply();
137   void                    ClickOnHelp();
138   void                    SetEditCurrentArgument();
139   void                    SelectionIntoArgument();
140   void                    DeactivateActiveDialog();
141   void                    ActivateThisDialog();
142   void                    onTextChange( const QString& );
143   void                    onSelectMesh( bool );
144   void                    onVectorChanged();
145 };
146
147 #endif // SMESHGUI_REVOLUTIONDLG_H