From d0d366731425ad6c5a221d5c12968632e7ba1478 Mon Sep 17 00:00:00 2001 From: Martin Talarczyk Date: Thu, 17 Sep 2015 10:58:30 +0200 Subject: MainWindow Funkson der Gui hergestelt. passworddialog ist Funksions Fähig und Kommentirt. das Treewidget bei PublicKeyImportDialog gegen listewiget ausgetrauscht und Teilweis Funksion hergestellt nicht Komentiert. Bei keinem Der Klassen ist eine verbindung mit der hybridcrypt gegebn. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mainwindow.cpp | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) (limited to 'mainwindow.cpp') diff --git a/mainwindow.cpp b/mainwindow.cpp index 49d64fc..2f5c9e7 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -12,3 +12,79 @@ MainWindow::~MainWindow() { delete ui; } + + +void MainWindow::on_pushButtonDecrypt_clicked() +{ + +} + +void MainWindow::on_pushButtonEncrypt_clicked() +{ + PublicKeyImportDialog *temp = new PublicKeyImportDialog; + + if (temp->exec()&&!ui->lineEditFilePath->isEnabled()) + { + qDebug() << "Entschlüsseln möglich."; + // HybridCrypt::encrypt(); + } + delete temp; + +} + +void MainWindow::on_pushButtonOpenFile_clicked() +{ + QString fielname = QFileDialog::getOpenFileName(this, "Datei öffnen", + "/home", tr("Datei(*)")); + ui->lineEditFilePath->setText(fielname); + qDebug() << fielname; + +} + + +void MainWindow::on_actionImport_triggered() +{ + QString filename = readKeyFilename("Importiren eines Schlüsselpaares"); + + qDebug() << filename; + + if (!filename.isEmpty()) + { + QString password = readPassword(); + qDebug() << password; + } + +} + + + +void MainWindow::on_actionClose_triggered() +{ + close(); +} + +void MainWindow::on_actionExportMyPublicKey_triggered() +{ + +} + +QString MainWindow::readKeyFilename(QString titel) +{ + return QFileDialog::getOpenFileName(this, titel, + "/home", tr("key(*.net *.der *.pem *.asc)")); +} + +QString MainWindow::readPassword() +{ + PasswordDialog w; + + + if (w.exec()) + { + return w.getPassword(); + } + return ""; +} + + + -- cgit v1.2.3-70-g09d2