1 // Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef DIALOGBOX_ADD_QUADRATIC_ELEMENT_H
21 #define DIALOGBOX_ADD_QUADRATIC_ELEMENT_H
23 #include "LightApp_SelectionMgr.h"
41 struct TElementSimulation;
45 #include <SALOMEconfig.h>
46 #include CORBA_SERVER_HEADER(SMESH_Mesh)
48 enum { QUAD_EDGE, QUAD_TRIANGLE, QUAD_QUADRANGLE, QUAD_TETRAHEDRON, QUAD_PYRAMID, QUAD_PENTAHEDRON, QUAD_HEXAHEDRON };
50 //=================================================================================
51 // class : SMESHGUI_AddQuadraticElementDlg
53 //=================================================================================
54 class SMESHGUI_AddQuadraticElementDlg : public QDialog
59 SMESHGUI_AddQuadraticElementDlg( SMESHGUI* theModule,
62 bool modal = FALSE, WFlags fl = 0 );
63 ~SMESHGUI_AddQuadraticElementDlg();
67 void closeEvent (QCloseEvent*);
68 void hideEvent (QHideEvent*); /* ESC key */
69 void enterEvent (QEvent*); /* mouse enter the QWidget */
70 void keyPressEvent(QKeyEvent*);
71 void displaySimulation();
72 void UpdateTable( bool theConersValidity = true );
76 SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */
77 LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
78 int myNbCorners; /* The required number of corners */
80 SVTK_Selector* mySelector;
82 SMESH::SMESH_Mesh_var myMesh;
84 SMESH::TElementSimulation* mySimulation;
89 QButtonGroup* GroupConstructors;
90 QRadioButton* myRadioButton1;
92 QGroupBox* GroupArguments;
93 QLineEdit* myCornerNodes;
94 QPushButton* mySelectButton;
96 QCheckBox* myReverseCB;
98 QGroupBox* GroupButtons;
99 QPushButton* buttonOk;
100 QPushButton* buttonCancel;
101 QPushButton* buttonApply;
102 QPushButton * buttonHelp;
104 QString myHelpFileName;
108 void onTextChange(const QString&);
109 void onCellTextChange(int, int);
110 void onReverse( int );
111 void onCellDoubleClicked(int, int, int, const QPoint&);
114 void ClickOnCancel();
117 void SetEditCorners() ;
118 void SelectionIntoArgument() ;
119 void DeactivateActiveDialog() ;
120 void ActivateThisDialog() ;
123 #endif // DIALOGBOX_ADD_QUADRATIC_ELEMENT_H