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 );
75 SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */
76 LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
77 int myNbCorners; /* The required number of corners */
79 SVTK_Selector* mySelector;
81 SMESH::SMESH_Mesh_var myMesh;
83 SMESH::TElementSimulation* mySimulation;
88 QButtonGroup* GroupConstructors;
89 QRadioButton* myRadioButton1;
91 QGroupBox* GroupArguments;
92 QLineEdit* myCornerNodes;
93 QPushButton* mySelectButton;
95 QCheckBox* myReverseCB;
97 QGroupBox* GroupButtons;
98 QPushButton* buttonOk;
99 QPushButton* buttonCancel;
100 QPushButton* buttonApply;
101 QPushButton * buttonHelp;
103 QString myHelpFileName;
107 void onTextChange(const QString&);
108 void onCellTextChange(int, int);
109 void onReverse( int );
110 void onCellDoubleClicked(int, int, int, const QPoint&);
113 void ClickOnCancel();
116 void SetEditCorners() ;
117 void SelectionIntoArgument() ;
118 void DeactivateActiveDialog() ;
119 void ActivateThisDialog() ;
122 class SMESHGUI_IdEditItem: public QTableItem
125 SMESHGUI_IdEditItem(QTable* table, EditType et, const QString& text ):
126 QTableItem(table, et, text) {};
127 ~SMESHGUI_IdEditItem() {};
129 QWidget* createEditor() const;
133 #endif // DIALOGBOX_ADD_QUADRATIC_ELEMENT_H