blob: 8f8b9a5ebf19053182b99a7e28feb5cbcaa234a3 (
plain)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
#include "fileErrorDialog.h"
#include "ui_fileErrorDialog.h"
fileErrorDialog::fileErrorDialog(QWidget *parent,QFileInfo fileInfo,QString errorString,bool havePutAtTheEndButton) :
QDialog(parent),
ui(new Ui::fileErrorDialog)
{
ui->setupUi(this);
action=FileError_Cancel;
ui->label_error->setText(errorString);
ui->label_content_file_name->setText(fileInfo.fileName());
ui->label_content_size->setText(QString::number(fileInfo.size()));
QDateTime maxTime(QDate(ULTRACOPIER_PLUGIN_MINIMALYEAR,1,1));
if(maxTime<fileInfo.lastModified())
{
ui->label_modified->setVisible(true);
ui->label_content_modified->setVisible(true);
ui->label_content_modified->setText(fileInfo.lastModified().toString());
}
else
{
ui->label_modified->setVisible(false);
ui->label_content_modified->setVisible(false);
}
if(!havePutAtTheEndButton)
ui->PutToBottom->hide();
}
fileErrorDialog::~fileErrorDialog()
{
delete ui;
}
void fileErrorDialog::changeEvent(QEvent *e)
{
QWidget::changeEvent(e);
switch (e->type()) {
case QEvent::LanguageChange:
ui->retranslateUi(this);
break;
default:
break;
}
}
void fileErrorDialog::on_PutToBottom_clicked()
{
action=FileError_PutToEndOfTheList;
this->close();
}
void fileErrorDialog::on_Retry_clicked()
{
action=FileError_Retry;
this->close();
}
void fileErrorDialog::on_Skip_clicked()
{
action=FileError_Skip;
this->close();
}
void fileErrorDialog::on_Cancel_clicked()
{
action=FileError_Cancel;
this->close();
}
bool fileErrorDialog::getAlways()
{
return ui->checkBoxAlways->isChecked();
}
FileErrorAction fileErrorDialog::getAction()
{
return action;
}
|