1 // Copyright (c) 2011-2016 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 #ifndef BITCOIN_QT_WALLETFRAME_H
6 #define BITCOIN_QT_WALLETFRAME_H
14 class SendCoinsRecipient
;
23 * A container for embedding all wallet-related
24 * controls into BitcoinGUI. The purpose of this class is to allow future
25 * refinements of the wallet controls with minimal need for further
26 * modifications to BitcoinGUI, thus greatly simplifying merges while
27 * reducing the risk of breaking top-level stuff.
29 class WalletFrame
: public QFrame
34 explicit WalletFrame(const PlatformStyle
*platformStyle
, BitcoinGUI
*_gui
= 0);
37 void setClientModel(ClientModel
*clientModel
);
39 bool addWallet(const QString
& name
, WalletModel
*walletModel
);
40 bool setCurrentWallet(const QString
& name
);
41 bool removeWallet(const QString
&name
);
42 void removeAllWallets();
44 bool handlePaymentRequest(const SendCoinsRecipient
& recipient
);
46 void showOutOfSyncWarning(bool fShow
);
49 /** Notify that the user has requested more information about the out-of-sync warning */
50 void requestedSyncWarningInfo();
53 QStackedWidget
*walletStack
;
55 ClientModel
*clientModel
;
56 QMap
<QString
, WalletView
*> mapWalletViews
;
60 const PlatformStyle
*platformStyle
;
62 WalletView
*currentWalletView();
65 /** Switch to overview (home) page */
66 void gotoOverviewPage();
67 /** Switch to history (transactions) page */
68 void gotoHistoryPage();
69 /** Switch to receive coins page */
70 void gotoReceiveCoinsPage();
71 /** Switch to send coins page */
72 void gotoSendCoinsPage(QString addr
= "");
74 /** Show Sign/Verify Message dialog and switch to sign message tab */
75 void gotoSignMessageTab(QString addr
= "");
76 /** Show Sign/Verify Message dialog and switch to verify message tab */
77 void gotoVerifyMessageTab(QString addr
= "");
79 /** Encrypt the wallet */
80 void encryptWallet(bool status
);
81 /** Backup the wallet */
83 /** Change encrypted wallet passphrase */
84 void changePassphrase();
85 /** Ask for passphrase to unlock wallet temporarily */
88 /** Show used sending addresses */
89 void usedSendingAddresses();
90 /** Show used receiving addresses */
91 void usedReceivingAddresses();
92 /** Pass on signal over requested out-of-sync-warning information */
93 void outOfSyncWarningClicked();
96 #endif // BITCOIN_QT_WALLETFRAME_H