summaryrefslogtreecommitdiff
path: root/ui/passworddialog.h
diff options
context:
space:
mode:
authorBrian Potchik <brian@vector35.com>2025-10-10 09:34:08 -0400
committerBrian Potchik <brian@vector35.com>2025-10-10 09:34:08 -0400
commit5c41155a46f93ead2b1d7feda8e6bc6f5b4f9549 (patch)
treedda665f5ec8b8e92d490f6b1efea3e35868ee096 /ui/passworddialog.h
parent47f5c67fd7f68dfd95392531431a3efca0ccda3c (diff)
Add password prompting for encrypted containers in Container Browser.
Diffstat (limited to 'ui/passworddialog.h')
-rw-r--r--ui/passworddialog.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/ui/passworddialog.h b/ui/passworddialog.h
new file mode 100644
index 00000000..9f1f01b4
--- /dev/null
+++ b/ui/passworddialog.h
@@ -0,0 +1,34 @@
+#pragma once
+
+#include <QDialog>
+#include <QVBoxLayout>
+#include <QHBoxLayout>
+#include <QLabel>
+#include <QPushButton>
+#include <QCheckBox>
+#include <QDialogButtonBox>
+#include "uitypes.h"
+#include "passwordedit.h"
+
+
+class BINARYNINJAUIAPI PasswordDialog : public QDialog
+{
+ Q_OBJECT
+
+ PasswordEdit* m_passwordEdit = nullptr;
+ QDialogButtonBox* m_buttons = nullptr;
+ QCheckBox* m_saveCheckBox = nullptr;
+
+public:
+ PasswordDialog(QWidget* parent, const QString& resource, bool showSaveOption = false);
+
+ QString password() const;
+ bool shouldSavePassword() const;
+ void notifyInvalid();
+
+signals:
+ void validate(const QString& password, bool shouldSave);
+
+private slots:
+ void onTextChanged();
+};