|
|
|
|
|
#include "nmDeleteConfirmationDlg.h"
|
|
|
|
|
|
|
|
|
|
|
|
#include <QVBoxLayout>
|
|
|
|
|
|
#include <QLabel>
|
|
|
|
|
|
#include <QPushButton>
|
|
|
|
|
|
#include <QHBoxLayout>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
nmDeleteConfirmationDlg::nmDeleteConfirmationDlg() {
|
|
|
|
|
|
this->initUI();
|
|
|
|
|
|
this->resize(250,80);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void nmDeleteConfirmationDlg::initUI() {
|
|
|
|
|
|
// <20><><EFBFBD>öԻ<C3B6><D4BB><EFBFBD><EFBFBD>Ĵ<EFBFBD><C4B4>ڱ<EFBFBD><DAB1><EFBFBD>
|
|
|
|
|
|
this->setWindowTitle(tr("confirm"));
|
|
|
|
|
|
|
|
|
|
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֺͿؼ<CDBF>
|
|
|
|
|
|
QVBoxLayout *mainLayout = new QVBoxLayout(this);
|
|
|
|
|
|
QLabel *messageLabel = new QLabel(tr("Do you confirm the deletion of the selected fault?"), this);
|
|
|
|
|
|
mainLayout->addWidget(messageLabel);
|
|
|
|
|
|
|
|
|
|
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ť
|
|
|
|
|
|
QHBoxLayout *buttonLayout = new QHBoxLayout;
|
|
|
|
|
|
QPushButton *yesButton = new QPushButton(tr("Yes"), this);
|
|
|
|
|
|
QPushButton *noButton = new QPushButton(tr("No"), this);
|
|
|
|
|
|
|
|
|
|
|
|
// <20><><EFBFBD>Ӱ<EFBFBD>ť<EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD>ź<EFBFBD>
|
|
|
|
|
|
connect(yesButton, SIGNAL(clicked()), this, SLOT(accept()));
|
|
|
|
|
|
connect(noButton, SIGNAL(clicked()), this, SLOT(reject()));
|
|
|
|
|
|
|
|
|
|
|
|
buttonLayout->addStretch();
|
|
|
|
|
|
buttonLayout->addWidget(yesButton);
|
|
|
|
|
|
buttonLayout->addWidget(noButton);
|
|
|
|
|
|
mainLayout->addLayout(buttonLayout);
|
|
|
|
|
|
|
|
|
|
|
|
// <20><><EFBFBD>öԻ<C3B6><D4BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
this->setLayout(mainLayout);
|
|
|
|
|
|
}
|