X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOMToolsGUI%2FGEOMToolsGUI_DeleteDlg.cxx;h=9b517f324c16e77341c873efea3f62a28fe5ab60;hb=2f48ab17e6ad7c1fe48c940f57c1718ae012da09;hp=9a350496f3aa06604a4bf3554764e9a4cb0096e7;hpb=392885c1a8d50369708bbe5e6b44033ed8b8ba51;p=modules%2Fgeom.git diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_DeleteDlg.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_DeleteDlg.cxx index 9a350496f..9b517f324 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_DeleteDlg.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_DeleteDlg.cxx @@ -1,24 +1,22 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 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 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. // -// 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 // -// 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.salome-platform.org/ or email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // GEOM GEOMGUI : GUI for Geometry component // File : GEOMToolsGUI_DeleteDlg.cxx // Author : Dmitry Matveitchev, Open CASCADE S.A.S. @@ -26,7 +24,7 @@ #include "GEOMToolsGUI_DeleteDlg.h" #include -#include +#include #include #include #include @@ -75,8 +73,8 @@ static QStringList objectsToNames( const QMap& objects ) \param parent parent widget */ GEOMToolsGUI_DeleteDlg::GEOMToolsGUI_DeleteDlg( QWidget* parent, - const QMap& objects, - bool deleteAll ) + const QMap& objects, + bool deleteAll ) : QDialog( parent ) { setModal( true ); @@ -110,21 +108,13 @@ GEOMToolsGUI_DeleteDlg::GEOMToolsGUI_DeleteDlg( QWidget* parent, lab->setText( tr( "GEOM_REALLY_DELETE_ALL" ) ); } - QPushButton* buttonYes = new QPushButton( tr( "GEOM_BUT_YES" ), this ); - QPushButton* buttonNo = new QPushButton( tr( "GEOM_BUT_NO" ), this ); - QHBoxLayout* btnLayout = new QHBoxLayout; - btnLayout->setMargin( 0 ); - btnLayout->setSpacing( 6 ); - btnLayout->addWidget( buttonYes ); - btnLayout->addSpacing( 10 ); - btnLayout->addStretch(); - btnLayout->addWidget( buttonNo ); + QDialogButtonBox* buttonBox = new QDialogButtonBox(QDialogButtonBox::Yes + | QDialogButtonBox::No); int rc = topLayout->rowCount(); - topLayout->addLayout( btnLayout, rc, 0, 1, 2 ); + topLayout->addWidget( buttonBox, rc, 1, 1, 1 ); - /* signals and slots connections */ - connect( buttonYes, SIGNAL( clicked() ), this, SLOT( accept() ) ); - connect( buttonNo, SIGNAL( clicked() ), this, SLOT( reject() ) ); + connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept())); + connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject())); } GEOMToolsGUI_DeleteDlg::~GEOMToolsGUI_DeleteDlg()