2012-08-09 16:03:55 +06:00
|
|
|
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
2009-02-17 10:27:49 +05:00
|
|
|
//
|
2012-08-09 16:03:55 +06:00
|
|
|
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
|
|
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
2005-08-11 14:06:39 +06:00
|
|
|
//
|
2012-08-09 16:03:55 +06:00
|
|
|
// 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.
|
2005-08-11 14:06:39 +06:00
|
|
|
//
|
2012-08-09 16:03:55 +06:00
|
|
|
// 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.
|
2005-08-11 14:06:39 +06:00
|
|
|
//
|
2012-08-09 16:03:55 +06:00
|
|
|
// 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
|
2005-08-11 14:06:39 +06:00
|
|
|
//
|
2012-08-09 16:03:55 +06:00
|
|
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
2004-12-01 15:48:31 +05:00
|
|
|
//
|
2012-08-09 16:03:55 +06:00
|
|
|
|
2009-02-17 10:27:49 +05:00
|
|
|
// File : SMESHGUI_MultiEditDlg.h
|
|
|
|
// Author : Sergey LITONIN, Open CASCADE S.A.S.
|
2004-12-01 15:48:31 +05:00
|
|
|
//
|
2009-02-17 10:27:49 +05:00
|
|
|
#ifndef SMESHGUI_MULTIEDITDLG_H
|
|
|
|
#define SMESHGUI_MULTIEDITDLG_H
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2009-02-17 10:27:49 +05:00
|
|
|
// SMESH includes
|
2008-03-07 12:47:05 +05:00
|
|
|
#include "SMESH_SMESHGUI.hxx"
|
|
|
|
|
2009-02-17 10:27:49 +05:00
|
|
|
// Qt includes
|
|
|
|
#include <QDialog>
|
2005-06-07 19:22:20 +06:00
|
|
|
|
2009-02-17 10:27:49 +05:00
|
|
|
// OCCT includes
|
2004-12-01 15:48:31 +05:00
|
|
|
#include <TColStd_MapOfInteger.hxx>
|
|
|
|
|
2009-02-17 10:27:49 +05:00
|
|
|
// IDL includes
|
2004-12-01 15:48:31 +05:00
|
|
|
#include <SALOMEconfig.h>
|
|
|
|
#include CORBA_SERVER_HEADER(SMESH_Mesh)
|
2008-03-07 12:47:05 +05:00
|
|
|
#include CORBA_SERVER_HEADER(SMESH_MeshEditor)
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2005-08-11 14:06:39 +06:00
|
|
|
class SMESHGUI;
|
2004-12-01 15:48:31 +05:00
|
|
|
class SMESHGUI_FilterDlg;
|
|
|
|
class SMESHGUI_SpinBox;
|
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
class SMESH_Actor;
|
|
|
|
|
2005-11-03 13:38:17 +05:00
|
|
|
class LightApp_SelectionMgr;
|
2005-08-11 14:06:39 +06:00
|
|
|
class SALOME_Actor;
|
2005-06-07 19:22:20 +06:00
|
|
|
class SVTK_Selector;
|
|
|
|
|
2009-02-17 10:27:49 +05:00
|
|
|
class QListWidget;
|
2005-08-11 14:06:39 +06:00
|
|
|
class QComboBox;
|
|
|
|
class QCheckBox;
|
|
|
|
class QGroupBox;
|
|
|
|
class QLineEdit;
|
|
|
|
class QPushButton;
|
|
|
|
class QButtonGroup;
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Class : SMESHGUI_MultiEditDlg
|
|
|
|
* Description : Base class for dialogs of diagonal inversion and
|
|
|
|
* union of two neighboring triangles
|
|
|
|
*/
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2008-03-07 12:47:05 +05:00
|
|
|
class SMESHGUI_EXPORT SMESHGUI_MultiEditDlg : public QDialog
|
2005-08-11 14:06:39 +06:00
|
|
|
{
|
2004-12-01 15:48:31 +05:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2009-02-17 10:27:49 +05:00
|
|
|
SMESHGUI_MultiEditDlg( SMESHGUI*, const int, const bool = false );
|
|
|
|
virtual ~SMESHGUI_MultiEditDlg();
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2005-08-11 14:06:39 +06:00
|
|
|
void Init();
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2009-02-17 10:27:49 +05:00
|
|
|
bool eventFilter( QObject*, QEvent* );
|
2005-02-01 19:55:30 +05:00
|
|
|
|
2004-12-01 15:48:31 +05:00
|
|
|
signals:
|
|
|
|
void ListContensChanged();
|
|
|
|
|
|
|
|
protected slots:
|
|
|
|
void onOk();
|
|
|
|
virtual bool onApply();
|
|
|
|
virtual void onClose();
|
2006-05-06 14:51:48 +06:00
|
|
|
void onHelp();
|
2004-12-01 15:48:31 +05:00
|
|
|
|
|
|
|
void onDeactivate();
|
|
|
|
void onSelectionDone();
|
2005-08-11 14:06:39 +06:00
|
|
|
|
2004-12-01 15:48:31 +05:00
|
|
|
void onFilterBtn();
|
|
|
|
void onAddBtn();
|
|
|
|
void onRemoveBtn();
|
|
|
|
void onSortListBtn();
|
|
|
|
void onListSelectionChanged();
|
|
|
|
void onSubmeshChk();
|
|
|
|
void onGroupChk();
|
|
|
|
virtual void onToAllChk();
|
|
|
|
void onFilterAccepted();
|
2005-01-25 20:51:15 +05:00
|
|
|
void on3d2dChanged(int);
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2005-08-11 14:06:39 +06:00
|
|
|
SMESH::NumericalFunctor_ptr getNumericalFunctor();
|
|
|
|
|
|
|
|
protected:
|
2009-02-17 10:27:49 +05:00
|
|
|
void closeEvent( QCloseEvent* );
|
|
|
|
void enterEvent( QEvent * );
|
|
|
|
void hideEvent( QHideEvent* ); /* ESC key */
|
2008-03-07 12:47:05 +05:00
|
|
|
void keyPressEvent( QKeyEvent* );
|
2009-02-17 10:27:49 +05:00
|
|
|
QWidget* createButtonFrame( QWidget* );
|
|
|
|
QWidget* createMainFrame( QWidget*, const bool );
|
|
|
|
virtual bool isValid( const bool );
|
2012-08-09 16:03:55 +06:00
|
|
|
SMESH::long_array_var getIds(SMESH::SMESH_IDSource_var& obj);
|
2004-12-01 15:48:31 +05:00
|
|
|
void updateButtons();
|
|
|
|
void setSelectionMode();
|
2009-02-17 10:27:49 +05:00
|
|
|
virtual bool isIdValid( const int ) const;
|
|
|
|
virtual bool process( SMESH::SMESH_MeshEditor_ptr,
|
2012-08-09 16:03:55 +06:00
|
|
|
const SMESH::long_array& ,
|
|
|
|
SMESH::SMESH_IDSource_ptr obj) = 0;
|
2005-01-25 20:51:15 +05:00
|
|
|
int entityType();
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2005-08-11 14:06:39 +06:00
|
|
|
protected:
|
2004-12-01 15:48:31 +05:00
|
|
|
QPushButton* myOkBtn;
|
|
|
|
QPushButton* myApplyBtn;
|
|
|
|
QPushButton* myCloseBtn;
|
2006-05-06 14:51:48 +06:00
|
|
|
QPushButton* myHelpBtn;
|
2004-12-01 15:48:31 +05:00
|
|
|
SMESH_Actor* myActor;
|
2005-06-07 19:22:20 +06:00
|
|
|
SMESH::SMESH_Mesh_var myMesh;
|
2005-08-11 14:06:39 +06:00
|
|
|
|
2005-11-03 13:38:17 +05:00
|
|
|
LightApp_SelectionMgr* mySelectionMgr;
|
2005-06-07 19:22:20 +06:00
|
|
|
SVTK_Selector* mySelector;
|
|
|
|
SMESHGUI* mySMESHGUI;
|
|
|
|
|
2004-12-01 15:48:31 +05:00
|
|
|
QGroupBox* mySelGrp;
|
2005-08-11 14:06:39 +06:00
|
|
|
QGroupBox* myCriterionGrp;
|
|
|
|
|
2009-02-17 10:27:49 +05:00
|
|
|
QWidget* myChoiceWidget;
|
2005-08-11 14:06:39 +06:00
|
|
|
QButtonGroup* myGroupChoice;
|
|
|
|
QComboBox* myComboBoxFunctor;
|
|
|
|
|
2009-02-17 10:27:49 +05:00
|
|
|
QListWidget* myListBox;
|
2004-12-01 15:48:31 +05:00
|
|
|
QPushButton* myFilterBtn;
|
|
|
|
QPushButton* myAddBtn;
|
|
|
|
QPushButton* myRemoveBtn;
|
|
|
|
QPushButton* mySortBtn;
|
2005-08-11 14:06:39 +06:00
|
|
|
|
2004-12-01 15:48:31 +05:00
|
|
|
QCheckBox* myToAllChk;
|
2005-01-25 20:51:15 +05:00
|
|
|
QButtonGroup* myEntityTypeGrp;
|
2005-08-11 14:06:39 +06:00
|
|
|
|
2004-12-01 15:48:31 +05:00
|
|
|
QCheckBox* mySubmeshChk;
|
|
|
|
QPushButton* mySubmeshBtn;
|
|
|
|
QLineEdit* mySubmesh;
|
2005-08-11 14:06:39 +06:00
|
|
|
|
2004-12-01 15:48:31 +05:00
|
|
|
QCheckBox* myGroupChk;
|
|
|
|
QPushButton* myGroupBtn;
|
|
|
|
QLineEdit* myGroup;
|
2005-08-11 14:06:39 +06:00
|
|
|
|
2004-12-01 15:48:31 +05:00
|
|
|
SMESHGUI_FilterDlg* myFilterDlg;
|
|
|
|
TColStd_MapOfInteger myIds;
|
|
|
|
int myFilterType;
|
|
|
|
bool myBusy;
|
2005-01-25 20:51:15 +05:00
|
|
|
int myEntityType;
|
2006-05-06 14:51:48 +06:00
|
|
|
|
|
|
|
QString myHelpFileName;
|
2004-12-01 15:48:31 +05:00
|
|
|
};
|
|
|
|
|
2005-08-11 14:06:39 +06:00
|
|
|
/*!
|
|
|
|
* Class : SMESHGUI_ChangeOrientationDlg
|
|
|
|
* Description : Modification of orientation of faces
|
|
|
|
*/
|
2004-12-01 15:48:31 +05:00
|
|
|
class SMESHGUI_ChangeOrientationDlg : public SMESHGUI_MultiEditDlg
|
2005-08-11 14:06:39 +06:00
|
|
|
{
|
2004-12-01 15:48:31 +05:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2009-02-17 10:27:49 +05:00
|
|
|
SMESHGUI_ChangeOrientationDlg( SMESHGUI* );
|
|
|
|
virtual ~SMESHGUI_ChangeOrientationDlg();
|
2004-12-01 15:48:31 +05:00
|
|
|
|
|
|
|
protected:
|
2012-08-09 16:03:55 +06:00
|
|
|
virtual bool process( SMESH::SMESH_MeshEditor_ptr,
|
|
|
|
const SMESH::long_array& ,
|
|
|
|
SMESH::SMESH_IDSource_ptr obj);
|
2004-12-01 15:48:31 +05:00
|
|
|
};
|
|
|
|
|
2005-08-11 14:06:39 +06:00
|
|
|
/*!
|
|
|
|
* Class : SMESHGUI_UnionOfTrianglesDlg
|
|
|
|
* Description : Construction of quadrangles by automatic association of triangles
|
|
|
|
*/
|
2004-12-01 15:48:31 +05:00
|
|
|
class SMESHGUI_UnionOfTrianglesDlg : public SMESHGUI_MultiEditDlg
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2009-02-17 10:27:49 +05:00
|
|
|
SMESHGUI_UnionOfTrianglesDlg( SMESHGUI* );
|
|
|
|
virtual ~SMESHGUI_UnionOfTrianglesDlg();
|
2004-12-01 15:48:31 +05:00
|
|
|
|
|
|
|
protected:
|
2009-02-17 10:27:49 +05:00
|
|
|
virtual bool isValid( const bool );
|
2012-08-09 16:03:55 +06:00
|
|
|
virtual bool process( SMESH::SMESH_MeshEditor_ptr,
|
|
|
|
const SMESH::long_array&,
|
|
|
|
SMESH::SMESH_IDSource_ptr obj );
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2005-08-11 14:06:39 +06:00
|
|
|
private:
|
|
|
|
SMESHGUI_SpinBox* myMaxAngleSpin;
|
2004-12-01 15:48:31 +05:00
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
Class : SMESHGUI_CuttingOfQuadsDlg
|
|
|
|
Description : Construction of quadrangles by automatic association of triangles
|
|
|
|
*/
|
|
|
|
class SMESHGUI_CuttingOfQuadsDlg : public SMESHGUI_MultiEditDlg
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2009-02-17 10:27:49 +05:00
|
|
|
SMESHGUI_CuttingOfQuadsDlg( SMESHGUI* );
|
|
|
|
virtual ~SMESHGUI_CuttingOfQuadsDlg();
|
2004-12-01 15:48:31 +05:00
|
|
|
|
|
|
|
protected:
|
2012-08-09 16:03:55 +06:00
|
|
|
virtual bool process( SMESH::SMESH_MeshEditor_ptr,
|
|
|
|
const SMESH::long_array& ,
|
|
|
|
SMESH::SMESH_IDSource_ptr obj);
|
2005-08-11 14:06:39 +06:00
|
|
|
|
2004-12-01 15:48:31 +05:00
|
|
|
protected slots:
|
2005-08-11 14:06:39 +06:00
|
|
|
virtual void onClose();
|
|
|
|
void onCriterionRB();
|
|
|
|
void onPreviewChk();
|
2004-12-01 15:48:31 +05:00
|
|
|
|
|
|
|
private:
|
2005-08-11 14:06:39 +06:00
|
|
|
void displayPreview();
|
|
|
|
void erasePreview();
|
|
|
|
|
2004-12-01 15:48:31 +05:00
|
|
|
private:
|
2005-08-11 14:06:39 +06:00
|
|
|
SALOME_Actor* myPreviewActor;
|
|
|
|
QCheckBox* myPreviewChk;
|
2004-12-01 15:48:31 +05:00
|
|
|
};
|
|
|
|
|
2012-08-09 16:03:55 +06:00
|
|
|
/*!
|
|
|
|
* Class : SMESHGUI_CuttingIntoTetraDlg
|
|
|
|
* Description : Split all volumes into tetrahedrons
|
|
|
|
*/
|
|
|
|
class SMESHGUI_CuttingIntoTetraDlg : public SMESHGUI_MultiEditDlg
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
SMESHGUI_CuttingIntoTetraDlg( SMESHGUI* );
|
|
|
|
virtual ~SMESHGUI_CuttingIntoTetraDlg();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual bool process( SMESH::SMESH_MeshEditor_ptr,
|
|
|
|
const SMESH::long_array&,
|
|
|
|
SMESH::SMESH_IDSource_ptr obj );
|
|
|
|
};
|
|
|
|
|
2009-02-17 10:27:49 +05:00
|
|
|
#endif // SMESHGUI_MULTIEDITDLG_H
|