2022-01-04 18:11:48 +08:00
|
|
|
|
#include "x_uimsgboxok.h"
|
|
|
|
|
#include "ui_x_uimsgboxok.h"
|
|
|
|
|
#include <QSettings>
|
2022-08-25 18:37:24 +08:00
|
|
|
|
#include <cfg.h>
|
|
|
|
|
|
2022-01-04 18:11:48 +08:00
|
|
|
|
X_UIMsgBoxOk::X_UIMsgBoxOk(QWidget *parent) :
|
2022-08-25 18:37:24 +08:00
|
|
|
|
BaseDlg(parent),
|
2022-01-04 18:11:48 +08:00
|
|
|
|
ui(new Ui::X_UIMsgBoxOk)
|
|
|
|
|
{
|
2022-08-25 18:37:24 +08:00
|
|
|
|
setAttribute(Qt::WA_DeleteOnClose);
|
2022-01-04 18:11:48 +08:00
|
|
|
|
ui->setupUi(this);
|
|
|
|
|
m_bExitTypeFlag=0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
X_UIMsgBoxOk::~X_UIMsgBoxOk()
|
|
|
|
|
{
|
|
|
|
|
delete ui;
|
|
|
|
|
}
|
|
|
|
|
X_UIMsgBoxOk::X_UIMsgBoxOk(QString strTitle,QString text, QWidget *parent) :
|
2022-08-25 18:37:24 +08:00
|
|
|
|
BaseDlg(parent),
|
2022-01-04 18:11:48 +08:00
|
|
|
|
ui(new Ui::X_UIMsgBoxOk)
|
|
|
|
|
{
|
2022-08-25 18:37:24 +08:00
|
|
|
|
setAttribute(Qt::WA_DeleteOnClose);
|
2022-01-04 18:11:48 +08:00
|
|
|
|
ui->setupUi(this);
|
|
|
|
|
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);
|
|
|
|
|
ui->pushButton_3->setVisible(false);
|
|
|
|
|
m_bExitTypeFlag=0;
|
|
|
|
|
ui->pushButton->setProperty("ssType", "progManageTool");
|
|
|
|
|
ui->pushButton_2->setProperty("ssType", "progManageTool");
|
|
|
|
|
ui->pushButton_3->setProperty("ssType", "progManageTool");
|
|
|
|
|
}
|
|
|
|
|
X_UIMsgBoxOk::X_UIMsgBoxOk(QString strTitle,QString text, QWidget *parent,int iType) :
|
2022-08-25 18:37:24 +08:00
|
|
|
|
BaseDlg(parent),
|
2022-01-04 18:11:48 +08:00
|
|
|
|
ui(new Ui::X_UIMsgBoxOk)
|
|
|
|
|
{
|
2022-08-25 18:37:24 +08:00
|
|
|
|
setAttribute(Qt::WA_DeleteOnClose);
|
2022-01-04 18:11:48 +08:00
|
|
|
|
ui->setupUi(this);
|
|
|
|
|
m_bExitTypeFlag=0;
|
|
|
|
|
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);
|
|
|
|
|
ui->pushButton_3->setVisible(false);
|
2022-08-25 18:37:24 +08:00
|
|
|
|
if(iType==1) {
|
2022-01-04 18:11:48 +08:00
|
|
|
|
ui->lInfoTip->setStyleSheet("background:rgba(206,206,206,1)");
|
|
|
|
|
ui->frame->setStyleSheet("QFrame{background:rgba(206,206,206,1)}");
|
2022-08-25 18:37:24 +08:00
|
|
|
|
setStyleSheet("X_UIMsgBoxOk{background:rgba(206,206,206,1)}");
|
2022-01-04 18:11:48 +08:00
|
|
|
|
ui->pushButton->setProperty("ssType", "progManageTool");
|
|
|
|
|
ui->pushButton_2->setProperty("ssType", "progManageTool");
|
|
|
|
|
}
|
|
|
|
|
}
|