Bitcoin ABC  0.22.12
P2P Digital Currency
walletview.h
Go to the documentation of this file.
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.
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 ClientModel;
13 class OverviewPage;
14 class PlatformStyle;
15 class ReceiveCoinsDialog;
16 class SendCoinsDialog;
17 class SendCoinsRecipient;
18 class TransactionView;
19 class WalletModel;
20 class AddressBookPage;
21 
22 QT_BEGIN_NAMESPACE
23 class QModelIndex;
24 class QProgressDialog;
25 QT_END_NAMESPACE
26 
34 class WalletView : public QStackedWidget {
35  Q_OBJECT
36 
37 public:
39  QWidget *parent);
40  ~WalletView();
41 
54  void setWalletModel(WalletModel *walletModel);
55 
56  bool handlePaymentRequest(const SendCoinsRecipient &recipient);
57 
58  void showOutOfSyncWarning(bool fShow);
59 
60 private:
63 
65  QWidget *transactionsPage;
70 
72 
73  QProgressDialog *progressDialog;
75 
76 public Q_SLOTS:
78  void gotoOverviewPage();
80  void gotoHistoryPage();
82  void gotoReceiveCoinsPage();
84  void gotoSendCoinsPage(QString addr = "");
85 
87  void gotoSignMessageTab(QString addr = "");
89  void gotoVerifyMessageTab(QString addr = "");
91  void gotoLoadPSBT();
92 
99  void processNewTransaction(const QModelIndex &parent, int start, int end);
101  void encryptWallet(bool status);
103  void backupWallet();
105  void changePassphrase();
107  void unlockWallet();
108 
110  void usedSendingAddresses();
112  void usedReceivingAddresses();
113 
115  void updateEncryptionStatus();
116 
118  void showProgress(const QString &title, int nProgress);
119 
122 
123 Q_SIGNALS:
124  void transactionClicked();
125  void coinsSent();
127  void message(const QString &title, const QString &message,
128  unsigned int style);
132  void hdEnabledStatusChanged();
134  void incomingTransaction(const QString &date, int unit, const Amount amount,
135  const QString &type, const QString &address,
136  const QString &label, const QString &walletName);
139 };
140 
141 #endif // BITCOIN_QT_WALLETVIEW_H
QWidget * transactionsPage
Definition: walletview.h:65
Dialog for requesting payment of bitcoins.
WalletView class.
Definition: walletview.h:34
void processNewTransaction(const QModelIndex &parent, int start, int end)
Show incoming transaction notification for new transactions.
Definition: walletview.cpp:157
void gotoVerifyMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to verify message tab.
Definition: walletview.cpp:224
OverviewPage * overviewPage
Definition: walletview.h:64
TransactionView * transactionView
Definition: walletview.h:71
void usedSendingAddresses()
Show used sending addresses.
Definition: walletview.cpp:400
void changePassphrase()
Change encrypted wallet passphrase.
Definition: walletview.cpp:381
ClientModel * clientModel
Definition: walletview.h:61
Definition: amount.h:17
void requestedSyncWarningInfo()
User has requested more information about the out of sync state.
Definition: walletview.cpp:439
WalletModel * walletModel
Definition: walletview.h:62
void outOfSyncWarningClicked()
Notify that the out of sync warning icon has been pressed.
const PlatformStyle * platformStyle
Definition: walletview.h:74
void gotoSendCoinsPage(QString addr="")
Switch to send coins page.
Definition: walletview.cpp:203
void updateEncryptionStatus()
Re-emit encryption status signal.
Definition: walletview.cpp:340
void gotoLoadPSBT()
Load Partially Signed Bitcoin Transaction.
Definition: walletview.cpp:237
SendCoinsDialog * sendCoinsPage
Definition: walletview.h:67
WalletModel * getWalletModel()
Definition: walletview.h:48
void gotoHistoryPage()
Switch to history (transactions) page.
Definition: walletview.cpp:195
void usedReceivingAddresses()
Show used receiving addresses.
Definition: walletview.cpp:408
void setWalletModel(WalletModel *walletModel)
Set the wallet model.
Definition: walletview.cpp:116
Widget showing the transaction list for a wallet, including a filter row.
void message(const QString &title, const QString &message, unsigned int style)
Fired when a message should be reported to the user.
void unlockWallet()
Ask for passphrase to unlock wallet temporarily.
Definition: walletview.cpp:387
Dialog for sending bitcoins.
Widget that shows a list of sending or receiving addresses.
Model for Bitcoin network client.
Definition: clientmodel.h:34
void backupWallet()
Backup the wallet.
Definition: walletview.cpp:358
bool handlePaymentRequest(const SendCoinsRecipient &recipient)
Definition: walletview.cpp:332
void gotoOverviewPage()
Switch to overview (home) page.
Definition: walletview.cpp:191
void incomingTransaction(const QString &date, int unit, const Amount amount, const QString &type, const QString &address, const QString &label, const QString &walletName)
Notify that a new transaction appeared.
void encryptionStatusChanged()
Encryption status of wallet changed.
AddressBookPage * usedSendingAddressesPage
Definition: walletview.h:68
void gotoSignMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to sign message tab.
Definition: walletview.cpp:211
Interface to Bitcoin wallet from Qt view code.
Definition: walletmodel.h:47
void showProgress(const QString &title, int nProgress)
Show progress dialog e.g.
Definition: walletview.cpp:416
void setClientModel(ClientModel *clientModel)
Set the client model.
Definition: walletview.cpp:109
void hdEnabledStatusChanged()
HD-Enabled status of wallet changed (only possible during startup)
void encryptWallet(bool status)
Encrypt the wallet.
Definition: walletview.cpp:344
ReceiveCoinsDialog * receiveCoinsPage
Definition: walletview.h:66
void gotoReceiveCoinsPage()
Switch to receive coins page.
Definition: walletview.cpp:199
WalletView(const PlatformStyle *platformStyle, WalletModel *walletModel, QWidget *parent)
Definition: walletview.cpp:36
void coinsSent()
void transactionClicked()
Overview ("home") page widget.
Definition: overviewpage.h:28
void showOutOfSyncWarning(bool fShow)
Definition: walletview.cpp:336
QProgressDialog * progressDialog
Definition: walletview.h:73
AddressBookPage * usedReceivingAddressesPage
Definition: walletview.h:69