2020-12-31 18:50:11 +01:00
|
|
|
// Copyright (c) 2011-2020 The Bitcoin Core developers
|
2014-12-13 05:09:33 +01:00
|
|
|
// Distributed under the MIT software license, see the accompanying
|
2013-11-04 16:20:43 +01:00
|
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
2014-11-03 16:16:40 +01:00
|
|
|
#ifndef BITCOIN_QT_OVERVIEWPAGE_H
|
|
|
|
#define BITCOIN_QT_OVERVIEWPAGE_H
|
2011-07-05 22:09:39 +02:00
|
|
|
|
2020-10-01 16:05:57 +02:00
|
|
|
#include <interfaces/wallet.h>
|
2011-07-05 22:09:39 +02:00
|
|
|
|
|
|
|
#include <QWidget>
|
2017-09-11 15:38:14 +02:00
|
|
|
#include <memory>
|
2011-07-05 22:09:39 +02:00
|
|
|
|
2013-04-13 07:13:08 +02:00
|
|
|
class ClientModel;
|
|
|
|
class TransactionFilterProxy;
|
|
|
|
class TxViewDelegate;
|
|
|
|
class WalletModel;
|
|
|
|
|
2011-07-05 22:09:39 +02:00
|
|
|
namespace Ui {
|
|
|
|
class OverviewPage;
|
|
|
|
}
|
|
|
|
|
2013-01-23 21:51:02 +01:00
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
class QModelIndex;
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
2011-11-13 13:19:52 +01:00
|
|
|
/** Overview ("home") page widget */
|
2011-07-05 22:09:39 +02:00
|
|
|
class OverviewPage : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2019-01-14 15:20:45 +01:00
|
|
|
explicit OverviewPage(QWidget* parent = nullptr);
|
2011-07-05 22:09:39 +02:00
|
|
|
~OverviewPage();
|
|
|
|
|
2012-10-24 21:47:07 +02:00
|
|
|
void setClientModel(ClientModel *clientModel);
|
|
|
|
void setWalletModel(WalletModel *walletModel);
|
2012-05-15 16:57:59 +02:00
|
|
|
void showOutOfSyncWarning(bool fShow);
|
2011-07-11 20:42:10 +02:00
|
|
|
|
2015-07-14 13:59:05 +02:00
|
|
|
public Q_SLOTS:
|
2021-03-17 23:36:11 +01:00
|
|
|
void coinJoinStatus(bool fForce = false);
|
2020-10-01 16:05:57 +02:00
|
|
|
void setBalance(const interfaces::WalletBalances& balances);
|
2020-05-29 08:54:32 +02:00
|
|
|
void setPrivacy(bool privacy);
|
2011-07-05 22:09:39 +02:00
|
|
|
|
2015-07-14 13:59:05 +02:00
|
|
|
Q_SIGNALS:
|
2011-08-04 04:41:01 +02:00
|
|
|
void transactionClicked(const QModelIndex &index);
|
2017-09-09 09:04:02 +02:00
|
|
|
void outOfSyncWarningClicked();
|
2011-08-04 04:41:01 +02:00
|
|
|
|
2011-07-05 22:09:39 +02:00
|
|
|
private:
|
2014-12-23 03:28:52 +01:00
|
|
|
QTimer *timer;
|
2011-07-05 22:09:39 +02:00
|
|
|
Ui::OverviewPage *ui;
|
2012-10-24 21:47:07 +02:00
|
|
|
ClientModel *clientModel;
|
|
|
|
WalletModel *walletModel;
|
2020-08-29 03:37:31 +02:00
|
|
|
interfaces::WalletBalances m_balances;
|
2020-05-29 08:54:32 +02:00
|
|
|
bool m_privacy{false};
|
2015-07-04 06:55:52 +02:00
|
|
|
int nDisplayUnit;
|
2021-03-17 23:36:11 +01:00
|
|
|
bool fShowAdvancedCJUI;
|
2019-04-25 17:37:39 +02:00
|
|
|
int cachedNumISLocks;
|
2011-07-05 22:09:39 +02:00
|
|
|
|
2011-08-03 20:52:18 +02:00
|
|
|
TxViewDelegate *txdelegate;
|
2017-09-11 15:38:14 +02:00
|
|
|
std::unique_ptr<TransactionFilterProxy> filter;
|
2011-08-03 20:52:18 +02:00
|
|
|
|
2016-06-08 20:33:00 +02:00
|
|
|
void SetupTransactionList(int nNumItems);
|
2021-03-17 23:36:11 +01:00
|
|
|
void DisableCoinJoinCompletely();
|
2016-06-08 20:33:00 +02:00
|
|
|
|
2015-07-14 13:59:05 +02:00
|
|
|
private Q_SLOTS:
|
2021-03-17 23:36:11 +01:00
|
|
|
void toggleCoinJoin();
|
2012-06-09 15:41:21 +02:00
|
|
|
void updateDisplayUnit();
|
2021-03-17 23:36:11 +01:00
|
|
|
void updateCoinJoinProgress();
|
|
|
|
void updateAdvancedCJUI(bool fShowAdvancedCJUI);
|
2012-05-12 13:19:44 +02:00
|
|
|
void handleTransactionClicked(const QModelIndex &index);
|
2012-10-24 21:47:07 +02:00
|
|
|
void updateAlerts(const QString &warnings);
|
2014-07-26 21:05:11 +02:00
|
|
|
void updateWatchOnlyLabels(bool showWatchOnly);
|
2017-09-09 09:04:02 +02:00
|
|
|
void handleOutOfSyncWarningClicks();
|
2011-07-05 22:09:39 +02:00
|
|
|
};
|
|
|
|
|
2014-11-03 16:16:40 +01:00
|
|
|
#endif // BITCOIN_QT_OVERVIEWPAGE_H
|