feather/src/widgets/WalletUnlockWidget.h
2024-01-01 18:07:58 +01:00

43 lines
844 B
C++

// SPDX-License-Identifier: BSD-3-Clause
// SPDX-FileCopyrightText: 2020-2024 The Monero Project
#ifndef FEATHER_WALLETUNLOCKWIDGET_H
#define FEATHER_WALLETUNLOCKWIDGET_H
#include <QWidget>
#include <QMenu>
#include "Wallet.h"
namespace Ui {
class WalletUnlockWidget;
}
class WalletUnlockWidget : public QWidget
{
Q_OBJECT
public:
explicit WalletUnlockWidget(QWidget *parent, Wallet *wallet = nullptr);
~WalletUnlockWidget();
void setWalletName(const QString &walletName);
void reset();
void incorrectPassword();
signals:
void unlockWallet(const QString &password);
void closeWallet();
private slots:
void tryUnlock();
protected:
void keyPressEvent(QKeyEvent* e) override;
private:
QScopedPointer<Ui::WalletUnlockWidget> ui;
Wallet *m_wallet;
};
#endif //FEATHER_WALLETUNLOCKWIDGET_H