Bitcoin Core  21.99.0
P2P Digital Currency
askpassphrasedialog.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2020 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef BITCOIN_QT_ASKPASSPHRASEDIALOG_H
6 #define BITCOIN_QT_ASKPASSPHRASEDIALOG_H
7 
8 #include <QDialog>
9 
11 
12 class WalletModel;
13 
14 namespace Ui {
15  class AskPassphraseDialog;
16 }
17 
20 class AskPassphraseDialog : public QDialog
21 {
22  Q_OBJECT
23 
24 public:
25  enum Mode {
29  };
30 
31  explicit AskPassphraseDialog(Mode mode, QWidget *parent, SecureString* passphrase_out = nullptr);
33 
34  void accept() override;
35 
36  void setModel(WalletModel *model);
37 
38 private:
39  Ui::AskPassphraseDialog *ui;
42  bool fCapsLock;
44 
45 private Q_SLOTS:
46  void textChanged();
47  void secureClearPassFields();
48  void toggleShowPassword(bool);
49 
50 protected:
51  bool event(QEvent *event) override;
52  bool eventFilter(QObject *object, QEvent *event) override;
53 };
54 
55 #endif // BITCOIN_QT_ASKPASSPHRASEDIALOG_H
std::basic_string< char, std::char_traits< char >, secure_allocator< char > > SecureString
Definition: secure.h:60
Ask passphrase twice and encrypt.
Ask passphrase and unlock.
Ui::AskPassphraseDialog * ui
SecureString * m_passphrase_out
Interface to Bitcoin wallet from Qt view code.
Definition: walletmodel.h:51
Multifunctional dialog to ask for passphrases.
Ask old passphrase + new passphrase twice.