]> Git Repo - VerusCoin.git/blame - src/qt/askpassphrasedialog.h
maturity
[VerusCoin.git] / src / qt / askpassphrasedialog.h
CommitLineData
f914f1a7 1// Copyright (c) 2011-2013 The Bitcoin Core developers
78253fcb 2// Distributed under the MIT software license, see the accompanying
e592d43f
WL
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
84738627
PJ
5#ifndef BITCOIN_QT_ASKPASSPHRASEDIALOG_H
6#define BITCOIN_QT_ASKPASSPHRASEDIALOG_H
b7bcaf94
WL
7
8#include <QDialog>
9
51ed9ec9
BD
10class WalletModel;
11
b7bcaf94
WL
12namespace Ui {
13 class AskPassphraseDialog;
14}
b7bcaf94 15
af836ad5
WL
16/** Multifunctional dialog to ask for passphrases. Used for encryption, unlocking, and changing the passphrase.
17 */
b7bcaf94
WL
18class AskPassphraseDialog : public QDialog
19{
20 Q_OBJECT
21
22public:
23 enum Mode {
af836ad5
WL
24 Encrypt, /**< Ask passphrase twice and encrypt */
25 Unlock, /**< Ask passphrase and unlock */
26 ChangePass, /**< Ask old passphrase + new passphrase twice */
27 Decrypt /**< Ask passphrase and decrypt wallet */
b7bcaf94
WL
28 };
29
309f796b 30 explicit AskPassphraseDialog(Mode mode, QWidget *parent);
b7bcaf94
WL
31 ~AskPassphraseDialog();
32
33 void accept();
34
35 void setModel(WalletModel *model);
36
37private:
38 Ui::AskPassphraseDialog *ui;
39 Mode mode;
40 WalletModel *model;
7298ebb4 41 bool fCapsLock;
b7bcaf94 42
e092f229 43private Q_SLOTS:
b7bcaf94 44 void textChanged();
a80b1a03
PK
45
46protected:
7298ebb4 47 bool event(QEvent *event);
83a3fb81 48 bool eventFilter(QObject *object, QEvent *event);
b7bcaf94
WL
49};
50
84738627 51#endif // BITCOIN_QT_ASKPASSPHRASEDIALOG_H
This page took 0.185998 seconds and 4 git commands to generate.