Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef SMESHGUI_MULTIEDITDLG_H
00027 #define SMESHGUI_MULTIEDITDLG_H
00028
00029
00030 #include "SMESH_SMESHGUI.hxx"
00031
00032
00033 #include <QDialog>
00034
00035
00036 #include <TColStd_MapOfInteger.hxx>
00037
00038
00039 #include <SALOMEconfig.h>
00040 #include CORBA_SERVER_HEADER(SMESH_Mesh)
00041 #include CORBA_SERVER_HEADER(SMESH_MeshEditor)
00042
00043 class SMESHGUI;
00044 class SMESHGUI_FilterDlg;
00045 class SMESHGUI_SpinBox;
00046
00047 class SMESH_Actor;
00048
00049 class LightApp_SelectionMgr;
00050 class SALOME_Actor;
00051 class SVTK_Selector;
00052
00053 class QListWidget;
00054 class QComboBox;
00055 class QCheckBox;
00056 class QGroupBox;
00057 class QLineEdit;
00058 class QPushButton;
00059 class QButtonGroup;
00060
00067 class SMESHGUI_EXPORT SMESHGUI_MultiEditDlg : public QDialog
00068 {
00069 Q_OBJECT
00070
00071 public:
00072 SMESHGUI_MultiEditDlg( SMESHGUI*, const int, const bool = false );
00073 virtual ~SMESHGUI_MultiEditDlg();
00074
00075 void Init();
00076
00077 bool eventFilter( QObject*, QEvent* );
00078
00079 signals:
00080 void ListContensChanged();
00081
00082 protected slots:
00083 void onOk();
00084 virtual bool onApply();
00085 virtual void onClose();
00086 void onHelp();
00087
00088 void onDeactivate();
00089 void onSelectionDone();
00090
00091 void onFilterBtn();
00092 void onAddBtn();
00093 void onRemoveBtn();
00094 void onSortListBtn();
00095 void onListSelectionChanged();
00096 void onSubmeshChk();
00097 void onGroupChk();
00098 virtual void onToAllChk();
00099 void onFilterAccepted();
00100 void on3d2dChanged(int);
00101
00102 SMESH::NumericalFunctor_ptr getNumericalFunctor();
00103
00104 protected:
00105 void closeEvent( QCloseEvent* );
00106 void enterEvent( QEvent * );
00107 void hideEvent( QHideEvent* );
00108 void keyPressEvent( QKeyEvent* );
00109 QWidget* createButtonFrame( QWidget* );
00110 QWidget* createMainFrame( QWidget*, const bool );
00111 virtual bool isValid( const bool );
00112 SMESH::long_array_var getIds(SMESH::SMESH_IDSource_var& obj);
00113 void updateButtons();
00114 void setSelectionMode();
00115 virtual bool isIdValid( const int ) const;
00116 virtual bool process( SMESH::SMESH_MeshEditor_ptr,
00117 const SMESH::long_array& ,
00118 SMESH::SMESH_IDSource_ptr obj) = 0;
00119 int entityType();
00120
00121 protected:
00122 QPushButton* myOkBtn;
00123 QPushButton* myApplyBtn;
00124 QPushButton* myCloseBtn;
00125 QPushButton* myHelpBtn;
00126 SMESH_Actor* myActor;
00127 SMESH::SMESH_Mesh_var myMesh;
00128
00129 LightApp_SelectionMgr* mySelectionMgr;
00130 SVTK_Selector* mySelector;
00131 SMESHGUI* mySMESHGUI;
00132
00133 QGroupBox* mySelGrp;
00134 QGroupBox* myCriterionGrp;
00135
00136 QWidget* myChoiceWidget;
00137 QButtonGroup* myGroupChoice;
00138 QComboBox* myComboBoxFunctor;
00139
00140 QListWidget* myListBox;
00141 QPushButton* myFilterBtn;
00142 QPushButton* myAddBtn;
00143 QPushButton* myRemoveBtn;
00144 QPushButton* mySortBtn;
00145
00146 QCheckBox* myToAllChk;
00147 QButtonGroup* myEntityTypeGrp;
00148
00149 QCheckBox* mySubmeshChk;
00150 QPushButton* mySubmeshBtn;
00151 QLineEdit* mySubmesh;
00152
00153 QCheckBox* myGroupChk;
00154 QPushButton* myGroupBtn;
00155 QLineEdit* myGroup;
00156
00157 SMESHGUI_FilterDlg* myFilterDlg;
00158 TColStd_MapOfInteger myIds;
00159 int myFilterType;
00160 bool myBusy;
00161 int myEntityType;
00162
00163 QString myHelpFileName;
00164 };
00165
00170 class SMESHGUI_ChangeOrientationDlg : public SMESHGUI_MultiEditDlg
00171 {
00172 Q_OBJECT
00173
00174 public:
00175 SMESHGUI_ChangeOrientationDlg( SMESHGUI* );
00176 virtual ~SMESHGUI_ChangeOrientationDlg();
00177
00178 protected:
00179 virtual bool process( SMESH::SMESH_MeshEditor_ptr,
00180 const SMESH::long_array& ,
00181 SMESH::SMESH_IDSource_ptr obj);
00182 };
00183
00188 class SMESHGUI_UnionOfTrianglesDlg : public SMESHGUI_MultiEditDlg
00189 {
00190 Q_OBJECT
00191
00192 public:
00193 SMESHGUI_UnionOfTrianglesDlg( SMESHGUI* );
00194 virtual ~SMESHGUI_UnionOfTrianglesDlg();
00195
00196 protected:
00197 virtual bool isValid( const bool );
00198 virtual bool process( SMESH::SMESH_MeshEditor_ptr,
00199 const SMESH::long_array&,
00200 SMESH::SMESH_IDSource_ptr obj );
00201
00202 private:
00203 SMESHGUI_SpinBox* myMaxAngleSpin;
00204 };
00205
00206
00207
00208
00209
00210 class SMESHGUI_CuttingOfQuadsDlg : public SMESHGUI_MultiEditDlg
00211 {
00212 Q_OBJECT
00213
00214 public:
00215 SMESHGUI_CuttingOfQuadsDlg( SMESHGUI* );
00216 virtual ~SMESHGUI_CuttingOfQuadsDlg();
00217
00218 protected:
00219 virtual bool process( SMESH::SMESH_MeshEditor_ptr,
00220 const SMESH::long_array& ,
00221 SMESH::SMESH_IDSource_ptr obj);
00222
00223 protected slots:
00224 virtual void onClose();
00225 void onCriterionRB();
00226 void onPreviewChk();
00227
00228 private:
00229 void displayPreview();
00230 void erasePreview();
00231
00232 private:
00233 SALOME_Actor* myPreviewActor;
00234 QCheckBox* myPreviewChk;
00235 };
00236
00241 class SMESHGUI_CuttingIntoTetraDlg : public SMESHGUI_MultiEditDlg
00242 {
00243 Q_OBJECT
00244
00245 public:
00246 SMESHGUI_CuttingIntoTetraDlg( SMESHGUI* );
00247 virtual ~SMESHGUI_CuttingIntoTetraDlg();
00248
00249 protected:
00250 virtual bool process( SMESH::SMESH_MeshEditor_ptr,
00251 const SMESH::long_array&,
00252 SMESH::SMESH_IDSource_ptr obj );
00253 };
00254
00255 #endif // SMESHGUI_MULTIEDITDLG_H