[Qt] modalinfolayer: removed unused comments, renamed signal, code style overhaul
[bitcoinplatinum.git] / src / qt / walletframe.h
blob00c2f5636379a2f8cce9aebd1654d75a877870c2
1 // Copyright (c) 2011-2015 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 class WalletFrame : public QFrame
24 Q_OBJECT
26 public:
27 explicit WalletFrame(const PlatformStyle *platformStyle, BitcoinGUI *_gui = 0);
28 ~WalletFrame();
30 void setClientModel(ClientModel *clientModel);
32 bool addWallet(const QString& name, WalletModel *walletModel);
33 bool setCurrentWallet(const QString& name);
34 bool removeWallet(const QString &name);
35 void removeAllWallets();
37 bool handlePaymentRequest(const SendCoinsRecipient& recipient);
39 void showOutOfSyncWarning(bool fShow);
41 Q_SIGNALS:
42 /** Notify that the user has requested more information about the out-of-sync warning */
43 void requestedSyncWarningInfo();
45 private:
46 QStackedWidget *walletStack;
47 BitcoinGUI *gui;
48 ClientModel *clientModel;
49 QMap<QString, WalletView*> mapWalletViews;
51 bool bOutOfSync;
53 const PlatformStyle *platformStyle;
55 WalletView *currentWalletView();
57 public Q_SLOTS:
58 /** Switch to overview (home) page */
59 void gotoOverviewPage();
60 /** Switch to history (transactions) page */
61 void gotoHistoryPage();
62 /** Switch to receive coins page */
63 void gotoReceiveCoinsPage();
64 /** Switch to send coins page */
65 void gotoSendCoinsPage(QString addr = "");
67 /** Show Sign/Verify Message dialog and switch to sign message tab */
68 void gotoSignMessageTab(QString addr = "");
69 /** Show Sign/Verify Message dialog and switch to verify message tab */
70 void gotoVerifyMessageTab(QString addr = "");
72 /** Encrypt the wallet */
73 void encryptWallet(bool status);
74 /** Backup the wallet */
75 void backupWallet();
76 /** Change encrypted wallet passphrase */
77 void changePassphrase();
78 /** Ask for passphrase to unlock wallet temporarily */
79 void unlockWallet();
81 /** Show used sending addresses */
82 void usedSendingAddresses();
83 /** Show used receiving addresses */
84 void usedReceivingAddresses();
85 /** Pass on signal over requested out-of-sync-warning information */
86 void outOfSyncWarningClicked();
89 #endif // BITCOIN_QT_WALLETFRAME_H