2012-08-09 16:03:55 +06:00
|
|
|
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
2004-12-01 15:48:31 +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
|
2004-12-01 15:48:31 +05: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.
|
2004-12-01 15:48:31 +05: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.
|
2009-02-17 10:27:49 +05: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
|
2009-02-17 10:27:49 +05:00
|
|
|
//
|
2012-08-09 16:03:55 +06:00
|
|
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
2009-02-17 10:27:49 +05:00
|
|
|
//
|
2012-08-09 16:03:55 +06:00
|
|
|
|
2009-02-17 10:27:49 +05:00
|
|
|
// SMESH SMESHGUI : GUI for SMESH component
|
|
|
|
// File : SMESHGUI_GroupOpDlg.h
|
|
|
|
// Author : Sergey LITONIN, Open CASCADE S.A.S.
|
|
|
|
//
|
|
|
|
#ifndef SMESHGUI_GROUPOPDLG_H
|
|
|
|
#define SMESHGUI_GROUPOPDLG_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>
|
2004-12-01 15:48:31 +05:00
|
|
|
|
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_Group)
|
|
|
|
|
|
|
|
class QPushButton;
|
2009-02-17 10:27:49 +05:00
|
|
|
class QtxColorButton;
|
|
|
|
class QComboBox;
|
|
|
|
class QListWidget;
|
|
|
|
class QGroupBox;
|
2004-12-01 15:48:31 +05:00
|
|
|
class QLineEdit;
|
2005-06-08 16:45:19 +06:00
|
|
|
class SMESHGUI;
|
2009-02-17 10:27:49 +05:00
|
|
|
class LightApp_SelectionMgr;
|
2005-06-08 16:45:19 +06:00
|
|
|
class SVTK_Selector;
|
2004-12-01 15:48:31 +05:00
|
|
|
|
|
|
|
/*
|
|
|
|
Class : SMESHGUI_GroupOpDlg
|
|
|
|
Description : Perform boolean operations on groups
|
|
|
|
*/
|
|
|
|
|
2008-03-07 12:47:05 +05:00
|
|
|
class SMESHGUI_EXPORT SMESHGUI_GroupOpDlg : public QDialog
|
2004-12-01 15:48:31 +05:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2009-02-17 10:27:49 +05:00
|
|
|
//enum { UNION, INTERSECT, CUT };
|
2004-12-01 15:48:31 +05:00
|
|
|
|
|
|
|
public:
|
2009-02-17 10:27:49 +05:00
|
|
|
SMESHGUI_GroupOpDlg( SMESHGUI* );
|
|
|
|
virtual ~SMESHGUI_GroupOpDlg();
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2005-06-08 16:45:19 +06:00
|
|
|
void Init();
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2009-02-17 10:27:49 +05:00
|
|
|
protected slots:
|
|
|
|
|
|
|
|
virtual bool onApply();
|
|
|
|
virtual void onSelectionDone();
|
|
|
|
virtual void setVisible ( bool visible );
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
virtual void reset();
|
|
|
|
|
|
|
|
QString getName() const;
|
|
|
|
void setName( const QString& theName );
|
|
|
|
|
|
|
|
QGroupBox* getArgGrp() const;
|
|
|
|
void setHelpFileName( const QString& theFName );
|
|
|
|
SMESHGUI* getSMESHGUI() const;
|
|
|
|
bool isValid( const QList<SMESH::SMESH_GroupBase_var>& theListGrp );
|
|
|
|
bool getSelectedGroups( QList<SMESH::SMESH_GroupBase_var>& theOutList,
|
|
|
|
QStringList& theOutNames );
|
|
|
|
SMESH::ListOfGroups* convert( const QList<SMESH::SMESH_GroupBase_var>& );
|
|
|
|
|
|
|
|
SALOMEDS::Color getColor() const;
|
|
|
|
|
2012-08-09 16:03:55 +06:00
|
|
|
void setIsApplyAndClose( const bool theFlag );
|
|
|
|
bool isApplyAndClose() const;
|
|
|
|
|
2009-02-17 10:27:49 +05:00
|
|
|
private:
|
|
|
|
void enterEvent( QEvent* );
|
|
|
|
void keyPressEvent( QKeyEvent* );
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2013-02-28 21:07:35 +06:00
|
|
|
protected slots:
|
|
|
|
virtual void reject();
|
|
|
|
|
2004-12-01 15:48:31 +05:00
|
|
|
private slots:
|
|
|
|
void onOk();
|
2006-05-06 14:51:48 +06:00
|
|
|
void onHelp();
|
2004-12-01 15:48:31 +05:00
|
|
|
|
|
|
|
void onDeactivate();
|
|
|
|
|
|
|
|
private:
|
2009-02-17 10:27:49 +05:00
|
|
|
QWidget* createButtonFrame( QWidget* );
|
|
|
|
QWidget* createMainFrame ( QWidget* );
|
|
|
|
|
2004-12-01 15:48:31 +05:00
|
|
|
private:
|
|
|
|
QPushButton* myOkBtn;
|
|
|
|
QPushButton* myApplyBtn;
|
|
|
|
QPushButton* myCloseBtn;
|
2006-05-06 14:51:48 +06:00
|
|
|
QPushButton* myHelpBtn;
|
2004-12-01 15:48:31 +05:00
|
|
|
|
|
|
|
QLineEdit* myNameEdit;
|
2009-02-17 10:27:49 +05:00
|
|
|
QGroupBox* myArgGrp;
|
|
|
|
QtxColorButton* myColorBtn;
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2005-06-08 16:45:19 +06:00
|
|
|
SMESHGUI* mySMESHGUI;
|
2005-11-03 13:38:17 +05:00
|
|
|
LightApp_SelectionMgr* mySelectionMgr;
|
2005-06-08 16:45:19 +06:00
|
|
|
SVTK_Selector* mySelector;
|
2004-12-01 15:48:31 +05:00
|
|
|
|
2006-05-06 14:51:48 +06:00
|
|
|
QString myHelpFileName;
|
2012-08-09 16:03:55 +06:00
|
|
|
|
|
|
|
bool myIsApplyAndClose;
|
2004-12-01 15:48:31 +05:00
|
|
|
};
|
|
|
|
|
2009-02-17 10:27:49 +05:00
|
|
|
/*
|
|
|
|
Class : SMESHGUI_UnionGroupsDlg
|
|
|
|
Description : Perform union of several groups
|
|
|
|
*/
|
|
|
|
|
|
|
|
class SMESHGUI_EXPORT SMESHGUI_UnionGroupsDlg : public SMESHGUI_GroupOpDlg
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
SMESHGUI_UnionGroupsDlg( SMESHGUI* );
|
|
|
|
virtual ~SMESHGUI_UnionGroupsDlg();
|
|
|
|
|
|
|
|
protected slots:
|
|
|
|
virtual bool onApply();
|
|
|
|
virtual void onSelectionDone();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void reset();
|
|
|
|
|
|
|
|
private:
|
|
|
|
QListWidget* myListWg;
|
|
|
|
QList<SMESH::SMESH_GroupBase_var> myGroups;
|
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
Class : SMESHGUI_IntersectGroupsDlg
|
|
|
|
Description : Perform intersection of several groups
|
|
|
|
*/
|
|
|
|
|
|
|
|
class SMESHGUI_EXPORT SMESHGUI_IntersectGroupsDlg : public SMESHGUI_GroupOpDlg
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
SMESHGUI_IntersectGroupsDlg( SMESHGUI* );
|
|
|
|
virtual ~SMESHGUI_IntersectGroupsDlg();
|
|
|
|
|
|
|
|
protected slots:
|
|
|
|
virtual bool onApply();
|
|
|
|
virtual void onSelectionDone();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void reset();
|
|
|
|
|
|
|
|
private:
|
|
|
|
QListWidget* myListWg;
|
|
|
|
QList<SMESH::SMESH_GroupBase_var> myGroups;
|
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
Class : SMESHGUI_CutGroupsDlg
|
|
|
|
Description : Perform cut of several groups
|
|
|
|
*/
|
|
|
|
|
|
|
|
class SMESHGUI_EXPORT SMESHGUI_CutGroupsDlg : public SMESHGUI_GroupOpDlg
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
SMESHGUI_CutGroupsDlg( SMESHGUI* );
|
|
|
|
virtual ~SMESHGUI_CutGroupsDlg();
|
|
|
|
|
|
|
|
protected slots:
|
|
|
|
virtual bool onApply();
|
|
|
|
virtual void onSelectionDone();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void reset();
|
|
|
|
|
|
|
|
private:
|
|
|
|
QPushButton* myBtn1;
|
|
|
|
QPushButton* myBtn2;
|
|
|
|
QListWidget* myListWg1;
|
|
|
|
QListWidget* myListWg2;
|
|
|
|
QList<SMESH::SMESH_GroupBase_var> myGroups1;
|
|
|
|
QList<SMESH::SMESH_GroupBase_var> myGroups2;
|
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
Class : SMESHGUI_DimGroupDlg
|
|
|
|
Description : Dialog for creating groups of entities from existing
|
|
|
|
groups of superior dimensions
|
|
|
|
*/
|
|
|
|
|
|
|
|
class SMESHGUI_EXPORT SMESHGUI_DimGroupDlg : public SMESHGUI_GroupOpDlg
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
SMESHGUI_DimGroupDlg( SMESHGUI* );
|
|
|
|
virtual ~SMESHGUI_DimGroupDlg();
|
|
|
|
|
|
|
|
SMESH::ElementType getElementType() const;
|
|
|
|
void setElementType( const SMESH::ElementType& theElemType );
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void reset();
|
|
|
|
|
|
|
|
protected slots:
|
|
|
|
virtual bool onApply();
|
|
|
|
virtual void onSelectionDone();
|
|
|
|
|
|
|
|
private:
|
|
|
|
QComboBox* myCombo;
|
|
|
|
QListWidget* myListWg;
|
|
|
|
QList<SMESH::SMESH_GroupBase_var> myGroups;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SMESHGUI_GROUPOPDLG_H
|
|
|
|
|
|
|
|
|