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