PRCYCoin  2.0.0.7rc1
P2P Digital Currency
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 BITCOIN_QT_WALLETVIEW_H
6 #define BITCOIN_QT_WALLETVIEW_H
7 
8 #include "amount.h"
9 #include "askpassphrasedialog.h"
10 #include "masternodelist.h"
11 
12 #include <QStackedWidget>
13 
14 class BitcoinGUI;
15 class ClientModel;
16 class OverviewPage;
17 class HistoryPage;
18 class ReceiveCoinsDialog;
19 class SendCoinsDialog;
20 class OptionsPage;
21 class SendCoinsRecipient;
22 class TransactionView;
23 class WalletModel;
24 class BlockExplorer;
25 
26 QT_BEGIN_NAMESPACE
27 class QLabel;
28 class QModelIndex;
29 class QProgressDialog;
30 QT_END_NAMESPACE
31 
32 /*
33  WalletView class. This class represents the view to a single wallet.
34  It was added to support multiple wallet functionality. Each wallet gets its own WalletView instance.
35  It communicates with both the client and the wallet models to give the user an up-to-date view of the
36  current core state.
37 */
38 class WalletView : public QStackedWidget
39 {
40  Q_OBJECT
41 
42 public:
43  explicit WalletView(QWidget* parent);
44  ~WalletView();
45 
46  void setBitcoinGUI(BitcoinGUI* gui);
56 
57 
58  void showSyncStatus(bool fShow);
59 
60 private:
63 
65  QWidget* transactionsPage;
72 
74 
75  QProgressDialog* progressDialog;
76  QLabel* transactionSum;
77 
78 public Q_SLOTS:
80  void gotoOverviewPage();
82  void gotoHistoryPage();
84  void gotoMasternodePage();
86  void gotoBlockExplorerPage();
88  void gotoReceiveCoinsPage();
90  void gotoOptionsPage();
92  void gotoSendCoinsPage(QString addr = "");
94  void gotoMultiSendDialog();
95 
97  void showSeedPhrase();
98 
103  void processNewTransaction(const QModelIndex& parent, int start, int /*end*/);
105  void encryptWallet(bool status);
107  void backupWallet();
109  void changePassphrase();
113  void lockWallet();
115  void toggleLockWallet();
116 
118  void usedSendingAddresses();
120  void usedReceivingAddresses();
121 
123  void updateEncryptionStatus();
124 
126  void showProgress(const QString& title, int nProgress);
127 
129  void trxAmount(QString amount);
130  void stakingStatus(bool);
131 
132 Q_SIGNALS:
134  void showNormalIfMinimized();
136  void message(const QString& title, const QString& message, unsigned int style);
138  void encryptionStatusChanged(int status);
140  void incomingTransaction(const QString& date, int unit, const CAmount& amount, const QString& type, const QString& address, const QString& confirmations);
141  void stakingStatusChanged(bool);
142 };
143 
144 #endif // BITCOIN_QT_WALLETVIEW_H
WalletView::sendCoinsPage
SendCoinsDialog * sendCoinsPage
Definition: walletview.h:69
TransactionView
Widget showing the transaction list for a wallet, including a filter row.
Definition: transactionview.h:32
ReceiveCoinsDialog
Dialog for requesting payment of bitcoins.
Definition: receivecoinsdialog.h:33
WalletView::transactionView
TransactionView * transactionView
Definition: walletview.h:73
WalletView::WalletView
WalletView(QWidget *parent)
Definition: walletview.cpp:38
WalletView
Definition: walletview.h:38
WalletModel
Interface to Bitcoin wallet from Qt view code.
Definition: walletmodel.h:102
WalletView::explorerWindow
BlockExplorer * explorerWindow
Definition: walletview.h:70
AskPassphraseDialog::Context
Context
Definition: askpassphrasedialog.h:34
WalletView::gotoReceiveCoinsPage
void gotoReceiveCoinsPage()
Switch to receive coins page.
Definition: walletview.cpp:214
WalletView::overviewPage
OverviewPage * overviewPage
Definition: walletview.h:64
OverviewPage
Overview ("home") page widget.
Definition: overviewpage.h:33
WalletView::showProgress
void showProgress(const QString &title, int nProgress)
Show progress dialog e.g.
Definition: walletview.cpp:405
WalletView::clientModel
ClientModel * clientModel
Definition: walletview.h:61
WalletView::optionsPage
OptionsPage * optionsPage
Definition: walletview.h:67
WalletView::gotoSendCoinsPage
void gotoSendCoinsPage(QString addr="")
Switch to send coins page.
Definition: walletview.cpp:224
WalletView::stakingStatusChanged
void stakingStatusChanged(bool)
WalletView::processNewTransaction
void processNewTransaction(const QModelIndex &parent, int start, int)
Show incoming transaction notification for new transactions.
Definition: walletview.cpp:168
SendCoinsRecipient
Definition: walletmodel.h:46
WalletView::encryptionStatusChanged
void encryptionStatusChanged(int status)
Encryption status of wallet changed.
WalletView::stakingStatus
void stakingStatus(bool)
Definition: walletview.cpp:120
WalletView::setClientModel
void setClientModel(ClientModel *clientModel)
Set the client model.
Definition: walletview.cpp:125
masternodelist.h
MasternodeList
Masternode Manager page widget.
Definition: masternodelist.h:36
WalletView::trxAmount
void trxAmount(QString amount)
Update selected PRCY amount from transactionview.
Definition: walletview.cpp:424
WalletView::showNormalIfMinimized
void showNormalIfMinimized()
Signal that we want to show the main window.
WalletView::updateEncryptionStatus
void updateEncryptionStatus()
Re-Q_EMIT encryption status signal.
Definition: walletview.cpp:241
WalletView::message
void message(const QString &title, const QString &message, unsigned int style)
Fired when a message should be reported to the user.
CAmount
int64_t CAmount
Amount in PRCY (Can be negative)
Definition: amount.h:17
WalletView::toggleLockWallet
void toggleLockWallet()
Toggle wallet lock state.
Definition: walletview.cpp:367
SendCoinsDialog
Dialog for sending bitcoins.
Definition: sendcoinsdialog.h:32
WalletView::transactionsPage
QWidget * transactionsPage
Definition: walletview.h:65
HistoryPage
Dialog for options page.
Definition: historypage.h:37
BlockExplorer
Definition: blockexplorer.h:25
WalletView::gotoBlockExplorerPage
void gotoBlockExplorerPage()
Switch to explorer page.
Definition: walletview.cpp:204
WalletView::historyPage
HistoryPage * historyPage
Definition: walletview.h:68
WalletView::gotoOptionsPage
void gotoOptionsPage()
Switch to options page.
Definition: walletview.cpp:219
ClientModel
Model for PRCY network client.
Definition: clientmodel.h:44
WalletView::unlockWallet
void unlockWallet(AskPassphraseDialog::Context context)
Ask for passphrase to unlock wallet temporarily.
Definition: walletview.cpp:347
WalletView::~WalletView
~WalletView()
Definition: walletview.cpp:98
WalletView::showSeedPhrase
void showSeedPhrase()
Return 24 word seed phrase.
Definition: walletview.cpp:269
WalletView::gotoOverviewPage
void gotoOverviewPage()
Switch to overview (home) page.
Definition: walletview.cpp:187
WalletView::setWalletModel
void setWalletModel(WalletModel *walletModel)
Set the wallet model.
Definition: walletview.cpp:135
WalletView::changePassphrase
void changePassphrase()
Change encrypted wallet passphrase.
Definition: walletview.cpp:341
WalletView::encryptWallet
void encryptWallet(bool status)
Encrypt the wallet.
Definition: walletview.cpp:246
OptionsPage
Dialog for options page.
Definition: optionspage.h:45
WalletView::walletModel
WalletModel * walletModel
Definition: walletview.h:62
WalletView::backupWallet
void backupWallet()
Backup the wallet.
Definition: walletview.cpp:257
WalletView::receiveCoinsPage
ReceiveCoinsDialog * receiveCoinsPage
Definition: walletview.h:66
WalletView::masternodeListPage
MasternodeList * masternodeListPage
Definition: walletview.h:71
WalletView::transactionSum
QLabel * transactionSum
Definition: walletview.h:76
WalletView::incomingTransaction
void incomingTransaction(const QString &date, int unit, const CAmount &amount, const QString &type, const QString &address, const QString &confirmations)
Notify that a new transaction appeared.
WalletView::gotoMultiSendDialog
void gotoMultiSendDialog()
Show MultiSend Dialog.
Definition: walletview.cpp:229
WalletView::usedSendingAddresses
void usedSendingAddresses()
Show used sending addresses.
Definition: walletview.cpp:385
WalletView::setBitcoinGUI
void setBitcoinGUI(BitcoinGUI *gui)
Definition: walletview.cpp:102
WalletView::usedReceivingAddresses
void usedReceivingAddresses()
Show used receiving addresses.
Definition: walletview.cpp:395
WalletView::lockWallet
void lockWallet()
Lock wallet.
Definition: walletview.cpp:359
BitcoinGUI
Bitcoin GUI main class.
Definition: bitcoingui.h:48
WalletView::gotoMasternodePage
void gotoMasternodePage()
Switch to masternode page.
Definition: walletview.cpp:209
amount.h
WalletView::gotoHistoryPage
void gotoHistoryPage()
Switch to history (transactions) page.
Definition: walletview.cpp:194
askpassphrasedialog.h
WalletView::progressDialog
QProgressDialog * progressDialog
Definition: walletview.h:75
WalletView::showSyncStatus
void showSyncStatus(bool fShow)
Definition: walletview.cpp:236