1 // SMESH SMESHGUI : GUI for SMESH component
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : SMESHGUI_GroupOpDlg.cxx
25 // Author : Sergey LITONIN
28 #include "SMESHGUI_GroupOpDlg.h"
31 #include <qgroupbox.h>
33 #include <qlineedit.h>
39 * Class : SMESHGUI_GroupOpDlg
40 * Description : Perform boolean operations on groups
43 //=======================================================================
44 // name : SMESHGUI_GroupOpDlg::SMESHGUI_GroupOpDlg
45 // Purpose : Constructor
46 //=======================================================================
47 SMESHGUI_GroupOpDlg::SMESHGUI_GroupOpDlg( const int aMode )
48 : SMESHGUI_Dialog( 0, false, true )
52 caption = "UNION_OF_TWO_GROUPS";
54 caption = "INTERSECTION_OF_TWO_GROUPS";
56 caption = "CUT_OF_TWO_GROUPS";
58 setCaption( tr( caption ) );
60 QVBoxLayout* aDlgLay = new QVBoxLayout( mainFrame() );
61 // aDlgLay->setMargin( MARGIN );
62 // aDlgLay->setSpacing( SPACING );
64 QGroupBox* aNameGrp = new QGroupBox(1, Qt::Vertical, tr("NAME"), mainFrame() );
65 new QLabel(tr("RESULT_NAME"), aNameGrp);
66 myNameEdit = new QLineEdit(aNameGrp);
67 connect( myNameEdit, SIGNAL( textChanged( const QString& ) ), this, SIGNAL( nameChanged( const QString& ) ) );
69 QGroupBox* anArgGrp = new QGroupBox(3, Qt::Horizontal, tr("ARGUMENTS"), mainFrame() );
71 createObject( aMode==2 ? tr( "MAIN_OBJECT" ) : tr( "OBJECT_1" ), anArgGrp, 1 );
72 createObject( aMode==2 ? tr( "TOOL_OBJECT" ) : tr( "OBJECT_2" ), anArgGrp, 2 );
74 aDlgLay->addWidget( aNameGrp );
75 aDlgLay->addWidget( anArgGrp );
78 //=======================================================================
79 // name : SMESHGUI_GroupOpDlg::~SMESHGUI_GroupOpDlg
80 // Purpose : Destructor
81 //=======================================================================
82 SMESHGUI_GroupOpDlg::~SMESHGUI_GroupOpDlg()
86 //=======================================================================
89 //=======================================================================
90 void SMESHGUI_GroupOpDlg::setName( const QString& name )
92 myNameEdit->setText( name );
95 //=======================================================================
98 //=======================================================================
99 QString SMESHGUI_GroupOpDlg::name() const
101 return myNameEdit->text().stripWhiteSpace();