Line data Source code
1 : // Copyright (c) 2011-2013 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.
4 :
5 : #ifndef BITCOIN_QT_WALLETFRAME_H
6 : #define BITCOIN_QT_WALLETFRAME_H
7 :
8 : #include <QFrame>
9 : #include <QMap>
10 :
11 : class BitcoinGUI;
12 : class ClientModel;
13 : class PlatformStyle;
14 : class SendCoinsRecipient;
15 : class WalletModel;
16 : class WalletView;
17 :
18 : QT_BEGIN_NAMESPACE
19 : class QStackedWidget;
20 : QT_END_NAMESPACE
21 :
22 : class WalletFrame : public QFrame
23 : {
24 0 : Q_OBJECT
25 :
26 : public:
27 : explicit WalletFrame(const PlatformStyle *platformStyle, BitcoinGUI *_gui = 0);
28 : ~WalletFrame();
29 :
30 : void setClientModel(ClientModel *clientModel);
31 :
32 : bool addWallet(const QString& name, WalletModel *walletModel);
33 : bool setCurrentWallet(const QString& name);
34 : bool removeWallet(const QString &name);
35 : void removeAllWallets();
36 :
37 : bool handlePaymentRequest(const SendCoinsRecipient& recipient);
38 :
39 : void showOutOfSyncWarning(bool fShow);
40 :
41 : private:
42 : QStackedWidget *walletStack;
43 : BitcoinGUI *gui;
44 : ClientModel *clientModel;
45 : QMap<QString, WalletView*> mapWalletViews;
46 :
47 : bool bOutOfSync;
48 :
49 : const PlatformStyle *platformStyle;
50 :
51 : WalletView *currentWalletView();
52 :
53 : public Q_SLOTS:
54 : /** Switch to overview (home) page */
55 : void gotoOverviewPage();
56 : /** Switch to history (transactions) page */
57 : void gotoHistoryPage();
58 : /** Switch to receive coins page */
59 : void gotoReceiveCoinsPage();
60 : /** Switch to send coins page */
61 : void gotoSendCoinsPage(QString addr = "");
62 :
63 : /** Show Sign/Verify Message dialog and switch to sign message tab */
64 : void gotoSignMessageTab(QString addr = "");
65 : /** Show Sign/Verify Message dialog and switch to verify message tab */
66 : void gotoVerifyMessageTab(QString addr = "");
67 :
68 : /** Encrypt the wallet */
69 : void encryptWallet(bool status);
70 : /** Backup the wallet */
71 : void backupWallet();
72 : /** Change encrypted wallet passphrase */
73 : void changePassphrase();
74 : /** Ask for passphrase to unlock wallet temporarily */
75 : void unlockWallet();
76 :
77 : /** Show used sending addresses */
78 : void usedSendingAddresses();
79 : /** Show used receiving addresses */
80 : void usedReceivingAddresses();
81 : };
82 :
83 : #endif // BITCOIN_QT_WALLETFRAME_H
|