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_SymmetryDlg.h 00025 // Author : Michael ZORIN, Open CASCADE S.A.S. 00026 // 00027 #ifndef SMESHGUI_SYMMETRYDLG_H 00028 #define SMESHGUI_SYMMETRYDLG_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 #include CORBA_SERVER_HEADER(SMESH_MeshEditor) 00038 00039 class QButtonGroup; 00040 class QGroupBox; 00041 class QLabel; 00042 class QLineEdit; 00043 class QPushButton; 00044 class QRadioButton; 00045 class QCheckBox; 00046 class SMESHGUI; 00047 class SMESHGUI_IdValidator; 00048 class SMESHGUI_SpinBox; 00049 class SMESHGUI_FilterDlg; 00050 class SMESH_Actor; 00051 class SVTK_Selector; 00052 class LightApp_SelectionMgr; 00053 class SMESH_LogicalFilter; 00054 00055 //================================================================================= 00056 // class : SMESHGUI_SymmetryDlg 00057 // purpose : 00058 //================================================================================= 00059 class SMESHGUI_EXPORT SMESHGUI_SymmetryDlg : public SMESHGUI_PreviewDlg 00060 { 00061 Q_OBJECT 00062 00063 public: 00064 SMESHGUI_SymmetryDlg( SMESHGUI* ); 00065 ~SMESHGUI_SymmetryDlg(); 00066 00067 private: 00068 void Init( bool = true ); 00069 void closeEvent( QCloseEvent* ); 00070 void enterEvent( QEvent* ); /* mouse enter the QWidget */ 00071 void hideEvent( QHideEvent* ); /* ESC key */ 00072 void keyPressEvent( QKeyEvent* ); 00073 int GetConstructorId(); 00074 bool IsMirrorOk(); 00075 void setNewMeshName(); 00076 00077 void getMirror(SMESH::AxisStruct& theMirror, SMESH::SMESH_MeshEditor::MirrorType& aMirrorType); 00078 00079 bool isValid(); 00080 00081 SMESHGUI_IdValidator* myIdValidator; 00082 LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */ 00083 int myNbOkElements; /* to check when elements are defined */ 00084 QString myElementsId; 00085 SVTK_Selector* mySelector; 00086 00087 QWidget* myEditCurrentArgument; /* Current LineEdit */ 00088 00089 SMESH::SMESH_IDSource_var mySelectedObject; 00090 00091 bool myBusy; 00092 SMESH::SMESH_Mesh_var myMesh; 00093 SMESH_Actor* myActor; 00094 SMESH_LogicalFilter* myMeshOrSubMeshOrGroupFilter; 00095 00096 QGroupBox* ConstructorsBox; 00097 QButtonGroup* GroupConstructors; 00098 QRadioButton* RadioButton1; 00099 QRadioButton* RadioButton2; 00100 QRadioButton* RadioButton3; 00101 QGroupBox* GroupButtons; 00102 QPushButton* buttonOk; 00103 QPushButton* buttonCancel; 00104 QPushButton* buttonApply; 00105 QPushButton* buttonHelp; 00106 QGroupBox* GroupArguments; 00107 QGroupBox* GroupMirror; 00108 QLabel* TextLabelElements; 00109 QPushButton* SelectElementsButton; 00110 QLineEdit* LineEditElements; 00111 QCheckBox* CheckBoxMesh; 00112 00113 QLabel* TextLabelPoint; 00114 QPushButton* SelectPointButton; 00115 QLabel* TextLabelX; 00116 SMESHGUI_SpinBox* SpinBox_X; 00117 QLabel* TextLabelY; 00118 SMESHGUI_SpinBox* SpinBox_Y; 00119 QLabel* TextLabelZ; 00120 SMESHGUI_SpinBox* SpinBox_Z; 00121 QLabel* TextLabelVector; 00122 QPushButton* SelectVectorButton; 00123 QLabel* TextLabelDX; 00124 SMESHGUI_SpinBox* SpinBox_DX; 00125 QLabel* TextLabelDY; 00126 SMESHGUI_SpinBox* SpinBox_DY; 00127 QLabel* TextLabelDZ; 00128 SMESHGUI_SpinBox* SpinBox_DZ; 00129 00130 QGroupBox* ActionBox; 00131 QButtonGroup* ActionGroup; 00132 QCheckBox* MakeGroupsCheck; 00133 QLineEdit* LineEditNewMesh; 00134 00135 QString myHelpFileName; 00136 00137 QPushButton* myFilterBtn; 00138 SMESHGUI_FilterDlg* myFilterDlg; 00139 00140 protected slots: 00141 virtual void onDisplaySimulation( bool ); 00142 00143 private slots: 00144 void ConstructorsClicked( int ); 00145 void ClickOnOk(); 00146 void ClickOnCancel(); 00147 bool ClickOnApply(); 00148 void ClickOnHelp(); 00149 void SetEditCurrentArgument(); 00150 void SelectionIntoArgument(); 00151 void DeactivateActiveDialog(); 00152 void ActivateThisDialog(); 00153 void onTextChange( const QString& ); 00154 void onSelectMesh( bool ); 00155 void onVectorChanged(); 00156 void onActionClicked( int ); 00157 void setFilters(); 00158 }; 00159 00160 #endif // SMESHGUI_SYMMETRYDLG_H