66 lines
1.7 KiB
C++
66 lines
1.7 KiB
C++
/*
|
|
* This file is part of the Flowee project
|
|
* Copyright (C) 2011-2015 The Bitcoin Core developers
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef FLOWEE_QT_ASKPASSPHRASEDIALOG_H
|
|
#define FLOWEE_QT_ASKPASSPHRASEDIALOG_H
|
|
|
|
#include <QDialog>
|
|
|
|
class WalletModel;
|
|
|
|
namespace Ui {
|
|
class AskPassphraseDialog;
|
|
}
|
|
|
|
/** Multifunctional dialog to ask for passphrases. Used for encryption, unlocking, and changing the passphrase.
|
|
*/
|
|
class AskPassphraseDialog : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
enum Mode {
|
|
Encrypt, /**< Ask passphrase twice and encrypt */
|
|
Unlock, /**< Ask passphrase and unlock */
|
|
ChangePass, /**< Ask old passphrase + new passphrase twice */
|
|
Decrypt /**< Ask passphrase and decrypt wallet */
|
|
};
|
|
|
|
explicit AskPassphraseDialog(Mode mode, QWidget *parent);
|
|
~AskPassphraseDialog();
|
|
|
|
void accept();
|
|
|
|
void setModel(WalletModel *model);
|
|
|
|
private:
|
|
Ui::AskPassphraseDialog *ui;
|
|
Mode mode;
|
|
WalletModel *model;
|
|
bool fCapsLock;
|
|
|
|
private Q_SLOTS:
|
|
void textChanged();
|
|
|
|
protected:
|
|
bool event(QEvent *event);
|
|
bool eventFilter(QObject *object, QEvent *event);
|
|
};
|
|
|
|
#endif
|