Bitcoin ABC  0.24.7
P2P Digital Currency
askpassphrasedialog.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2015 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 {
16 }
17 
21 class AskPassphraseDialog : public QDialog {
22  Q_OBJECT
23 
24 public:
25  enum Mode {
30  };
31 
32  explicit AskPassphraseDialog(Mode mode, QWidget *parent,
33  SecureString *passphrase_out = nullptr);
35 
36  void accept() override;
37 
38  void setModel(WalletModel *model);
39 
40 private:
41  Ui::AskPassphraseDialog *ui;
44  bool fCapsLock;
46 
47 private Q_SLOTS:
48  void textChanged();
49  void secureClearPassFields();
50  void toggleShowPassword(bool);
51 
52 protected:
53  bool event(QEvent *event) override;
54  bool eventFilter(QObject *object, QEvent *event) override;
55 };
56 
57 #endif // BITCOIN_QT_ASKPASSPHRASEDIALOG_H
AskPassphraseDialog::Unlock
@ Unlock
Ask passphrase and unlock.
Definition: askpassphrasedialog.h:27
AskPassphraseDialog::eventFilter
bool eventFilter(QObject *object, QEvent *event) override
Definition: askpassphrasedialog.cpp:265
WalletModel
Interface to Bitcoin wallet from Qt view code.
Definition: walletmodel.h:47
AskPassphraseDialog::m_passphrase_out
SecureString * m_passphrase_out
Definition: askpassphrasedialog.h:45
AskPassphraseDialog::accept
void accept() override
Definition: askpassphrasedialog.cpp:96
AskPassphraseDialog::~AskPassphraseDialog
~AskPassphraseDialog()
Definition: askpassphrasedialog.cpp:87
AskPassphraseDialog
Multifunctional dialog to ask for passphrases.
Definition: askpassphrasedialog.h:21
AskPassphraseDialog::fCapsLock
bool fCapsLock
Definition: askpassphrasedialog.h:44
AskPassphraseDialog::secureClearPassFields
void secureClearPassFields()
Definition: askpassphrasedialog.cpp:297
AskPassphraseDialog::event
bool event(QEvent *event) override
Definition: askpassphrasedialog.cpp:241
SecureString
std::basic_string< char, std::char_traits< char >, secure_allocator< char > > SecureString
Definition: secure.h:56
AskPassphraseDialog::toggleShowPassword
void toggleShowPassword(bool)
Definition: askpassphrasedialog.cpp:257
AskPassphraseDialog::model
WalletModel * model
Definition: askpassphrasedialog.h:43
AskPassphraseDialog::textChanged
void textChanged()
Definition: askpassphrasedialog.cpp:220
secure.h
AskPassphraseDialog::Decrypt
@ Decrypt
Ask passphrase and decrypt wallet.
Definition: askpassphrasedialog.h:29
Ui
Definition: addressbookpage.h:14
AskPassphraseDialog::ui
Ui::AskPassphraseDialog * ui
Definition: askpassphrasedialog.h:41
AskPassphraseDialog::AskPassphraseDialog
AskPassphraseDialog(Mode mode, QWidget *parent, SecureString *passphrase_out=nullptr)
Definition: askpassphrasedialog.cpp:21
AskPassphraseDialog::ChangePass
@ ChangePass
Ask old passphrase + new passphrase twice.
Definition: askpassphrasedialog.h:28
AskPassphraseDialog::mode
Mode mode
Definition: askpassphrasedialog.h:42
AskPassphraseDialog::Encrypt
@ Encrypt
Ask passphrase twice and encrypt.
Definition: askpassphrasedialog.h:26
AskPassphraseDialog::Mode
Mode
Definition: askpassphrasedialog.h:25
AskPassphraseDialog::setModel
void setModel(WalletModel *model)
Definition: askpassphrasedialog.cpp:92