X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_MultiEditDlg.h;h=82915222c9bb321695fc8738437645e236be37ea;hp=0ada531f925b40dda1e7819a44e93affa3af542c;hb=30ce546b0c5099ad1112929e2db94810e683e54b;hpb=0635c9fc80f67d1e5dc0e94ec85f487286a92070 diff --git a/src/SMESHGUI/SMESHGUI_MultiEditDlg.h b/src/SMESHGUI/SMESHGUI_MultiEditDlg.h index 0ada531f9..82915222c 100755 --- a/src/SMESHGUI/SMESHGUI_MultiEditDlg.h +++ b/src/SMESHGUI/SMESHGUI_MultiEditDlg.h @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. // -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SMESHGUI_MultiEditDlg.h // Author : Sergey LITONIN, Open CASCADE S.A.S. // @@ -27,6 +28,7 @@ // SMESH includes #include "SMESH_SMESHGUI.hxx" +#include "SMESHGUI_PreviewDlg.h" // Qt includes #include @@ -63,12 +65,15 @@ class QButtonGroup; * union of two neighboring triangles */ -class SMESHGUI_EXPORT SMESHGUI_MultiEditDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_MultiEditDlg : public SMESHGUI_PreviewDlg { Q_OBJECT public: - SMESHGUI_MultiEditDlg( SMESHGUI*, const int, const bool = false ); + SMESHGUI_MultiEditDlg( SMESHGUI* theModule, + const int theMode, + const bool the3d2d = false, + bool theDoInit = true ); virtual ~SMESHGUI_MultiEditDlg(); void Init(); @@ -81,11 +86,11 @@ signals: protected slots: void onOk(); virtual bool onApply(); - virtual void onClose(); + virtual void reject(); void onHelp(); void onDeactivate(); - void onSelectionDone(); + virtual void onSelectionDone(); void onFilterBtn(); void onAddBtn(); @@ -96,24 +101,26 @@ protected slots: void onGroupChk(); virtual void onToAllChk(); void onFilterAccepted(); - void on3d2dChanged(int); + virtual void on3d2dChanged(int); + void onOpenView(); + void onCloseView(); SMESH::NumericalFunctor_ptr getNumericalFunctor(); protected: - void closeEvent( QCloseEvent* ); void enterEvent( QEvent * ); - void hideEvent( QHideEvent* ); /* ESC key */ void keyPressEvent( QKeyEvent* ); QWidget* createButtonFrame( QWidget* ); QWidget* createMainFrame( QWidget*, const bool ); virtual bool isValid( const bool ); - SMESH::long_array_var getIds(); + SMESH::long_array_var getIds(SMESH::SMESH_IDSource_var& obj); void updateButtons(); - void setSelectionMode(); + virtual void setSelectionMode(); virtual bool isIdValid( const int ) const; virtual bool process( SMESH::SMESH_MeshEditor_ptr, - const SMESH::long_array& ) = 0; + const SMESH::long_array& , + SMESH::SMESH_IDSource_ptr obj) = 0; + virtual int nbElemsInMesh() = 0; int entityType(); protected: @@ -174,7 +181,10 @@ public: virtual ~SMESHGUI_ChangeOrientationDlg(); protected: - virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& ); + virtual bool process( SMESH::SMESH_MeshEditor_ptr, + const SMESH::long_array& , + SMESH::SMESH_IDSource_ptr obj); + virtual int nbElemsInMesh(); }; /*! @@ -191,7 +201,13 @@ public: protected: virtual bool isValid( const bool ); - virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& ); + virtual bool process( SMESH::SMESH_MeshEditor_ptr, + const SMESH::long_array&, + SMESH::SMESH_IDSource_ptr obj ); + virtual int nbElemsInMesh(); + +protected slots: + virtual void onDisplaySimulation( bool ); private: SMESHGUI_SpinBox* myMaxAngleSpin; @@ -210,10 +226,13 @@ public: virtual ~SMESHGUI_CuttingOfQuadsDlg(); protected: - virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& ); + virtual bool process( SMESH::SMESH_MeshEditor_ptr, + const SMESH::long_array& , + SMESH::SMESH_IDSource_ptr obj); + virtual int nbElemsInMesh(); protected slots: - virtual void onClose(); + virtual void reject(); void onCriterionRB(); void onPreviewChk(); @@ -226,4 +245,46 @@ private: QCheckBox* myPreviewChk; }; +/*! + * Class : SMESHGUI_SplitVolumesDlg + * Description : Split all volumes into tetrahedrons + */ +class SMESHGUI_SplitVolumesDlg : public SMESHGUI_MultiEditDlg +{ + Q_OBJECT + +public: + SMESHGUI_SplitVolumesDlg( SMESHGUI* ); + virtual ~SMESHGUI_SplitVolumesDlg(); + +protected slots: + + virtual void on3d2dChanged(int); + virtual void onSelectionDone(); + + void onFacetSelection(bool); + void onSetDir(); + void updateNormalPreview(const QString& s=""); + +protected: + + virtual bool process( SMESH::SMESH_MeshEditor_ptr, + const SMESH::long_array&, + SMESH::SMESH_IDSource_ptr obj ); + virtual int nbElemsInMesh(); + + virtual void setSelectionMode(); + void showFacetByElement( int id ); + bool isIntoPrisms(); + + QGroupBox* myFacetSelGrp; + SMESHGUI_SpinBox* myPointSpin[3]; + SMESHGUI_SpinBox* myDirSpin [3]; + QPushButton* myFacetSelBtn; + QPushButton* myAxisBtn[3]; + QCheckBox* myAllDomainsChk; + + double myCellSize; +}; + #endif // SMESHGUI_MULTIEDITDLG_H