43 lines
1.1 KiB
C++
43 lines
1.1 KiB
C++
#include "dialogchecksumerror.h"
|
|
#include "ui_dialogchecksumerror.h"
|
|
|
|
#include "mainwindow.h"
|
|
|
|
DialogCheckSumError::DialogCheckSumError(QWidget *parent) :
|
|
QDialog(parent),
|
|
ui(new Ui::DialogCheckSumError)
|
|
{
|
|
setAttribute(Qt::WA_TranslucentBackground);
|
|
//setWindowFlags(Qt::CustomizeWindowHint);
|
|
setWindowFlags(Qt::FramelessWindowHint | Qt::Dialog | Qt::Popup | Qt::WindowStaysOnTopHint);
|
|
|
|
ui->setupUi(this);
|
|
}
|
|
|
|
DialogCheckSumError::~DialogCheckSumError()
|
|
{
|
|
delete ui;
|
|
}
|
|
|
|
void DialogCheckSumError::resizeEvent(QResizeEvent *event)
|
|
{
|
|
int nDisplayType = MainWindow::GetCommonData()->GetDisplayType();
|
|
if(nDisplayType==SDISPLAY_1280X1024)
|
|
{
|
|
ui->frame_info->setGeometry(100, 400, 1080, 200);
|
|
ui->label->setGeometry(0, 30, 1080, 80);
|
|
ui->pushButton->setGeometry(1080/2-250/2, 124, 250, 60);
|
|
}
|
|
else if(nDisplayType==SDISPLAY_1920X1080)
|
|
{
|
|
ui->frame_info->setGeometry(100, 400, 1720, 200);
|
|
ui->label->setGeometry(0, 30, 1720, 80);
|
|
ui->pushButton->setGeometry(728, 124, 271, 61);
|
|
}
|
|
}
|
|
|
|
void DialogCheckSumError::on_pushButton_clicked()
|
|
{
|
|
accept();
|
|
}
|