Bitcoin Core  22.99.0
P2P Digital Currency
overviewpage.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2020 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef BITCOIN_QT_OVERVIEWPAGE_H
6 #define BITCOIN_QT_OVERVIEWPAGE_H
7 
8 #include <interfaces/wallet.h>
9 
10 #include <QWidget>
11 #include <memory>
12 
13 class ClientModel;
15 class TxViewDelegate;
16 class PlatformStyle;
17 class WalletModel;
18 
19 namespace Ui {
20  class OverviewPage;
21 }
22 
23 QT_BEGIN_NAMESPACE
24 class QModelIndex;
25 QT_END_NAMESPACE
26 
28 class OverviewPage : public QWidget
29 {
30  Q_OBJECT
31 
32 public:
33  explicit OverviewPage(const PlatformStyle *platformStyle, QWidget *parent = nullptr);
34  ~OverviewPage();
35 
38  void showOutOfSyncWarning(bool fShow);
39 
40 public Q_SLOTS:
41  void setBalance(const interfaces::WalletBalances& balances);
42  void setPrivacy(bool privacy);
43 
44 Q_SIGNALS:
45  void transactionClicked(const QModelIndex &index);
47 
48 protected:
49  void changeEvent(QEvent* e) override;
50 
51 private:
52  Ui::OverviewPage *ui;
56  bool m_privacy{false};
57 
59 
61  std::unique_ptr<TransactionFilterProxy> filter;
62 
63 private Q_SLOTS:
64  void updateDisplayUnit();
65  void handleTransactionClicked(const QModelIndex &index);
66  void updateAlerts(const QString &warnings);
67  void updateWatchOnlyLabels(bool showWatchOnly);
68  void setMonospacedFont(bool use_embedded_font);
69 };
70 
71 #endif // BITCOIN_QT_OVERVIEWPAGE_H
OverviewPage::OverviewPage
OverviewPage(const PlatformStyle *platformStyle, QWidget *parent=nullptr)
Definition: overviewpage.cpp:141
OverviewPage::~OverviewPage
~OverviewPage()
Definition: overviewpage.cpp:193
WalletModel
Interface to Bitcoin wallet from Qt view code.
Definition: walletmodel.h:51
OverviewPage::outOfSyncWarningClicked
void outOfSyncWarningClicked()
OverviewPage::updateAlerts
void updateAlerts(const QString &warnings)
Definition: overviewpage.cpp:323
OverviewPage::ui
Ui::OverviewPage * ui
Definition: overviewpage.h:52
OverviewPage
Overview ("home") page widget.
Definition: overviewpage.h:28
OverviewPage::txdelegate
TxViewDelegate * txdelegate
Definition: overviewpage.h:60
OverviewPage::filter
std::unique_ptr< TransactionFilterProxy > filter
Definition: overviewpage.h:61
OverviewPage::walletModel
WalletModel * walletModel
Definition: overviewpage.h:54
TxViewDelegate
Definition: overviewpage.cpp:33
interfaces::WalletBalances
Collection of wallet balances.
Definition: wallet.h:355
OverviewPage::m_privacy
bool m_privacy
Definition: overviewpage.h:56
OverviewPage::updateWatchOnlyLabels
void updateWatchOnlyLabels(bool showWatchOnly)
Definition: overviewpage.cpp:236
OverviewPage::setClientModel
void setClientModel(ClientModel *clientModel)
Definition: overviewpage.cpp:249
OverviewPage::setBalance
void setBalance(const interfaces::WalletBalances &balances)
Definition: overviewpage.cpp:198
OverviewPage::setMonospacedFont
void setMonospacedFont(bool use_embedded_font)
Definition: overviewpage.cpp:335
OverviewPage::updateDisplayUnit
void updateDisplayUnit()
Definition: overviewpage.cpp:308
OverviewPage::clientModel
ClientModel * clientModel
Definition: overviewpage.h:53
OverviewPage::transactionClicked
void transactionClicked(const QModelIndex &index)
OverviewPage::changeEvent
void changeEvent(QEvent *e) override
Definition: overviewpage.cpp:297
ClientModel
Model for Bitcoin network client.
Definition: clientmodel.h:47
OverviewPage::m_platform_style
const PlatformStyle * m_platform_style
Definition: overviewpage.h:58
Ui
Definition: addressbookpage.h:14
OverviewPage::m_balances
interfaces::WalletBalances m_balances
Definition: overviewpage.h:55
OverviewPage::handleTransactionClicked
void handleTransactionClicked(const QModelIndex &index)
Definition: overviewpage.cpp:172
OverviewPage::setWalletModel
void setWalletModel(WalletModel *walletModel)
Definition: overviewpage.cpp:262
OverviewPage::setPrivacy
void setPrivacy(bool privacy)
Definition: overviewpage.cpp:178
wallet.h
PlatformStyle
Definition: platformstyle.h:13
OverviewPage::showOutOfSyncWarning
void showOutOfSyncWarning(bool fShow)
Definition: overviewpage.cpp:329
TransactionFilterProxy
Filter the transaction list according to pre-specified rules.
Definition: transactionfilterproxy.h:16