2004-12-01 15:48:31 +05:00
|
|
|
// Copyright (C) 2003 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 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
|
|
|
|
//
|
|
|
|
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// File : SMESHGUI_MultiEditDlg.h
|
|
|
|
// Author : Sergey LITONIN
|
|
|
|
// Module : SMESH
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef SMESHGUI_MultiEditDlg_H
|
|
|
|
#define SMESHGUI_MultiEditDlg_H
|
|
|
|
|
|
|
|
#include <qdialog.h>
|
2005-06-07 19:22:20 +06:00
|
|
|
|
|
|
|
#include "SUIT_SelectionFilter.h"
|
|
|
|
|
2004-12-01 15:48:31 +05:00
|
|
|
#include <TColStd_MapOfInteger.hxx>
|
|
|
|
|
|
|
|
#include <SALOMEconfig.h>
|
|
|
|
#include CORBA_SERVER_HEADER(SMESH_Mesh)
|
|
|
|
|
|
|
|
class SMESHGUI_FilterDlg;
|
|
|
|
class QCheckBox;
|
|
|
|
class QGroupBox;
|
|
|
|
class QListBox;
|
|
|
|
class QFrame;
|
|
|
|
class QLineEdit;
|
|
|
|
class SMESHGUI_SpinBox;
|
|
|
|
class QPushButton;
|
2005-01-25 20:51:15 +05:00
|
|
|
class QButtonGroup;
|
2005-02-01 19:55:30 +05:00
|
|
|
class QObject;
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
class SMESH_Actor;
|
|
|
|
class SALOME_Actor;
|
|
|
|
class SalomeApp_SelectionMgr;
|
|
|
|
|
|
|
|
class SMESHGUI;
|
|
|
|
class SMESH_Actor;
|
|
|
|
class SVTK_Selector;
|
|
|
|
class SVTK_ViewWindow;
|
|
|
|
|
2004-12-01 15:48:31 +05:00
|
|
|
/*
|
|
|
|
Class : SMESHGUI_MultiEditDlg
|
|
|
|
Description : Base class for dialogs of diagonal inversion and
|
|
|
|
union of two neighboring triangles
|
|
|
|
*/
|
|
|
|
|
|
|
|
class SMESHGUI_MultiEditDlg : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2005-06-07 19:22:20 +06:00
|
|
|
SMESHGUI_MultiEditDlg(SMESHGUI* theModule,
|
|
|
|
const int,
|
|
|
|
const bool = false,
|
|
|
|
const char* = 0 );
|
2004-12-01 15:48:31 +05:00
|
|
|
virtual ~SMESHGUI_MultiEditDlg();
|
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
void Init() ;
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2005-02-01 19:55:30 +05:00
|
|
|
bool eventFilter( QObject* object, QEvent* event );
|
|
|
|
|
2004-12-01 15:48:31 +05:00
|
|
|
signals:
|
|
|
|
void ListContensChanged();
|
|
|
|
|
|
|
|
protected slots:
|
|
|
|
|
|
|
|
void onOk();
|
|
|
|
virtual bool onApply();
|
|
|
|
virtual void onClose();
|
|
|
|
|
|
|
|
void onDeactivate();
|
|
|
|
void onSelectionDone();
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
void closeEvent( QCloseEvent* e ) ;
|
|
|
|
void enterEvent ( QEvent * ) ;
|
|
|
|
void hideEvent ( QHideEvent * ); /* ESC key */
|
|
|
|
QFrame* createButtonFrame( QWidget* );
|
2005-01-25 20:51:15 +05:00
|
|
|
QFrame* createMainFrame ( QWidget*, const bool );
|
2005-02-03 17:31:13 +05:00
|
|
|
bool isValid( const bool ) const;
|
2004-12-01 15:48:31 +05:00
|
|
|
SMESH::long_array_var getIds();
|
|
|
|
void updateButtons();
|
|
|
|
void setSelectionMode();
|
|
|
|
virtual bool isIdValid( const int theID ) const;
|
|
|
|
virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& ) = 0;
|
2005-01-25 20:51:15 +05:00
|
|
|
int entityType();
|
2004-12-01 15:48:31 +05:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
QPushButton* myOkBtn;
|
|
|
|
QPushButton* myApplyBtn;
|
|
|
|
QPushButton* myCloseBtn;
|
|
|
|
SMESH_Actor* myActor;
|
2005-06-07 19:22:20 +06:00
|
|
|
SMESH::SMESH_Mesh_var myMesh;
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2005-06-07 19:22:20 +06:00
|
|
|
SalomeApp_SelectionMgr* mySelectionMgr;
|
|
|
|
SVTK_ViewWindow* myViewWindow;
|
|
|
|
SVTK_Selector* mySelector;
|
|
|
|
SMESHGUI* mySMESHGUI;
|
|
|
|
|
2004-12-01 15:48:31 +05:00
|
|
|
QGroupBox* mySelGrp;
|
|
|
|
|
|
|
|
QListBox* myListBox;
|
|
|
|
QPushButton* myFilterBtn;
|
|
|
|
QPushButton* myAddBtn;
|
|
|
|
QPushButton* myRemoveBtn;
|
|
|
|
QPushButton* mySortBtn;
|
|
|
|
|
|
|
|
QCheckBox* myToAllChk;
|
2005-01-25 20:51:15 +05:00
|
|
|
QButtonGroup* myEntityTypeGrp;
|
2004-12-01 15:48:31 +05:00
|
|
|
|
|
|
|
QCheckBox* mySubmeshChk;
|
|
|
|
QPushButton* mySubmeshBtn;
|
|
|
|
QLineEdit* mySubmesh;
|
|
|
|
|
|
|
|
QCheckBox* myGroupChk;
|
|
|
|
QPushButton* myGroupBtn;
|
|
|
|
QLineEdit* myGroup;
|
|
|
|
|
|
|
|
SMESHGUI_FilterDlg* myFilterDlg;
|
|
|
|
TColStd_MapOfInteger myIds;
|
|
|
|
int myFilterType;
|
|
|
|
bool myBusy;
|
2005-01-25 20:51:15 +05:00
|
|
|
int myEntityType;
|
2004-12-01 15:48:31 +05:00
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
Class : SMESHGUI_ChangeOrientationDlg
|
|
|
|
Description : Modification of orientation of faces
|
|
|
|
*/
|
|
|
|
class SMESHGUI_ChangeOrientationDlg : public SMESHGUI_MultiEditDlg
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2005-06-07 19:22:20 +06:00
|
|
|
SMESHGUI_ChangeOrientationDlg(SMESHGUI* theModule,
|
|
|
|
const char* = 0);
|
2004-12-01 15:48:31 +05:00
|
|
|
virtual ~SMESHGUI_ChangeOrientationDlg();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
|
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
Class : SMESHGUI_UnionOfTrianglesDlg
|
|
|
|
Description : Construction of quadrangles by automatic association of triangles
|
|
|
|
*/
|
|
|
|
class SMESHGUI_UnionOfTrianglesDlg : public SMESHGUI_MultiEditDlg
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2005-06-07 19:22:20 +06:00
|
|
|
SMESHGUI_UnionOfTrianglesDlg(SMESHGUI* theModule,
|
|
|
|
const char* = 0);
|
2004-12-01 15:48:31 +05:00
|
|
|
virtual ~SMESHGUI_UnionOfTrianglesDlg();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
|
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
Class : SMESHGUI_CuttingOfQuadsDlg
|
|
|
|
Description : Construction of quadrangles by automatic association of triangles
|
|
|
|
*/
|
|
|
|
class SMESHGUI_CuttingOfQuadsDlg : public SMESHGUI_MultiEditDlg
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2005-06-07 19:22:20 +06:00
|
|
|
SMESHGUI_CuttingOfQuadsDlg(SMESHGUI* theModule,
|
|
|
|
const char* = 0);
|
2004-12-01 15:48:31 +05:00
|
|
|
virtual ~SMESHGUI_CuttingOfQuadsDlg();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
|
|
|
|
|
|
|
|
protected slots:
|
|
|
|
virtual void onClose();
|
|
|
|
void onPreviewChk();
|
|
|
|
|
|
|
|
private:
|
|
|
|
void displayPreview();
|
|
|
|
void erasePreview();
|
|
|
|
|
|
|
|
private:
|
|
|
|
QCheckBox* myUseDiagChk;
|
|
|
|
SALOME_Actor* myPreviewActor;
|
|
|
|
QCheckBox* myPreviewChk;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|