Bitcoin
walletview.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2018 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_WALLETVIEW_H
6 #define BITCOIN_QT_WALLETVIEW_H
7 
8 #include <amount.h>
9 
10 #include <QStackedWidget>
11 
12 class BitcoinGUI;
13 class ClientModel;
14 class OverviewPage;
15 class PlatformStyle;
16 class ReceiveCoinsDialog;
17 class SendCoinsDialog;
18 class SendCoinsRecipient;
19 class TransactionView;
20 class WalletModel;
21 class AddressBookPage;
22 
23 QT_BEGIN_NAMESPACE
24 class QModelIndex;
25 class QProgressDialog;
26 QT_END_NAMESPACE
27 
28 /*
29  WalletView class. This class represents the view to a single wallet.
30  It was added to support multiple wallet functionality. Each wallet gets its own WalletView instance.
31  It communicates with both the client and the wallet models to give the user an up-to-date view of the
32  current core state.
33 */
34 class WalletView : public QStackedWidget
35 {
36  Q_OBJECT
37 
38 public:
39  explicit WalletView(const PlatformStyle *platformStyle, QWidget *parent);
40  ~WalletView();
41 
42  void setBitcoinGUI(BitcoinGUI *gui);
53 
54  bool handlePaymentRequest(const SendCoinsRecipient& recipient);
55 
56  void showOutOfSyncWarning(bool fShow);
57 
58 private:
61 
63  QWidget *transactionsPage;
68 
70 
71  QProgressDialog *progressDialog;
73 
74 public Q_SLOTS:
76  void gotoOverviewPage();
78  void gotoHistoryPage();
80  void gotoReceiveCoinsPage();
82  void gotoSendCoinsPage(QString addr = "");
83 
85  void gotoSignMessageTab(QString addr = "");
87  void gotoVerifyMessageTab(QString addr = "");
88 
93  void processNewTransaction(const QModelIndex& parent, int start, int /*end*/);
95  void encryptWallet(bool status);
97  void backupWallet();
99  void changePassphrase();
101  void unlockWallet();
102 
104  void usedSendingAddresses();
106  void usedReceivingAddresses();
107 
109  void updateEncryptionStatus();
110 
112  void showProgress(const QString &title, int nProgress);
113 
116 
117 Q_SIGNALS:
119  void showNormalIfMinimized();
121  void message(const QString &title, const QString &message, unsigned int style);
125  void hdEnabledStatusChanged();
127  void incomingTransaction(const QString& date, int unit, const CAmount& amount, const QString& type, const QString& address, const QString& label, const QString& walletName);
130 };
131 
132 #endif // BITCOIN_QT_WALLETVIEW_H
Definition: sendcoinsdialog.h:29
void encryptWallet(bool status)
Definition: walletview.cpp:240
void showNormalIfMinimized()
Definition: moc_walletview.cpp:288
WalletModel * getWalletModel()
Definition: walletview.h:47
Definition: overviewpage.h:28
Definition: walletmodel.h:125
TransactionView * transactionView
Definition: walletview.h:69
void usedReceivingAddresses()
Definition: walletview.cpp:298
void setClientModel(ClientModel *clientModel)
Definition: walletview.cpp:115
Definition: receivecoinsdialog.h:30
void backupWallet()
Definition: walletview.cpp:251
QWidget * transactionsPage
Definition: walletview.h:63
void gotoSignMessageTab(QString addr="")
Definition: walletview.cpp:201
SendCoinsDialog * sendCoinsPage
Definition: walletview.h:65
void requestedSyncWarningInfo()
Definition: walletview.cpp:330
void setBitcoinGUI(BitcoinGUI *gui)
Definition: walletview.cpp:89
void updateEncryptionStatus()
Definition: walletview.cpp:235
QProgressDialog * progressDialog
Definition: walletview.h:71
AddressBookPage * usedReceivingAddressesPage
Definition: walletview.h:67
void gotoOverviewPage()
Definition: walletview.cpp:178
void gotoReceiveCoinsPage()
Definition: walletview.cpp:188
~WalletView()
Definition: walletview.cpp:85
Definition: walletview.h:34
void hdEnabledStatusChanged()
Definition: moc_walletview.cpp:307
void usedSendingAddresses()
Definition: walletview.cpp:290
int64_t CAmount
Definition: amount.h:12
void outOfSyncWarningClicked()
Definition: moc_walletview.cpp:320
void message(const QString &title, const QString &message, unsigned int style)
Definition: moc_walletview.cpp:294
void unlockWallet()
Definition: walletview.cpp:277
AddressBookPage * usedSendingAddressesPage
Definition: walletview.h:66
void gotoVerifyMessageTab(QString addr="")
Definition: walletview.cpp:213
const PlatformStyle * platformStyle
Definition: walletview.h:72
void showOutOfSyncWarning(bool fShow)
Definition: walletview.cpp:230
void gotoHistoryPage()
Definition: walletview.cpp:183
Definition: transactionview.h:33
Definition: clientmodel.h:44
ReceiveCoinsDialog * receiveCoinsPage
Definition: walletview.h:64
void incomingTransaction(const QString &date, int unit, const CAmount &amount, const QString &type, const QString &address, const QString &label, const QString &walletName)
Definition: moc_walletview.cpp:313
void changePassphrase()
Definition: walletview.cpp:270
WalletView(const PlatformStyle *platformStyle, QWidget *parent)
Definition: walletview.cpp:33
ClientModel * clientModel
Definition: walletview.h:59
bool handlePaymentRequest(const SendCoinsRecipient &recipient)
Definition: walletview.cpp:225
OverviewPage * overviewPage
Definition: walletview.h:62
Definition: addressbookpage.h:26
Definition: platformstyle.h:13
void processNewTransaction(const QModelIndex &parent, int start, int)
Definition: walletview.cpp:158
WalletModel * walletModel
Definition: walletview.h:60
void setWalletModel(WalletModel *walletModel)
Definition: walletview.cpp:123
void gotoSendCoinsPage(QString addr="")
Definition: walletview.cpp:193
void encryptionStatusChanged()
Definition: moc_walletview.cpp:301
Definition: bitcoingui.h:64
Definition: walletmodel.h:54
void showProgress(const QString &title, int nProgress)
Definition: walletview.cpp:306