aboutsummaryrefslogtreecommitdiff
path: root/src/dialogs/certificateselectiondialog.hpp
diff options
context:
space:
mode:
authorFelix (xq) Queißner <git@mq32.de>2020-06-22 21:10:04 +0200
committerFelix (xq) Queißner <git@mq32.de>2020-06-22 21:10:04 +0200
commit75ec461eeaa851cb5c53f4cfffc434e3e529ed1d (patch)
tree3944737340718ca3675381aa06636045d397e780 /src/dialogs/certificateselectiondialog.hpp
parent8dbfb0890560fd1cd698d06fa05ac868c4db8576 (diff)
downloadkristall-75ec461eeaa851cb5c53f4cfffc434e3e529ed1d.tar.gz
Restructures the project source and cleans up a bit
Diffstat (limited to 'src/dialogs/certificateselectiondialog.hpp')
-rw-r--r--src/dialogs/certificateselectiondialog.hpp54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/dialogs/certificateselectiondialog.hpp b/src/dialogs/certificateselectiondialog.hpp
new file mode 100644
index 0000000..e628f5c
--- /dev/null
+++ b/src/dialogs/certificateselectiondialog.hpp
@@ -0,0 +1,54 @@
+#ifndef CERTIFICATESELECTIONDIALOG_HPP
+#define CERTIFICATESELECTIONDIALOG_HPP
+
+#include <QDialog>
+
+#include "cryptoidentity.hpp"
+
+namespace Ui {
+class CertificateSelectionDialog;
+}
+
+class CertificateSelectionDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ explicit CertificateSelectionDialog(QWidget *parent = nullptr);
+ ~CertificateSelectionDialog();
+
+ void setServerQuery(QString const & query);
+
+ CryptoIdentity identity() const;
+
+private slots:
+ void on_use_temp_cert_30m_clicked();
+
+ void on_use_temp_cert_1h_clicked();
+
+ void on_use_temp_cert_12h_clicked();
+
+ void on_use_temp_cert_24h_clicked();
+
+ void on_use_temp_cert_48h_clicked();
+
+ void on_create_new_cert_clicked();
+
+ void on_use_selected_cert_clicked();
+
+ void on_certificates_doubleClicked(const QModelIndex &index);
+
+private:
+ //! Creates an anonymous identity with a randomly chosen name that
+ //! will time out on `timeout`, then accepts the dialog.
+ void acceptTemporaryWithTimeout(QDateTime timeout);
+
+
+ void on_currentChanged(const QModelIndex &current, const QModelIndex &previous);
+private:
+ Ui::CertificateSelectionDialog *ui;
+
+ CryptoIdentity cryto_identity;
+};
+
+#endif // CERTIFICATESELECTIONDIALOG_HPP