58 lines
1.8 KiB
C++
58 lines
1.8 KiB
C++
![]() |
#include "x_uimsgboxyesnocancel.h"
|
|||
|
#include "ui_x_uimsgboxyesnocancel.h"
|
|||
|
|
|||
|
X_UIMsgBoxYesNoCancel::X_UIMsgBoxYesNoCancel(QWidget *parent) :
|
|||
|
LoQDialog(parent),
|
|||
|
ui(new Ui::X_UIMsgBoxYesNoCancel)
|
|||
|
{
|
|||
|
ui->setupUi(this);
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
X_UIMsgBoxYesNoCancel::~X_UIMsgBoxYesNoCancel()
|
|||
|
{
|
|||
|
delete ui;
|
|||
|
}
|
|||
|
X_UIMsgBoxYesNoCancel::X_UIMsgBoxYesNoCancel(QString strTitle,QString text, QWidget *parent) :
|
|||
|
LoQDialog(parent),
|
|||
|
ui(new Ui::X_UIMsgBoxYesNoCancel)
|
|||
|
{
|
|||
|
ui->setupUi(this);
|
|||
|
|
|||
|
ui->lInfoTip->setStyleSheet("background:rgba(206,206,206,1)");
|
|||
|
ui->frame->setStyleSheet("QFrame{background:rgba(206,206,206,1)}");
|
|||
|
setStyleSheet("background:rgba(206,206,206,1)");
|
|||
|
|
|||
|
ui->bnYes->setProperty("ssType", "progManageTool");
|
|||
|
ui->bnYes->setStyleSheet("QPushButton{background:rgba(28,154,210,255);}");
|
|||
|
ui->bnNo->setProperty("ssType", "progManageTool");
|
|||
|
ui->bnNo->setStyleSheet("QPushButton{background:rgba(28,154,210,255);}");
|
|||
|
ui->bnCancel->setProperty("ssType", "progManageTool");
|
|||
|
ui->bnCancel->setStyleSheet("QPushButton{background:rgba(28,154,210,255);}");
|
|||
|
|
|||
|
ui->pushButton_2->setProperty("ssType", "progManageTool");
|
|||
|
ui->pushButton_2->setStyleSheet("QPushButton{background:rgba(28,154,210,255);}");
|
|||
|
|
|||
|
ui->lInfoTip->adjustSize();
|
|||
|
ui->label_3->setText(strTitle);
|
|||
|
//让QLabel能够自动判断并换行显示:
|
|||
|
// ui->lInfoTip->setGeometry(QRect(328, 240, 329, 27*4)); //四倍行距
|
|||
|
ui->lInfoTip->setWordWrap(true);
|
|||
|
ui->lInfoTip->setAlignment(Qt::AlignTop);
|
|||
|
ui->lInfoTip->setText(text);
|
|||
|
connect(ui->bnYes, SIGNAL(clicked()), this, SLOT(onYes()));
|
|||
|
connect(ui->bnNo, SIGNAL(clicked()), this, SLOT(onNo()));
|
|||
|
}
|
|||
|
void X_UIMsgBoxYesNoCancel::onYes()
|
|||
|
{
|
|||
|
|
|||
|
m_flagSave=1;
|
|||
|
QDialog::accept();
|
|||
|
}
|
|||
|
void X_UIMsgBoxYesNoCancel::onNo()
|
|||
|
{
|
|||
|
|
|||
|
m_flagSave=2;
|
|||
|
QDialog::accept();
|
|||
|
}
|