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_BuildCompoundDlg.h 00025 // Author : Alexander KOVALEV, Open CASCADE S.A.S. 00026 // 00027 #ifndef SMESHGUI_BUILDCOMPOUNDDLG_H 00028 #define SMESHGUI_BUILDCOMPOUNDDLG_H 00029 00030 // SMESH includes 00031 #include "SMESH_SMESHGUI.hxx" 00032 00033 // Qt includes 00034 #include <QDialog> 00035 00036 // IDL includes 00037 #include <SALOMEconfig.h> 00038 #include CORBA_SERVER_HEADER(SMESH_Gen) 00039 #include CORBA_SERVER_HEADER(SMESH_Mesh) 00040 00041 class QGroupBox; 00042 class QLabel; 00043 class QLineEdit; 00044 class QPushButton; 00045 class QRadioButton; 00046 class QCheckBox; 00047 class QComboBox; 00048 class SMESHGUI; 00049 class SMESHGUI_SpinBox; 00050 class LightApp_SelectionMgr; 00051 class SUIT_SelectionFilter; 00052 00053 //================================================================================= 00054 // class : SMESHGUI_BuildCompoundDlg 00055 // purpose : 00056 //================================================================================= 00057 class SMESHGUI_EXPORT SMESHGUI_BuildCompoundDlg : public QDialog 00058 { 00059 Q_OBJECT; 00060 00061 public: 00062 00063 SMESHGUI_BuildCompoundDlg( SMESHGUI* ); 00064 ~SMESHGUI_BuildCompoundDlg(); 00065 00066 public: 00067 static QString GetDefaultName( const QString& ); 00068 00069 private: 00070 void Init(); 00071 void closeEvent( QCloseEvent* ); 00072 void enterEvent( QEvent* ); /* mouse enter the QWidget */ 00073 void hideEvent( QHideEvent* ); /* ESC key */ 00074 void keyPressEvent( QKeyEvent* ); 00075 00076 bool isValid(); 00077 00078 void setIsApplyAndClose( const bool theFlag ); 00079 bool isApplyAndClose() const; 00080 00081 private: 00082 SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */ 00083 LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */ 00084 00085 SMESH::SMESH_Mesh_var myMesh; 00086 SUIT_SelectionFilter* myMeshFilter; 00087 SMESH::mesh_array_var myMeshArray; 00088 00089 // Widgets 00090 QGroupBox* GroupConstructors; 00091 QRadioButton* Constructor1; 00092 00093 QGroupBox* GroupButtons; 00094 QPushButton* buttonOk; 00095 QPushButton* buttonCancel; 00096 QPushButton* buttonApply; 00097 QPushButton* buttonHelp; 00098 00099 QGroupBox* GroupName; 00100 QLabel* TextLabelName; 00101 QLineEdit* LineEditName; 00102 00103 QGroupBox* GroupArgs; 00104 QLabel* TextLabelMeshes; 00105 QPushButton* SelectButton; 00106 QLineEdit* LineEditMeshes; 00107 QLabel* TextLabelUnion; 00108 QComboBox* ComboBoxUnion; 00109 QCheckBox* CheckBoxCommon; 00110 QCheckBox* CheckBoxMerge; 00111 QLabel* TextLabelTol; 00112 SMESHGUI_SpinBox* SpinBoxTol; 00113 00114 QString myHelpFileName; 00115 00116 bool myIsApplyAndClose; 00117 00118 private slots: 00119 void ClickOnOk(); 00120 void ClickOnCancel(); 00121 bool ClickOnApply(); 00122 void ClickOnHelp(); 00123 void SelectionIntoArgument(); 00124 void DeactivateActiveDialog(); 00125 void ActivateThisDialog(); 00126 void onSelectMerge( bool ); 00127 }; 00128 00129 #endif // SMESHGUI_BUILDCOMPOUNDDLG_H