-
Notifications
You must be signed in to change notification settings - Fork 0
/
saveprogress.cpp
34 lines (31 loc) · 1004 Bytes
/
saveprogress.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include "saveprogress.h"
#include <QMessageBox>
#include <QTextCodec>
#include "ui_saveprogress.h"
saveprogress::saveprogress(QWidget *parent) :
QLabel(parent),
ui(new Ui::saveprogress)
{
ui->setupUi(this);
bg=new QMovie(":/images/images/setlevel.jpg");
this->setMovie(bg);
this->setScaledContents(true);
bg->start();
connect(ui->confirm,&QPushButton::clicked,[=](){
QString filename=ui->inputname->text();
if (filename.isEmpty()){
QMessageBox::warning(this,
QString::fromLocal8Bit("提示"),
QString::fromLocal8Bit("进度名不能为空!"));
return;
}
emit progressname(filename);
});//点击确认按钮,传递进度名给父窗口
connect(ui->cancel,&QPushButton::clicked,[=](){
emit donothing();
});//点击取消按钮,不保存
}
saveprogress::~saveprogress()
{
delete ui;
}