Anoncoin  0.9.4
P2P Digital Currency
walletview.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2013 The Bitcoin developers
2 // Copyright (c) 2013-2014 The Anoncoin Core developers
3 // Distributed under the MIT/X11 software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef WALLETVIEW_H
7 #define WALLETVIEW_H
8 
9 #include <QStackedWidget>
10 
11 class AnoncoinGUI;
12 class ClientModel;
13 class OverviewPage;
14 class ReceiveCoinsDialog;
15 class SendCoinsDialog;
16 class SendCoinsRecipient;
17 class TransactionView;
18 class WalletModel;
19 
20 QT_BEGIN_NAMESPACE
21 class QModelIndex;
22 class QProgressDialog;
23 QT_END_NAMESPACE
24 
25 /*
26  WalletView class. This class represents the view to a single wallet.
27  It was added to support multiple wallet functionality. Each wallet gets its own WalletView instance.
28  It communicates with both the client and the wallet models to give the user an up-to-date view of the
29  current core state.
30 */
31 class WalletView : public QStackedWidget
32 {
33  Q_OBJECT
34 
35 public:
36  explicit WalletView(QWidget *parent);
37  ~WalletView();
38 
39  void setAnoncoinGUI(AnoncoinGUI *gui);
49 
50  bool handlePaymentRequest(const SendCoinsRecipient& recipient);
51 
52  void showOutOfSyncWarning(bool fShow);
53 
54 private:
57 
59  QWidget *transactionsPage;
62 
64 
65  QProgressDialog *progressDialog;
66 
67 public slots:
69  void gotoOverviewPage();
71  void gotoHistoryPage();
73  void gotoReceiveCoinsPage();
75  void gotoSendCoinsPage(QString addr = "");
76 
78  void gotoSignMessageTab(QString addr = "");
80  void gotoVerifyMessageTab(QString addr = "");
81 
86  void processNewTransaction(const QModelIndex& parent, int start, int /*end*/);
88  void encryptWallet(bool status);
90  void backupWallet();
92  void changePassphrase();
94  void unlockWallet();
95 
97  void usedSendingAddresses();
100 
102  void updateEncryptionStatus();
103 
105  void showProgress(const QString &title, int nProgress);
106 
107 signals:
109  void showNormalIfMinimized();
111  void message(const QString &title, const QString &message, unsigned int style);
113  void encryptionStatusChanged(int status);
115  void incomingTransaction(const QString& date, int unit, qint64 amount, const QString& type, const QString& address);
116 };
117 
118 #endif // WALLETVIEW_H
QWidget * transactionsPage
Definition: walletview.h:59
Dialog for requesting payment of anoncoins.
void gotoVerifyMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to verify message tab.
Definition: walletview.cpp:189
OverviewPage * overviewPage
Definition: walletview.h:58
TransactionView * transactionView
Definition: walletview.h:63
void usedSendingAddresses()
Show used sending addresses.
Definition: walletview.cpp:266
void changePassphrase()
Change encrypted wallet passphrase.
Definition: walletview.cpp:246
ClientModel * clientModel
Definition: walletview.h:55
WalletView(QWidget *parent)
Definition: walletview.cpp:32
Anoncoin GUI main class.
Definition: anoncoingui.h:47
WalletModel * walletModel
Definition: walletview.h:56
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:169
void updateEncryptionStatus()
Re-emit encryption status signal.
Definition: walletview.cpp:211
void processNewTransaction(const QModelIndex &parent, int start, int)
Show incoming transaction notification for new transactions.
Definition: walletview.cpp:138
SendCoinsDialog * sendCoinsPage
Definition: walletview.h:61
void gotoHistoryPage()
Switch to history (transactions) page.
Definition: walletview.cpp:159
void usedReceivingAddresses()
Show used receiving addresses.
Definition: walletview.cpp:276
void setWalletModel(WalletModel *walletModel)
Set the wallet model.
Definition: walletview.cpp:107
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:253
Dialog for sending anoncoins.
Model for Anoncoin network client.
Definition: clientmodel.h:45
void showNormalIfMinimized()
Signal that we want to show the main window.
void backupWallet()
Backup the wallet.
Definition: walletview.cpp:227
bool handlePaymentRequest(const SendCoinsRecipient &recipient)
Definition: walletview.cpp:201
void gotoOverviewPage()
Switch to overview (home) page.
Definition: walletview.cpp:154
void gotoSignMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to sign message tab.
Definition: walletview.cpp:177
Interface to Anoncoin wallet from Qt view code.
Definition: walletmodel.h:97
void showProgress(const QString &title, int nProgress)
Show progress dialog e.g.
Definition: walletview.cpp:286
void setClientModel(ClientModel *clientModel)
Set the client model.
Definition: walletview.cpp:100
void setAnoncoinGUI(AnoncoinGUI *gui)
Definition: walletview.cpp:82
void encryptWallet(bool status)
Encrypt the wallet.
Definition: walletview.cpp:216
ReceiveCoinsDialog * receiveCoinsPage
Definition: walletview.h:60
void gotoReceiveCoinsPage()
Switch to receive coins page.
Definition: walletview.cpp:164
Overview ("home") page widget.
Definition: overviewpage.h:25
void showOutOfSyncWarning(bool fShow)
Definition: walletview.cpp:206
QProgressDialog * progressDialog
Definition: walletview.h:65