Raven Core  3.0.0
P2P Digital Currency
overviewpage.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_OVERVIEWPAGE_H
7 #define RAVEN_QT_OVERVIEWPAGE_H
8 
9 #include "amount.h"
10 
11 #include <QSortFilterProxyModel>
12 #include <QWidget>
13 #include <QMenu>
14 #include <memory>
15 
16 class ClientModel;
18 class TxViewDelegate;
19 class PlatformStyle;
20 class WalletModel;
21 class AssetFilterProxy;
22 
23 class AssetViewDelegate;
24 
25 namespace Ui {
26  class OverviewPage;
27 }
28 
29 QT_BEGIN_NAMESPACE
30 class QModelIndex;
31 QT_END_NAMESPACE
32 
34 class OverviewPage : public QWidget
35 {
36  Q_OBJECT
37 
38 public:
39  explicit OverviewPage(const PlatformStyle *platformStyle, QWidget *parent = 0);
40  ~OverviewPage();
41 
42  void setClientModel(ClientModel *clientModel);
43  void setWalletModel(WalletModel *walletModel);
44  void showOutOfSyncWarning(bool fShow);
45  void showAssets();
46 
47 public Q_SLOTS:
48  void setBalance(const CAmount& balance, const CAmount& unconfirmedBalance, const CAmount& immatureBalance,
49  const CAmount& watchOnlyBalance, const CAmount& watchUnconfBalance, const CAmount& watchImmatureBalance);
50 
51 Q_SIGNALS:
52  void transactionClicked(const QModelIndex &index);
53  void assetSendClicked(const QModelIndex &index);
54  void assetIssueSubClicked(const QModelIndex &index);
55  void assetIssueUniqueClicked(const QModelIndex &index);
56  void assetReissueClicked(const QModelIndex &index);
57  void outOfSyncWarningClicked();
58 
59 private:
60  Ui::OverviewPage *ui;
69 
71  std::unique_ptr<TransactionFilterProxy> filter;
72  std::unique_ptr<AssetFilterProxy> assetFilter;
73 
75  QMenu *contextMenu;
76  QAction *sendAction;
77  QAction *issueSub;
78  QAction *issueUnique;
79  QAction *reissue;
80 
81 
82 private Q_SLOTS:
83  void updateDisplayUnit();
84  void handleTransactionClicked(const QModelIndex &index);
85  void handleAssetClicked(const QModelIndex &index);
86  void updateAlerts(const QString &warnings);
87  void updateWatchOnlyLabels(bool showWatchOnly);
88  void handleOutOfSyncWarningClicks();
89  void assetSearchChanged();
90 };
91 
92 #endif // RAVEN_QT_OVERVIEWPAGE_H
CAmount currentBalance
Definition: overviewpage.h:63
QAction * reissue
Definition: overviewpage.h:79
std::unique_ptr< TransactionFilterProxy > filter
Definition: overviewpage.h:71
CAmount currentWatchOnlyBalance
Definition: overviewpage.h:66
TxViewDelegate * txdelegate
Definition: overviewpage.h:70
WalletModel * walletModel
Definition: overviewpage.h:62
CAmount currentUnconfirmedBalance
Definition: overviewpage.h:64
QAction * sendAction
Definition: overviewpage.h:76
int64_t CAmount
Amount in corbies (Can be negative)
Definition: amount.h:13
AssetViewDelegate * assetdelegate
Definition: overviewpage.h:74
CAmount currentWatchUnconfBalance
Definition: overviewpage.h:67
Model for Raven network client.
Definition: clientmodel.h:39
ClientModel * clientModel
Definition: overviewpage.h:61
QAction * issueSub
Definition: overviewpage.h:77
Filter the transaction list according to pre-specified rules.
Interface to Raven wallet from Qt view code.
Definition: walletmodel.h:165
CAmount currentWatchImmatureBalance
Definition: overviewpage.h:68
CAmount currentImmatureBalance
Definition: overviewpage.h:65
std::unique_ptr< AssetFilterProxy > assetFilter
Definition: overviewpage.h:72
QAction * issueUnique
Definition: overviewpage.h:78
Overview ("home") page widget.
Definition: overviewpage.h:34
Ui::OverviewPage * ui
Definition: overviewpage.h:60
QMenu * contextMenu
Definition: overviewpage.h:75