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_RemoveNodesDlg.cxx
25 // Author : Nicolas REJNERI
29 #include "SMESHGUI_RemoveNodesDlg.h"
31 #include <SUIT_ResourceMgr.h>
33 #include <SMDSAbs_ElementType.hxx>
36 #include <qgroupbox.h>
37 #include <qbuttongroup.h>
38 #include <qradiobutton.h>
40 //=================================================================================
41 // class : SMESHGUI_RemoveNodesDlg()
43 //=================================================================================
44 SMESHGUI_RemoveNodesDlg::SMESHGUI_RemoveNodesDlg()
45 : SMESHGUI_Dialog( false, true, OK | Apply | Close )
47 QPixmap image0( resMgr()->loadPixmap("SMESH", tr("ICON_DLG_REM_NODE")));
48 QPixmap image1( resMgr()->loadPixmap("SMESH", tr("ICON_SELECT")));
50 setName("SMESHGUI_RemoveNodesDlg");
52 setCaption(tr("SMESH_REMOVE_NODES_TITLE" ));
53 setSizeGripEnabled(TRUE);
55 QVBoxLayout* main = new QVBoxLayout( mainFrame() );
57 /***************************************************************/
58 QButtonGroup* GroupConstructors = new QButtonGroup( mainFrame(), "GroupConstructors");
59 GroupConstructors->setTitle(tr("SMESH_NODES" ));
60 GroupConstructors->setExclusive(TRUE);
61 GroupConstructors->setColumnLayout(0, Qt::Vertical);
62 GroupConstructors->layout()->setSpacing(0);
63 GroupConstructors->layout()->setMargin(0);
64 QGridLayout* GroupConstructorsLayout = new QGridLayout(GroupConstructors->layout());
65 GroupConstructorsLayout->setAlignment(Qt::AlignTop);
66 GroupConstructorsLayout->setSpacing(6);
67 GroupConstructorsLayout->setMargin(11);
68 QRadioButton* Constructor1 = new QRadioButton(GroupConstructors, "Constructor1");
69 Constructor1->setText(tr("" ));
70 Constructor1->setPixmap(image0);
71 Constructor1->setChecked(TRUE);
72 Constructor1->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, Constructor1->sizePolicy().hasHeightForWidth()));
73 Constructor1->setMinimumSize(QSize(50, 0));
74 GroupConstructorsLayout->addWidget(Constructor1, 0, 0);
75 QSpacerItem* spacer = new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
76 GroupConstructorsLayout->addItem(spacer, 0, 1);
77 main->addWidget(GroupConstructors);
79 /***************************************************************/
80 QGroupBox* GroupC1 = new QGroupBox( mainFrame(), "GroupC1");
81 GroupC1->setTitle(tr("SMESH_REMOVE" ));
82 GroupC1->setMinimumSize(QSize(0, 0));
83 GroupC1->setFrameShape(QGroupBox::Box);
84 GroupC1->setFrameShadow(QGroupBox::Sunken);
85 GroupC1->setColumnLayout( 3, Qt::Horizontal );
86 // GroupC1->layout()->setSpacing(0);
87 // GroupC1->layout()->setMargin(0);
89 createObject( tr("SMESH_ID_NODES" ), GroupC1, 0 );
90 setNameIndication( 0, ListOfNames );
91 setReadOnly( 0, false );
92 setObjectType( 0, prefix( "SMESH element" ) + SMDSAbs_Node, -1 );
94 main->addWidget(GroupC1);
97 //=================================================================================
98 // function : ~SMESHGUI_RemoveNodesDlg()
99 // purpose : Destroys the object and frees any allocated resources
100 //=================================================================================
101 SMESHGUI_RemoveNodesDlg::~SMESHGUI_RemoveNodesDlg()