Remove unreachable or otherwise redundant code
[bitcoinplatinum.git] / src / qt / walletframe.h
blob42ce69fea150b22e92ea13ed0fa6f64a073134fb
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
8 #include <QFrame>
9 #include <QMap>
11 class BitcoinGUI;
12 class ClientModel;
13 class PlatformStyle;
14 class SendCoinsRecipient;
15 class WalletModel;
16 class WalletView;
18 QT_BEGIN_NAMESPACE
19 class QStackedWidget;
20 QT_END_NAMESPACE
22 /**
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
31 Q_OBJECT
33 public:
34 explicit WalletFrame(const PlatformStyle *platformStyle, BitcoinGUI *_gui = 0);
35 ~WalletFrame();
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);
48 Q_SIGNALS:
49 /** Notify that the user has requested more information about the out-of-sync warning */
50 void requestedSyncWarningInfo();
52 private:
53 QStackedWidget *walletStack;
54 BitcoinGUI *gui;
55 ClientModel *clientModel;
56 QMap<QString, WalletView*> mapWalletViews;
58 bool bOutOfSync;
60 const PlatformStyle *platformStyle;
62 WalletView *currentWalletView();
64 public Q_SLOTS:
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 */
82 void backupWallet();
83 /** Change encrypted wallet passphrase */
84 void changePassphrase();
85 /** Ask for passphrase to unlock wallet temporarily */
86 void unlockWallet();
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