1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 #ifndef DIALOGBOX_ADD_QUADRATIC_ELEMENT_H
23 #define DIALOGBOX_ADD_QUADRATIC_ELEMENT_H
25 #include "LightApp_SelectionMgr.h"
43 struct TElementSimulation;
47 #include <SALOMEconfig.h>
48 #include CORBA_SERVER_HEADER(SMESH_Mesh)
50 enum { QUAD_EDGE, QUAD_TRIANGLE, QUAD_QUADRANGLE, QUAD_TETRAHEDRON, QUAD_PYRAMID, QUAD_PENTAHEDRON, QUAD_HEXAHEDRON };
52 //=================================================================================
53 // class : SMESHGUI_AddQuadraticElementDlg
55 //=================================================================================
56 class SMESHGUI_AddQuadraticElementDlg : public QDialog
61 SMESHGUI_AddQuadraticElementDlg( SMESHGUI* theModule,
64 bool modal = FALSE, WFlags fl = 0 );
65 ~SMESHGUI_AddQuadraticElementDlg();
69 void closeEvent (QCloseEvent*);
70 void hideEvent (QHideEvent*); /* ESC key */
71 void enterEvent (QEvent*); /* mouse enter the QWidget */
72 void keyPressEvent(QKeyEvent*);
73 void displaySimulation();
74 void UpdateTable( bool theConersValidity = true );
78 SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */
79 LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
80 int myNbCorners; /* The required number of corners */
82 SVTK_Selector* mySelector;
84 SMESH::SMESH_Mesh_var myMesh;
86 SMESH::TElementSimulation* mySimulation;
91 QButtonGroup* GroupConstructors;
92 QRadioButton* myRadioButton1;
94 QGroupBox* GroupArguments;
95 QLineEdit* myCornerNodes;
96 QPushButton* mySelectButton;
98 QCheckBox* myReverseCB;
100 QGroupBox* GroupButtons;
101 QPushButton* buttonOk;
102 QPushButton* buttonCancel;
103 QPushButton* buttonApply;
104 QPushButton * buttonHelp;
106 QString myHelpFileName;
110 void onTextChange(const QString&);
111 void onCellTextChange(int, int);
112 void onReverse( int );
113 void onCellDoubleClicked(int, int, int, const QPoint&);
116 void ClickOnCancel();
119 void SetEditCorners() ;
120 void SelectionIntoArgument() ;
121 void DeactivateActiveDialog() ;
122 void ActivateThisDialog() ;
125 #endif // DIALOGBOX_ADD_QUADRATIC_ELEMENT_H