You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

96 lines
2.8 KiB

// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or
#include <QFrame>
#include <QMap>
class BitcoinGUI;
class ClientModel;
class PlatformStyle;
class SendCoinsRecipient;
class WalletModel;
class WalletView;
class QStackedWidget;
* 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
explicit WalletFrame(const PlatformStyle *platformStyle, BitcoinGUI *_gui = 0);
void setClientModel(ClientModel *clientModel);
bool addWallet(const QString& name, WalletModel *walletModel);
bool setCurrentWallet(const QString& name);
bool removeWallet(const QString &name);
void removeAllWallets();
bool handlePaymentRequest(const SendCoinsRecipient& recipient);
void showOutOfSyncWarning(bool fShow);
/** Notify that the user has requested more information about the out-of-sync warning */
void requestedSyncWarningInfo();
QStackedWidget *walletStack;
BitcoinGUI *gui;
ClientModel *clientModel;
QMap<QString, WalletView*> mapWalletViews;
bool bOutOfSync;
const PlatformStyle *platformStyle;
WalletView *currentWalletView();
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 = "");
/** Encrypt the wallet */
void encryptWallet(bool status);
/** 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();