aboutsummaryrefslogtreecommitdiff
path: root/src/qt/importkeysdialog.h
diff options
context:
space:
mode:
authorchromatic <[email protected]>2021-04-21 16:35:06 -0700
committerchromatic <[email protected]>2021-05-23 19:37:09 -0700
commit0565a85c7cd8df3ea3cfee2a5a9f252b870408ad (patch)
tree4006f4d38b76df9d9f5c49e3563c730478889db5 /src/qt/importkeysdialog.h
parentMerge pull request #1976 from langerhans/1.14.4-travis-pgsql (diff)
downloaddiscoin-0565a85c7cd8df3ea3cfee2a5a9f252b870408ad.tar.xz
discoin-0565a85c7cd8df3ea3cfee2a5a9f252b870408ad.zip
Add GUI to import private keys
Addresses GH #1808. There are several possible future improvements: * add a new icon for key import * reduce duplication of code between the RPC private key importer and the GUI private key importer * improving error messages for various error states
Diffstat (limited to 'src/qt/importkeysdialog.h')
-rw-r--r--src/qt/importkeysdialog.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/qt/importkeysdialog.h b/src/qt/importkeysdialog.h
new file mode 100644
index 000000000..115e0bd0b
--- /dev/null
+++ b/src/qt/importkeysdialog.h
@@ -0,0 +1,50 @@
+// Copyright (c) 2021 The Dogecoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_QT_OPTIONSDIALOG_H
+#define BITCOIN_QT_OPTIONSDIALOG_H
+class CWallet;
+class CBlockIndex;
+
+#include <QDialog>
+#include <QThread>
+
+class ImportKeysDialog;
+class PlatformStyle;
+
+namespace Ui {
+class ImportKeysDialog;
+}
+
+/** Preferences dialog. */
+class ImportKeysDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ explicit ImportKeysDialog(const PlatformStyle *_platformStyle, QWidget *parent = 0);
+ ~ImportKeysDialog();
+
+Q_SIGNALS:
+ void stopExecutor();
+ void rescanWallet(CWallet*, CBlockIndex*);
+
+private:
+ Ui::ImportKeysDialog *ui;
+ const PlatformStyle *platformStyle;
+ QThread thread;
+
+private Q_SLOTS:
+ /* set OK button state (enabled / disabled) */
+ void setOkButtonState(bool fState);
+ void on_resetButton_clicked();
+ void on_okButton_clicked();
+ void on_cancelButton_clicked();
+ void resetDialogValues();
+
+ /* import a private key */
+ bool importKey();
+};
+
+#endif // BITCOIN_QT_OPTIONSDIALOG_H