mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-11 01:26:10 +01:00
4146a31ccb
qt, wallet: Drop unused parameter in WalletModel::setWalletEncrypted (Hennadii Stepanov)f886a20b02
qt, wallet: Drop unused parameter in Wallet{Frame|View}::encryptWallet (Hennadii Stepanov)6e950118a3
qt, wallet: Remove unused AskPassphraseDialog::Decrypt (Hennadii Stepanov) Pull request description: Grabbed from #42 with an additional commit. Fix #1. ACKs for top commit: MarcoFalke: ACK4146a31ccb
promag: Code review ACK4146a31ccb
. Tree-SHA512: 6070d8995525af826ad972cf1b8988ff98af0528eef285a07ec7ba0e2e92a7a6173a19dc371de94d4b437fa10f7921166e45a081de6ed2f4306e6502aafc94ee
105 lines
3 KiB
C++
105 lines
3 KiB
C++
// Copyright (c) 2011-2019 The Bitcoin Core developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
#ifndef BITCOIN_QT_WALLETFRAME_H
|
|
#define BITCOIN_QT_WALLETFRAME_H
|
|
|
|
#include <QFrame>
|
|
#include <QMap>
|
|
|
|
class BitcoinGUI;
|
|
class ClientModel;
|
|
class PlatformStyle;
|
|
class SendCoinsRecipient;
|
|
class WalletModel;
|
|
class WalletView;
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
class QStackedWidget;
|
|
QT_END_NAMESPACE
|
|
|
|
/**
|
|
* A container for embedding all wallet-related
|
|
* controls into BitcoinGUI. The purpose of this class is to allow future
|
|
* refinements of the wallet controls with minimal need for further
|
|
* modifications to BitcoinGUI, thus greatly simplifying merges while
|
|
* reducing the risk of breaking top-level stuff.
|
|
*/
|
|
class WalletFrame : public QFrame
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit WalletFrame(const PlatformStyle *platformStyle, BitcoinGUI *_gui = nullptr);
|
|
~WalletFrame();
|
|
|
|
void setClientModel(ClientModel *clientModel);
|
|
|
|
bool addWallet(WalletModel *walletModel);
|
|
void setCurrentWallet(WalletModel* wallet_model);
|
|
void removeWallet(WalletModel* wallet_model);
|
|
void removeAllWallets();
|
|
|
|
bool handlePaymentRequest(const SendCoinsRecipient& recipient);
|
|
|
|
void showOutOfSyncWarning(bool fShow);
|
|
|
|
QSize sizeHint() const override { return m_size_hint; }
|
|
|
|
Q_SIGNALS:
|
|
/** Notify that the user has requested more information about the out-of-sync warning */
|
|
void requestedSyncWarningInfo();
|
|
|
|
private:
|
|
QStackedWidget *walletStack;
|
|
BitcoinGUI *gui;
|
|
ClientModel *clientModel;
|
|
QMap<WalletModel*, WalletView*> mapWalletViews;
|
|
|
|
bool bOutOfSync;
|
|
|
|
const PlatformStyle *platformStyle;
|
|
|
|
const QSize m_size_hint;
|
|
|
|
public:
|
|
WalletView* currentWalletView() const;
|
|
WalletModel* currentWalletModel() const;
|
|
|
|
public Q_SLOTS:
|
|
/** Switch to overview (home) page */
|
|
void gotoOverviewPage();
|
|
/** Switch to history (transactions) page */
|
|
void gotoHistoryPage();
|
|
/** Switch to receive coins page */
|
|
void gotoReceiveCoinsPage();
|
|
/** Switch to send coins page */
|
|
void gotoSendCoinsPage(QString addr = "");
|
|
|
|
/** Show Sign/Verify Message dialog and switch to sign message tab */
|
|
void gotoSignMessageTab(QString addr = "");
|
|
/** Show Sign/Verify Message dialog and switch to verify message tab */
|
|
void gotoVerifyMessageTab(QString addr = "");
|
|
|
|
/** Load Partially Signed Bitcoin Transaction */
|
|
void gotoLoadPSBT(bool from_clipboard = false);
|
|
|
|
/** Encrypt the wallet */
|
|
void encryptWallet();
|
|
/** Backup the wallet */
|
|
void backupWallet();
|
|
/** Change encrypted wallet passphrase */
|
|
void changePassphrase();
|
|
/** Ask for passphrase to unlock wallet temporarily */
|
|
void unlockWallet();
|
|
|
|
/** Show used sending addresses */
|
|
void usedSendingAddresses();
|
|
/** Show used receiving addresses */
|
|
void usedReceivingAddresses();
|
|
/** Pass on signal over requested out-of-sync-warning information */
|
|
void outOfSyncWarningClicked();
|
|
};
|
|
|
|
#endif // BITCOIN_QT_WALLETFRAME_H
|