mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-02-21 23:15:37 +05:00
The GEOM Delete Dialog uses 2 QPushButtons for the Yes/No buttons whereas the SMESH one uses a QMessage dialog. To make them coherent (same layout order), use a QDialogButtonBox in the GEOM Delete Dialog.
This commit is contained in:
parent
8990dca3c5
commit
f4eb773032
@ -24,7 +24,7 @@
|
|||||||
#include "GEOMToolsGUI_DeleteDlg.h"
|
#include "GEOMToolsGUI_DeleteDlg.h"
|
||||||
|
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QPushButton>
|
#include <QDialogButtonBox>
|
||||||
#include <QTextBrowser>
|
#include <QTextBrowser>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QGridLayout>
|
#include <QGridLayout>
|
||||||
@ -108,21 +108,13 @@ GEOMToolsGUI_DeleteDlg::GEOMToolsGUI_DeleteDlg( QWidget* parent,
|
|||||||
lab->setText( tr( "GEOM_REALLY_DELETE_ALL" ) );
|
lab->setText( tr( "GEOM_REALLY_DELETE_ALL" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
QPushButton* buttonYes = new QPushButton( tr( "GEOM_BUT_YES" ), this );
|
QDialogButtonBox* buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok
|
||||||
QPushButton* buttonNo = new QPushButton( tr( "GEOM_BUT_NO" ), this );
|
| QDialogButtonBox::Cancel);
|
||||||
QHBoxLayout* btnLayout = new QHBoxLayout;
|
|
||||||
btnLayout->setMargin( 0 );
|
|
||||||
btnLayout->setSpacing( 6 );
|
|
||||||
btnLayout->addWidget( buttonYes );
|
|
||||||
btnLayout->addSpacing( 10 );
|
|
||||||
btnLayout->addStretch();
|
|
||||||
btnLayout->addWidget( buttonNo );
|
|
||||||
int rc = topLayout->rowCount();
|
int rc = topLayout->rowCount();
|
||||||
topLayout->addLayout( btnLayout, rc, 0, 1, 2 );
|
topLayout->addWidget( buttonBox, rc, 1, 1, 1 );
|
||||||
|
|
||||||
/* signals and slots connections */
|
connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
|
||||||
connect( buttonYes, SIGNAL( clicked() ), this, SLOT( accept() ) );
|
connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
|
||||||
connect( buttonNo, SIGNAL( clicked() ), this, SLOT( reject() ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GEOMToolsGUI_DeleteDlg::~GEOMToolsGUI_DeleteDlg()
|
GEOMToolsGUI_DeleteDlg::~GEOMToolsGUI_DeleteDlg()
|
||||||
|
Loading…
Reference in New Issue
Block a user