Salome HOME
Issue 0020406: Time compilation when recompiling
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_SewingDlg.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_SewingDlg.h
24 //  Author : Michael ZORIN
25 //  Module : SMESH
26 //  $Header: 
27 //
28 #ifndef DIALOGBOX_SEWING_H
29 #define DIALOGBOX_SEWING_H
30
31 #include "SMESH_SMESHGUI.hxx"
32
33 #include "LightApp_SelectionMgr.h"
34
35 // QT Includes
36 #include <qdialog.h>
37
38 class QGridLayout; 
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 SVTK_ViewWindow;
49 class SVTK_Selector;
50
51 // IDL Headers
52 #include <SALOMEconfig.h>
53 #include CORBA_SERVER_HEADER(SMESH_Mesh)
54
55
56 //=================================================================================
57 // class    : SMESHGUI_SewingDlg
58 // purpose  :
59 //=================================================================================
60 class SMESHGUI_EXPORT SMESHGUI_SewingDlg : public QDialog
61
62     Q_OBJECT
63
64 public:
65     SMESHGUI_SewingDlg( SMESHGUI*,
66                         const char* name = 0,
67                         bool modal = FALSE,
68                         WFlags fl = 0);
69     ~SMESHGUI_SewingDlg();
70
71 private:
72     void Init() ;
73     void closeEvent( QCloseEvent* e ) ;
74     void enterEvent ( QEvent * );                          /* mouse enter the QWidget */
75     void hideEvent ( QHideEvent * );                       /* ESC key */
76     void keyPressEvent(QKeyEvent*);
77     int  GetConstructorId();
78     bool IsValid();
79     
80     SMESHGUI*                     mySMESHGUI;              /* Current SMESHGUI object */
81     LightApp_SelectionMgr*        mySelectionMgr;          /* User shape selection */
82     int                           myOk1, myOk2, myOk3, myOk4, myOk5, myOk6;    
83     QLineEdit*                    myEditCurrentArgument;   /* Current  LineEdit */
84     SVTK_Selector*                mySelector;
85     
86     bool                          myBusy;
87     SMESH::SMESH_Mesh_var         myMesh;
88     SMESH_Actor*                  myActor;
89         
90     QButtonGroup* GroupConstructors;
91     QRadioButton* RadioButton1;
92     QRadioButton* RadioButton2;
93     QRadioButton* RadioButton3;
94     QRadioButton* RadioButton4;
95     QGroupBox* GroupButtons;
96     QPushButton* buttonOk;
97     QPushButton* buttonCancel;
98     QPushButton* buttonApply;
99     QPushButton* buttonHelp;
100     QGroupBox* GroupArguments;
101     QGroupBox* SubGroup1;
102     QGroupBox* SubGroup2;
103     QLabel* TextLabel1;
104     QLabel* TextLabel2;
105     QLabel* TextLabel3;
106     QLabel* TextLabel4;
107     QLabel* TextLabel5;
108     QLabel* TextLabel6;
109     QPushButton* SelectButton1;
110     QPushButton* SelectButton2;
111     QPushButton* SelectButton3;
112     QPushButton* SelectButton4;
113     QPushButton* SelectButton5;
114     QPushButton* SelectButton6;
115     QLineEdit* LineEdit1;
116     QLineEdit* LineEdit2;
117     QLineEdit* LineEdit3;
118     QLineEdit* LineEdit4;
119     QLineEdit* LineEdit5;
120     QLineEdit* LineEdit6;
121     QCheckBox* CheckBoxMerge;
122     QCheckBox* CheckBoxPolygons;
123     QCheckBox* CheckBoxPolyedrs;
124
125     QString myHelpFileName;
126
127 private slots:
128
129     void ConstructorsClicked(int constructorId);
130     void ClickOnOk();
131     void ClickOnCancel();
132     bool ClickOnApply();
133     void ClickOnHelp();
134     void SetEditCurrentArgument() ;
135     void SelectionIntoArgument(bool isSelectionChanged = true) ;
136     void DeactivateActiveDialog() ;
137     void ActivateThisDialog() ;
138     void onTextChange(const QString&);
139     
140 protected:
141     QGridLayout* SMESHGUI_SewingDlgLayout;
142     QGridLayout* GroupConstructorsLayout;
143     QGridLayout* GroupButtonsLayout;
144     QGridLayout* GroupArgumentsLayout;
145 };
146
147 #endif // DIALOGBOX_SEWING_H