aboutsummaryrefslogtreecommitdiff
path: root/src/qt/walletcontroller.h
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2019-05-24 17:14:16 -0400
committerAndrew Chow <achow101-github@achow101.com>2019-09-05 20:36:57 -0400
commit9b41cbb28f603f4f71f5854d6ae2527932bba3cb (patch)
tree2b88b292c10566b75c0df9128ffc8ad913e2635e /src/qt/walletcontroller.h
parent78863e290006e61060622dbdbecc5b58c0fefa05 (diff)
Expose wallet creation to the GUI via WalletController
Co-authored-by: João Barbosa <joao.paulo.barbosa@gmail.com>
Diffstat (limited to 'src/qt/walletcontroller.h')
-rw-r--r--src/qt/walletcontroller.h31
1 files changed, 30 insertions, 1 deletions
diff --git a/src/qt/walletcontroller.h b/src/qt/walletcontroller.h
index dada9cfa63..4e1a772f3a 100644
--- a/src/qt/walletcontroller.h
+++ b/src/qt/walletcontroller.h
@@ -6,6 +6,7 @@
#define BITCOIN_QT_WALLETCONTROLLER_H
#include <qt/walletmodel.h>
+#include <support/allocators/secure.h>
#include <sync.h>
#include <map>
@@ -16,8 +17,9 @@
#include <QMessageBox>
#include <QMutex>
#include <QProgressDialog>
-#include <QString>
#include <QThread>
+#include <QTimer>
+#include <QString>
class OptionsModel;
class PlatformStyle;
@@ -27,6 +29,9 @@ class Handler;
class Node;
} // namespace interfaces
+class AskPassphraseDialog;
+class CreateWalletActivity;
+class CreateWalletDialog;
class OpenWalletActivity;
class WalletControllerActivity;
@@ -98,6 +103,30 @@ protected:
std::string m_warning_message;
};
+
+class CreateWalletActivity : public WalletControllerActivity
+{
+ Q_OBJECT
+
+public:
+ CreateWalletActivity(WalletController* wallet_controller, QWidget* parent_widget);
+ virtual ~CreateWalletActivity();
+
+ void create();
+
+Q_SIGNALS:
+ void created(WalletModel* wallet_model);
+
+private:
+ void askPasshprase();
+ void createWallet();
+ void finish();
+
+ SecureString m_passphrase;
+ CreateWalletDialog* m_create_wallet_dialog{nullptr};
+ AskPassphraseDialog* m_passphrase_dialog{nullptr};
+};
+
class OpenWalletActivity : public WalletControllerActivity
{
Q_OBJECT