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_TranslationDlg.h 00025 // Author : Michael ZORIN, Open CASCADE S.A.S. 00026 // 00027 #ifndef SMESHGUI_TRANSLATIONDLG_H 00028 #define SMESHGUI_TRANSLATIONDLG_H 00029 00030 // SMESH includes 00031 #include "SMESH_SMESHGUI.hxx" 00032 #include "SMESHGUI_PreviewDlg.h" 00033 00034 // IDL includes 00035 #include <SALOMEconfig.h> 00036 #include CORBA_SERVER_HEADER(SMESH_Mesh) 00037 00038 class QButtonGroup; 00039 class QGroupBox; 00040 class QLabel; 00041 class QLineEdit; 00042 class QPushButton; 00043 class QRadioButton; 00044 class QCheckBox; 00045 class SMESHGUI; 00046 class SMESHGUI_IdValidator; 00047 class SMESHGUI_SpinBox; 00048 class SMESHGUI_FilterDlg; 00049 class SMESH_Actor; 00050 class SVTK_Selector; 00051 class LightApp_SelectionMgr; 00052 class SMESH_LogicalFilter; 00053 00054 //================================================================================= 00055 // class : SMESHGUI_TranslationDlg 00056 // purpose : 00057 //================================================================================= 00058 class SMESHGUI_EXPORT SMESHGUI_TranslationDlg : public SMESHGUI_PreviewDlg 00059 { 00060 Q_OBJECT 00061 00062 public: 00063 SMESHGUI_TranslationDlg( SMESHGUI* ); 00064 ~SMESHGUI_TranslationDlg(); 00065 00066 private: 00067 void Init( bool = true ); 00068 void closeEvent( QCloseEvent* ); 00069 void enterEvent( QEvent* ); /* mouse enter the QWidget */ 00070 void hideEvent( QHideEvent* ); /* ESC key */ 00071 void keyPressEvent( QKeyEvent* ); 00072 int GetConstructorId(); 00073 void setNewMeshName(); 00074 00075 bool isValid(); 00076 00077 SMESHGUI_IdValidator* myIdValidator; 00078 LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */ 00079 QString myElementsId; 00080 int myNbOkElements; /* to check when elements are defined */ 00081 00082 SVTK_Selector* mySelector; 00083 00084 QWidget* myEditCurrentArgument; 00085 00086 bool myBusy; 00087 SMESH::SMESH_Mesh_var myMesh; 00088 SMESH_Actor* myActor; 00089 SMESH_LogicalFilter* myMeshOrSubMeshOrGroupFilter; 00090 00091 SMESH::SMESH_IDSource_var mySelectedObject; 00092 00093 QGroupBox* ConstructorsBox; 00094 QButtonGroup* GroupConstructors; 00095 QRadioButton* RadioButton1; 00096 QRadioButton* RadioButton2; 00097 QGroupBox* GroupButtons; 00098 QPushButton* buttonOk; 00099 QPushButton* buttonCancel; 00100 QPushButton* buttonApply; 00101 QPushButton* buttonHelp; 00102 QGroupBox* GroupArguments; 00103 QLabel* TextLabelElements; 00104 QPushButton* SelectElementsButton; 00105 QLineEdit* LineEditElements; 00106 QCheckBox* CheckBoxMesh; 00107 QLabel* TextLabel1; 00108 QPushButton* SelectButton1; 00109 QLabel* TextLabel1_1; 00110 SMESHGUI_SpinBox* SpinBox1_1; 00111 QLabel* TextLabel1_2; 00112 SMESHGUI_SpinBox* SpinBox1_2; 00113 QLabel* TextLabel1_3; 00114 SMESHGUI_SpinBox* SpinBox1_3; 00115 QLabel* TextLabel2; 00116 QPushButton* SelectButton2; 00117 QLabel* TextLabel2_1; 00118 SMESHGUI_SpinBox* SpinBox2_1; 00119 QLabel* TextLabel2_2; 00120 SMESHGUI_SpinBox* SpinBox2_2; 00121 QLabel* TextLabel2_3; 00122 SMESHGUI_SpinBox* SpinBox2_3; 00123 //QCheckBox* CheckBoxCopy; 00124 QGroupBox* ActionBox; 00125 QButtonGroup* ActionGroup; 00126 QCheckBox* MakeGroupsCheck; 00127 QLineEdit* LineEditNewMesh; 00128 00129 QString myHelpFileName; 00130 00131 QPushButton* myFilterBtn; 00132 SMESHGUI_FilterDlg* myFilterDlg; 00133 00134 protected slots: 00135 virtual void onDisplaySimulation( bool ); 00136 00137 private slots: 00138 void ConstructorsClicked( int ); 00139 void ClickOnOk(); 00140 void ClickOnCancel(); 00141 bool ClickOnApply(); 00142 void ClickOnHelp(); 00143 void SetEditCurrentArgument(); 00144 void SelectionIntoArgument(); 00145 void DeactivateActiveDialog(); 00146 void ActivateThisDialog(); 00147 void onTextChange( const QString& ); 00148 void onSelectMesh( bool ); 00149 void onActionClicked( int ); 00150 void setFilters(); 00151 }; 00152 00153 #endif // SMESHGUI_TRANSLATIONDLG_H