Salome HOME
remove images in ascii
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_SewingDlg.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 //
23 //
24 //  File   : SMESHGUI_SewingDlg.h
25 //  Author : Michael ZORIN
26 //  Module : SMESH
27 //  $Header: 
28
29 #ifndef DIALOGBOX_SEWING_H
30 #define DIALOGBOX_SEWING_H
31
32 #include "SMESH_SMESHGUI.hxx"
33
34 #include "LightApp_SelectionMgr.h"
35
36 // QT Includes
37 #include <qdialog.h>
38
39 class QGridLayout; 
40 class QButtonGroup;
41 class QGroupBox;
42 class QLabel;
43 class QLineEdit;
44 class QPushButton;
45 class QRadioButton;
46 class QCheckBox;
47 class SMESHGUI;
48 class SMESH_Actor;
49 class SVTK_ViewWindow;
50 class SVTK_Selector;
51
52 // IDL Headers
53 #include <SALOMEconfig.h>
54 #include CORBA_SERVER_HEADER(SMESH_Mesh)
55
56
57 //=================================================================================
58 // class    : SMESHGUI_SewingDlg
59 // purpose  :
60 //=================================================================================
61 class SMESHGUI_EXPORT SMESHGUI_SewingDlg : public QDialog
62
63     Q_OBJECT
64
65 public:
66     SMESHGUI_SewingDlg( SMESHGUI*,
67                         const char* name = 0,
68                         bool modal = FALSE,
69                         WFlags fl = 0);
70     ~SMESHGUI_SewingDlg();
71
72 private:
73     void Init() ;
74     void closeEvent( QCloseEvent* e ) ;
75     void enterEvent ( QEvent * );                          /* mouse enter the QWidget */
76     void hideEvent ( QHideEvent * );                       /* ESC key */
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