Raven Core  3.0.0
P2P Digital Currency
walletview.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2016 The Bitcoin Core developers
2 // Copyright (c) 2017-2019 The Raven Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef RAVEN_QT_WALLETVIEW_H
7 #define RAVEN_QT_WALLETVIEW_H
8 
9 #include "amount.h"
10 
11 #include <QStackedWidget>
12 
13 class RavenGUI;
14 class ClientModel;
15 class OverviewPage;
16 class PlatformStyle;
17 class ReceiveCoinsDialog;
18 class SendCoinsDialog;
19 class SendCoinsRecipient;
20 class TransactionView;
21 class WalletModel;
22 class AddressBookPage;
23 class AssetsDialog;
24 class CreateAssetDialog;
25 class ReissueAssetDialog;
26 
27 QT_BEGIN_NAMESPACE
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(const PlatformStyle *platformStyle, QWidget *parent);
44  ~WalletView();
45 
46  void setRavenGUI(RavenGUI *gui);
56 
57  bool handlePaymentRequest(const SendCoinsRecipient& recipient);
58 
59  void showOutOfSyncWarning(bool fShow);
60 
61 private:
64 
66  QWidget *transactionsPage;
71 
73 
74  QProgressDialog *progressDialog;
76 
77 
84 public Q_SLOTS:
86  void gotoOverviewPage();
88  void gotoHistoryPage();
90  void gotoReceiveCoinsPage();
92  void gotoSendCoinsPage(QString addr = "");
93 
95  void gotoSignMessageTab(QString addr = "");
97  void gotoVerifyMessageTab(QString addr = "");
98 
103  void processNewTransaction(const QModelIndex& parent, int start, int end);
105  void encryptWallet(bool status);
107  void backupWallet();
109  void changePassphrase();
111  void unlockWallet();
112 
114  void usedSendingAddresses();
116  void usedReceivingAddresses();
117 
119  void updateEncryptionStatus();
120 
122  void showProgress(const QString &title, int nProgress);
123 
126 
127 
130  void gotoAssetsPage();
131  void gotoCreateAssetsPage();
132  void gotoManageAssetsPage();
135 Q_SIGNALS:
137  void showNormalIfMinimized();
139  void message(const QString &title, const QString &message, unsigned int style);
141  void encryptionStatusChanged(int status);
143  void hdEnabledStatusChanged(int hdEnabled);
145  void incomingTransaction(const QString& date, int unit, const CAmount& amount, const QString& type, const QString& address, const QString& label, const QString& assetName);
149  void checkAssets();
150 };
151 
152 #endif // RAVEN_QT_WALLETVIEW_H
QWidget * transactionsPage
Definition: walletview.h:66
Dialog for requesting payment of ravens.
void processNewTransaction(const QModelIndex &parent, int start, int end)
Show incoming transaction notification for new transactions.
Definition: walletview.cpp:198
void gotoVerifyMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to verify message tab.
Definition: walletview.cpp:274
OverviewPage * overviewPage
Definition: walletview.h:65
TransactionView * transactionView
Definition: walletview.h:72
void usedSendingAddresses()
Show used sending addresses.
Definition: walletview.cpp:351
Dialog showing transaction details.
void changePassphrase()
Change encrypted wallet passphrase.
Definition: walletview.cpp:331
ClientModel * clientModel
Definition: walletview.h:62
void gotoAssetsPage()
RVN START.
Definition: walletview.cpp:401
void requestedSyncWarningInfo()
User has requested more information about the out of sync state.
Definition: walletview.cpp:394
WalletModel * walletModel
Definition: walletview.h:63
void outOfSyncWarningClicked()
Notify that the out of sync warning icon has been pressed.
const PlatformStyle * platformStyle
Definition: walletview.h:75
void gotoSendCoinsPage(QString addr="")
Switch to send coins page.
Definition: walletview.cpp:254
void updateEncryptionStatus()
Re-emit encryption status signal.
Definition: walletview.cpp:296
SendCoinsDialog * sendCoinsPage
Definition: walletview.h:68
int64_t CAmount
Amount in corbies (Can be negative)
Definition: amount.h:13
void hdEnabledStatusChanged(int hdEnabled)
HD-Enabled status of wallet changed (only possible during startup)
void gotoHistoryPage()
Switch to history (transactions) page.
Definition: walletview.cpp:244
void gotoManageAssetsPage()
Definition: walletview.cpp:416
void usedReceivingAddresses()
Show used receiving addresses.
Definition: walletview.cpp:361
void setWalletModel(WalletModel *walletModel)
Set the wallet model.
Definition: walletview.cpp:157
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:338
Dialog for sending ravens.
Widget that shows a list of sending or receiving addresses.
ReissueAssetDialog * manageAssetsPage
Definition: walletview.h:81
Model for Raven network client.
Definition: clientmodel.h:39
void showNormalIfMinimized()
RVN END.
void backupWallet()
Backup the wallet.
Definition: walletview.cpp:312
bool handlePaymentRequest(const SendCoinsRecipient &recipient)
Definition: walletview.cpp:286
void gotoOverviewPage()
RVN END.
Definition: walletview.cpp:238
AddressBookPage * usedSendingAddressesPage
Definition: walletview.h:69
void gotoSignMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to sign message tab.
Definition: walletview.cpp:262
CreateAssetDialog * createAssetsPage
Definition: walletview.h:80
Interface to Raven wallet from Qt view code.
Definition: walletmodel.h:165
Raven GUI main class.
Definition: ravengui.h:47
void showProgress(const QString &title, int nProgress)
Show progress dialog e.g.
Definition: walletview.cpp:371
AssetsDialog * assetsPage
RVN START.
Definition: walletview.h:79
WalletView(const PlatformStyle *platformStyle, QWidget *parent)
Definition: walletview.cpp:39
void setClientModel(ClientModel *clientModel)
Set the client model.
Definition: walletview.cpp:149
Dialog showing transaction details.
Dialog for sending ravens.
Definition: assetsdialog.h:30
void incomingTransaction(const QString &date, int unit, const CAmount &amount, const QString &type, const QString &address, const QString &label, const QString &assetName)
Notify that a new transaction appeared.
void encryptWallet(bool status)
Encrypt the wallet.
Definition: walletview.cpp:301
ReceiveCoinsDialog * receiveCoinsPage
Definition: walletview.h:67
void gotoReceiveCoinsPage()
Switch to receive coins page.
Definition: walletview.cpp:249
void setRavenGUI(RavenGUI *gui)
Definition: walletview.cpp:113
Overview ("home") page widget.
Definition: overviewpage.h:34
void checkAssets()
Show the assets GUI.
void showOutOfSyncWarning(bool fShow)
Definition: walletview.cpp:291
QProgressDialog * progressDialog
Definition: walletview.h:74
void gotoCreateAssetsPage()
Definition: walletview.cpp:411
AddressBookPage * usedReceivingAddressesPage
Definition: walletview.h:70