summaryrefslogtreecommitdiffstats
path: root/decryptdatadialog.h
blob: 8faf51421cdd331eba7a0cb51b767445ca84384b (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
#ifndef DECRYPTDATADIALOG_H
#define DECRYPTDATADIALOG_H

#include <QDialog>
#include <QDir>
#include <QFileDialog>
#include <QMessageBox>
#include <QString>

namespace Ui {
class DecryptDataDialog;
}

/**
 * @brief Ein Wizard, der durch das Entschlüsseln führt.
 */
class DecryptDataDialog : public QDialog
{
    Q_OBJECT

public:
    /**
     * @brief Erzeugt ein neuen DecryptDataDialog, mit dem angegeben Elternfenster.
     * @param parent Das Elternfenster, welches überschattet wird.
     */
    explicit DecryptDataDialog(QWidget *parent = 0);
    ~DecryptDataDialog();

    /**
     * @brief Gibt den Pfad der zu speichernden Datei an.
     * @return Der Dateipfad.
     */
    QString getOutFileName() const;

    /**
     * @brief Gibt den Pfad der zu entschlüsselnden Datei an.
     * @return Der Dateipfad.
     */
    QString getCipherFilename() const;

public slots:
    /**
     * @brief Fängt Fehler nach dem Okay ab.
     */
    virtual void accept();

private slots:
    /**
     * @brief Öffnet einen Dateidialog
     * für die verschlüsselte Datei.
     * Schreibt Dateipfad in lineEditFilePath(ChangeEvent).
     */
    void on_pushButtonOpenFile_clicked();

private:
    /**
     * @brief Liefert Zugriff auf die UI.
     */
    Ui::DecryptDataDialog *ui;

    /**
     * @brief Der Pfad, der zu speichernden Datei.
     */
    QString m_outFile;

};

#endif // DECRYPTDATADIALOG_H