qt/LedOK/base/x_uimsgboxok.cpp
2023-04-18 14:14:46 +08:00

61 lines
2.1 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include "x_uimsgboxok.h"
#include "ui_x_uimsgboxok.h"
#include <QSettings>
#include <cfg.h>
X_UIMsgBoxOk::X_UIMsgBoxOk(QWidget *parent) :
BaseDlg(parent),
ui(new Ui::X_UIMsgBoxOk)
{
setAttribute(Qt::WA_DeleteOnClose);
ui->setupUi(this);
m_bExitTypeFlag=0;
}
X_UIMsgBoxOk::~X_UIMsgBoxOk()
{
delete ui;
}
X_UIMsgBoxOk::X_UIMsgBoxOk(QString strTitle,QString text, QWidget *parent) :
BaseDlg(parent),
ui(new Ui::X_UIMsgBoxOk)
{
setAttribute(Qt::WA_DeleteOnClose);
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) :
BaseDlg(parent),
ui(new Ui::X_UIMsgBoxOk)
{
setAttribute(Qt::WA_DeleteOnClose);
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);
if(iType==1) {
ui->lInfoTip->setStyleSheet("background:rgba(206,206,206,1)");
ui->frame->setStyleSheet("QFrame{background:rgba(206,206,206,1)}");
setStyleSheet("X_UIMsgBoxOk{background:rgba(206,206,206,1)}");
ui->pushButton->setProperty("ssType", "progManageTool");
ui->pushButton_2->setProperty("ssType", "progManageTool");
}
}