Master Core  v0.0.9 - 49a5c0d97abf09ef2911ddfe8d9551df59f9efd3-dirty
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
walletview.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2013 The Bitcoin developers
2 // Distributed under the MIT/X11 software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef WALLETVIEW_H
6 #define WALLETVIEW_H
7 
8 #include <QStackedWidget>
9 
10 class BitcoinGUI;
11 class ClientModel;
12 class OverviewPage;
13 class ReceiveCoinsDialog;
14 class SendCoinsDialog;
15 class SendMPDialog;
16 class SendCoinsRecipient;
17 class TransactionView;
18 class BalancesView;
19 class WalletModel;
20 
21 QT_BEGIN_NAMESPACE
22 class QModelIndex;
23 class QProgressDialog;
24 QT_END_NAMESPACE
25 
26 /*
27  WalletView class. This class represents the view to a single wallet.
28  It was added to support multiple wallet functionality. Each wallet gets its own WalletView instance.
29  It communicates with both the client and the wallet models to give the user an up-to-date view of the
30  current core state.
31 */
32 class WalletView : public QStackedWidget
33 {
34  Q_OBJECT
35 
36 public:
37  explicit WalletView(QWidget *parent);
38  ~WalletView();
39 
40  void setBitcoinGUI(BitcoinGUI *gui);
50 
51  bool handlePaymentRequest(const SendCoinsRecipient& recipient);
52 
53  void showOutOfSyncWarning(bool fShow);
54 
55 private:
58 
62 
64 // SendCoinsDialog *sendCoinsPage;
68 
71 
72  QProgressDialog *progressDialog;
73 
74 public slots:
76  void gotoOverviewPage();
78  void gotoBalancesPage();
80  void gotoHistoryPage();
82  void gotoReceiveCoinsPage();
84  void gotoSendCoinsPage(QString addr = "");
85 
87  void gotoSignMessageTab(QString addr = "");
89  void gotoVerifyMessageTab(QString addr = "");
90 
95  void processNewTransaction(const QModelIndex& parent, int start, int /*end*/);
97  void encryptWallet(bool status);
99  void backupWallet();
101  void changePassphrase();
103  void unlockWallet();
104 
106  void usedSendingAddresses();
108  void usedReceivingAddresses();
109 
111  void updateEncryptionStatus();
112 
114  void showProgress(const QString &title, int nProgress);
115 
116 signals:
118  void showNormalIfMinimized();
120  void message(const QString &title, const QString &message, unsigned int style);
122  void encryptionStatusChanged(int status);
124  void incomingTransaction(const QString& date, int unit, qint64 amount, const QString& type, const QString& address);
125 };
126 
127 #endif // WALLETVIEW_H
QWidget * transactionsPage
Definition: walletview.h:60
Dialog for requesting payment of bitcoins.
QWidget * balancesPage
Definition: walletview.h:61
void gotoVerifyMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to verify message tab.
Definition: walletview.cpp:234
OverviewPage * overviewPage
Definition: walletview.h:59
TransactionView * transactionView
Definition: walletview.h:69
void usedSendingAddresses()
Show used sending addresses.
Definition: walletview.cpp:311
void changePassphrase()
Change encrypted wallet passphrase.
Definition: walletview.cpp:291
ClientModel * clientModel
Definition: walletview.h:56
WalletView(QWidget *parent)
Definition: walletview.cpp:38
Dialog for sending Master Protocol tokens.
Definition: sendmpdialog.h:26
WalletModel * walletModel
Definition: walletview.h:57
Bitcoin GUI main class.
Definition: bitcoingui.h:35
void incomingTransaction(const QString &date, int unit, qint64 amount, const QString &type, const QString &address)
Notify that a new transaction appeared.
void gotoSendCoinsPage(QString addr="")
Switch to send coins page.
Definition: walletview.cpp:214
void updateEncryptionStatus()
Re-emit encryption status signal.
Definition: walletview.cpp:256
BalancesView * balancesView
Definition: walletview.h:70
void processNewTransaction(const QModelIndex &parent, int start, int)
Show incoming transaction notification for new transactions.
Definition: walletview.cpp:178
void gotoHistoryPage()
Switch to history (transactions) page.
Definition: walletview.cpp:204
void setBitcoinGUI(BitcoinGUI *gui)
Definition: walletview.cpp:121
void usedReceivingAddresses()
Show used receiving addresses.
Definition: walletview.cpp:321
void gotoBalancesPage()
Switch to balances page.
Definition: walletview.cpp:199
void setWalletModel(WalletModel *walletModel)
Set the wallet model.
Definition: walletview.cpp:146
void encryptionStatusChanged(int status)
Encryption status of wallet changed.
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:298
Dialog for sending bitcoins.
Widget showing the transaction list for a wallet, including a filter row.
Definition: balancesview.h:29
Model for Bitcoin network client.
Definition: clientmodel.h:36
void showNormalIfMinimized()
Signal that we want to show the main window.
SendMPDialog * sendMPTab
Definition: walletview.h:67
void backupWallet()
Backup the wallet.
Definition: walletview.cpp:272
bool handlePaymentRequest(const SendCoinsRecipient &recipient)
Definition: walletview.cpp:246
void gotoOverviewPage()
Switch to overview (home) page.
Definition: walletview.cpp:194
void gotoSignMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to sign message tab.
Definition: walletview.cpp:222
SendCoinsDialog * sendCoinsTab
Definition: walletview.h:66
Interface to Bitcoin wallet from Qt view code.
Definition: walletmodel.h:96
void showProgress(const QString &title, int nProgress)
Show progress dialog e.g.
Definition: walletview.cpp:331
void setClientModel(ClientModel *clientModel)
Set the client model.
Definition: walletview.cpp:139
void encryptWallet(bool status)
Encrypt the wallet.
Definition: walletview.cpp:261
ReceiveCoinsDialog * receiveCoinsPage
Definition: walletview.h:63
void gotoReceiveCoinsPage()
Switch to receive coins page.
Definition: walletview.cpp:209
QWidget * sendCoinsPage
Definition: walletview.h:65
Overview ("home") page widget.
Definition: overviewpage.h:24
void showOutOfSyncWarning(bool fShow)
Definition: walletview.cpp:251
QProgressDialog * progressDialog
Definition: walletview.h:72