00001 // Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE 00002 // 00003 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, 00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 00005 // 00006 // This library is free software; you can redistribute it and/or 00007 // modify it under the terms of the GNU Lesser General Public 00008 // License as published by the Free Software Foundation; either 00009 // version 2.1 of the License. 00010 // 00011 // This library is distributed in the hope that it will be useful, 00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 // Lesser General Public License for more details. 00015 // 00016 // You should have received a copy of the GNU Lesser General Public 00017 // License along with this library; if not, write to the Free Software 00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 // 00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com 00021 // 00022 00023 // SMESH SMESHGUI : GUI for SMESH component 00024 // File : SMESHGUI_AddMeshElementDlg.h 00025 // Author : Nicolas REJNERI, Open CASCADE S.A.S. 00026 // 00027 #ifndef SMESHGUI_ADDMESHELEMENTDLG_H 00028 #define SMESHGUI_ADDMESHELEMENTDLG_H 00029 00030 // SMESH includes 00031 #include "SMESH_SMESHGUI.hxx" 00032 00033 #include <SMDSAbs_ElementType.hxx> 00034 00035 // Qt includes 00036 #include <QDialog> 00037 00038 // IDL includes 00039 #include <SALOMEconfig.h> 00040 #include CORBA_SERVER_HEADER(SMESH_Mesh) 00041 00042 class QComboBox; 00043 class QGroupBox; 00044 class QLabel; 00045 class QLineEdit; 00046 class QPushButton; 00047 class QRadioButton; 00048 class QCheckBox; 00049 class SMESHGUI; 00050 class SMESH_Actor; 00051 class SVTK_Selector; 00052 class LightApp_SelectionMgr; 00053 00054 namespace SMESH 00055 { 00056 struct TElementSimulation; 00057 } 00058 00059 //================================================================================= 00060 // class : SMESHGUI_AddMeshElementDlg 00061 // purpose : 00062 //================================================================================= 00063 class SMESHGUI_EXPORT SMESHGUI_AddMeshElementDlg : public QDialog 00064 { 00065 Q_OBJECT 00066 00067 public: 00068 SMESHGUI_AddMeshElementDlg( SMESHGUI*, SMDSAbs_ElementType = SMDSAbs_Edge, int = 2 ); 00069 ~SMESHGUI_AddMeshElementDlg(); 00070 00071 private: 00072 void Init(); 00073 void closeEvent( QCloseEvent* ); 00074 void hideEvent( QHideEvent* ); /* ESC key */ 00075 void enterEvent( QEvent* ); /* mouse enter the QWidget */ 00076 void keyPressEvent( QKeyEvent* ); 00077 void displaySimulation(); 00078 00079 bool isValid(); 00080 00081 typedef QList<SMESH::SMESH_GroupBase_var> GrpList; 00082 00083 SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */ 00084 LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */ 00085 int myNbOkNodes; /* to check when arguments is defined */ 00086 bool myBusy; 00087 SVTK_Selector* mySelector; 00088 00089 QLineEdit* myEditCurrentArgument; /* Current LineEdit */ 00090 00091 int myElementType; 00092 int myNbNodes; 00093 bool myIsPoly; 00094 00095 SMESH::SMESH_Mesh_var myMesh; 00096 SMESH_Actor* myActor; 00097 SMESH::TElementSimulation* mySimulation; 00098 QString myEntry; 00099 GrpList myGroups; 00100 00101 QGroupBox* GroupConstructors; 00102 QRadioButton* Constructor1; 00103 QGroupBox* GroupGroups; 00104 QLabel* TextLabel_GroupName; 00105 QComboBox* ComboBox_GroupName; 00106 QGroupBox* GroupButtons; 00107 QPushButton* buttonOk; 00108 QPushButton* buttonCancel; 00109 QPushButton* buttonApply; 00110 QPushButton* buttonHelp; 00111 QGroupBox* GroupC1; 00112 QLabel* TextLabelC1A1; 00113 QPushButton* SelectButtonC1A1; 00114 QLineEdit* LineEditC1A1; 00115 QCheckBox* Reverse; 00116 00117 QString myHelpFileName; 00118 00119 private slots: 00120 void ClickOnOk(); 00121 void ClickOnCancel(); 00122 void ClickOnApply(); 00123 void ClickOnHelp(); 00124 void SetEditCurrentArgument(); 00125 void SelectionIntoArgument(); 00126 void DeactivateActiveDialog(); 00127 void ActivateThisDialog(); 00128 void CheckBox( int ); 00129 void onTextChange( const QString& ); 00130 }; 00131 00132 #endif // SMESHGUI_ADDMESHELEMENTDLG_H