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