blob: 185946ed217c690c352e975d6a44a32ee3e0e6ad (
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
|
#include "decryptdatadialog.h"
#include "ui_decryptdatadialog.h"
DecryptDataDialog::DecryptDataDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::DecryptDataDialog)
{
ui->setupUi(this);
}
DecryptDataDialog::~DecryptDataDialog()
{
delete ui;
}
void DecryptDataDialog::accept()
{
if (!ui->lineEditFilePath->text().isEmpty())
{
m_outFile = QFileDialog::getSaveFileName(this, tr("Datei Speichern"),
QDir::homePath(), "");
if (!m_outFile.isEmpty())
{
QDialog::accept();
}
}
else
{
QMessageBox::information(this, tr("Keine verschlüsselte Datei"),
tr("Bitte wählen Sie eine verschlüsselte Datei aus,\nbevor Sie entschlüsseln."));
}
}
void DecryptDataDialog::on_pushButtonOpenFile_clicked()
{
QString filename = QFileDialog::getOpenFileName(this, tr("Datei Öffnen"),
QDir::homePath(), "");
if (!filename.isEmpty())
{
ui->lineEditFilePath->setText(filename);
}
}
QString DecryptDataDialog::getCipherFilename() const
{
return ui->lineEditFilePath->text();
}
QString DecryptDataDialog::getOutFileName() const
{
return m_outFile;
}
|