aboutsummaryrefslogtreecommitdiff
path: root/src/widgets/hardware_key_generate_dialog.h
diff options
context:
space:
mode:
authorOsmium Sorcerer <os@sof.beauty>2026-09-23 21:49:39 +0000
committerOsmium Sorcerer <os@sof.beauty>2026-09-23 21:49:39 +0000
commit9b1903f4b902a4e9d1aa16888f82d8268c2cf4ef (patch)
tree4840f09cff2b5d43435eedc28d96dccc5daff374 /src/widgets/hardware_key_generate_dialog.h
parent05db351e119beb53ffc0046509a022ae9c471f15 (diff)
Add dialogs for hardware key generation UI
The key creation is handed off to the platform implementation. Windows will show its own Windows Security UI. On Unix, the application itself provides the PIN directly, enforcing a minimum of six characters.
Diffstat (limited to 'src/widgets/hardware_key_generate_dialog.h')
-rw-r--r--src/widgets/hardware_key_generate_dialog.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/widgets/hardware_key_generate_dialog.h b/src/widgets/hardware_key_generate_dialog.h
new file mode 100644
index 0000000..4988573
--- /dev/null
+++ b/src/widgets/hardware_key_generate_dialog.h
@@ -0,0 +1,33 @@
+#pragma once
+
+#include <QDialog>
+#include <QLineEdit>
+#include <QDialogButtonBox>
+#include <QByteArray>
+
+class HardwareKeyDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ explicit HardwareKeyDialog(QWidget *parent = nullptr);
+ void generate(void);
+
+private:
+ QLineEdit *m_name_line;
+};
+
+class PinEntryDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ explicit PinEntryDialog(QStringView name, QWidget *parent = nullptr);
+ QByteArray pin(void) const;
+
+private:
+ void validate(void);
+ QLineEdit *m_pin_line;
+ QLineEdit *m_confirm_pin_line;
+ QDialogButtonBox *m_buttons;
+};