]>
Commit | Line | Data |
---|---|---|
f914f1a7 | 1 | // Copyright (c) 2011-2013 The Bitcoin Core developers |
78253fcb | 2 | // Distributed under the MIT software license, see the accompanying |
e592d43f WL |
3 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. |
4 | ||
84738627 PJ |
5 | #ifndef BITCOIN_QT_WALLETFRAME_H |
6 | #define BITCOIN_QT_WALLETFRAME_H | |
67155d92 EL |
7 | |
8 | #include <QFrame> | |
26702e69 | 9 | #include <QMap> |
67155d92 EL |
10 | |
11 | class BitcoinGUI; | |
12 | class ClientModel; | |
a41d5fe0 | 13 | class SendCoinsRecipient; |
67155d92 | 14 | class WalletModel; |
26702e69 WL |
15 | class WalletView; |
16 | ||
17 | QT_BEGIN_NAMESPACE | |
18 | class QStackedWidget; | |
19 | QT_END_NAMESPACE | |
67155d92 EL |
20 | |
21 | class WalletFrame : public QFrame | |
22 | { | |
23 | Q_OBJECT | |
25c0cce7 | 24 | |
67155d92 | 25 | public: |
25c0cce7 | 26 | explicit WalletFrame(BitcoinGUI *_gui = 0); |
67155d92 EL |
27 | ~WalletFrame(); |
28 | ||
29 | void setClientModel(ClientModel *clientModel); | |
30 | ||
31 | bool addWallet(const QString& name, WalletModel *walletModel); | |
32 | bool setCurrentWallet(const QString& name); | |
16314593 | 33 | bool removeWallet(const QString &name); |
67155d92 EL |
34 | void removeAllWallets(); |
35 | ||
a41d5fe0 | 36 | bool handlePaymentRequest(const SendCoinsRecipient& recipient); |
67155d92 EL |
37 | |
38 | void showOutOfSyncWarning(bool fShow); | |
39 | ||
40 | private: | |
26702e69 WL |
41 | QStackedWidget *walletStack; |
42 | BitcoinGUI *gui; | |
43 | ClientModel *clientModel; | |
44 | QMap<QString, WalletView*> mapWalletViews; | |
45 | ||
46 | bool bOutOfSync; | |
67155d92 | 47 | |
146ba964 WL |
48 | WalletView *currentWalletView(); |
49 | ||
e092f229 | 50 | public Q_SLOTS: |
67155d92 EL |
51 | /** Switch to overview (home) page */ |
52 | void gotoOverviewPage(); | |
53 | /** Switch to history (transactions) page */ | |
54 | void gotoHistoryPage(); | |
67155d92 EL |
55 | /** Switch to receive coins page */ |
56 | void gotoReceiveCoinsPage(); | |
57 | /** Switch to send coins page */ | |
abf11f79 | 58 | void gotoSendCoinsPage(QString addr = ""); |
67155d92 EL |
59 | |
60 | /** Show Sign/Verify Message dialog and switch to sign message tab */ | |
61 | void gotoSignMessageTab(QString addr = ""); | |
62 | /** Show Sign/Verify Message dialog and switch to verify message tab */ | |
63 | void gotoVerifyMessageTab(QString addr = ""); | |
64 | ||
65 | /** Encrypt the wallet */ | |
66 | void encryptWallet(bool status); | |
67 | /** Backup the wallet */ | |
68 | void backupWallet(); | |
69 | /** Change encrypted wallet passphrase */ | |
70 | void changePassphrase(); | |
71 | /** Ask for passphrase to unlock wallet temporarily */ | |
72 | void unlockWallet(); | |
73 | ||
74fb765e WL |
74 | /** Show used sending addresses */ |
75 | void usedSendingAddresses(); | |
76 | /** Show used receiving addresses */ | |
77 | void usedReceivingAddresses(); | |
67155d92 EL |
78 | }; |
79 | ||
84738627 | 80 | #endif // BITCOIN_QT_WALLETFRAME_H |