2014-12-17 01:47:57 +00:00
|
|
|
// Copyright (c) 2011-2013 The Bitcoin Core developers
|
2014-12-13 04:09:33 +00:00
|
|
|
// Distributed under the MIT software license, see the accompanying
|
2013-11-04 15:20:43 +00:00
|
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
2014-11-03 15:16:40 +00:00
|
|
|
#ifndef BITCOIN_QT_OVERVIEWPAGE_H
|
|
|
|
#define BITCOIN_QT_OVERVIEWPAGE_H
|
2011-07-05 20:09:39 +00:00
|
|
|
|
2014-04-22 22:46:19 +00:00
|
|
|
#include "amount.h"
|
|
|
|
|
2011-07-05 20:09:39 +00:00
|
|
|
#include <QWidget>
|
|
|
|
|
2013-04-13 05:13:08 +00:00
|
|
|
class ClientModel;
|
|
|
|
class TransactionFilterProxy;
|
|
|
|
class TxViewDelegate;
|
|
|
|
class WalletModel;
|
|
|
|
|
2011-07-05 20:09:39 +00:00
|
|
|
namespace Ui {
|
|
|
|
class OverviewPage;
|
|
|
|
}
|
|
|
|
|
2013-01-23 20:51:02 +00:00
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
class QModelIndex;
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
2011-11-13 12:19:52 +00:00
|
|
|
/** Overview ("home") page widget */
|
2011-07-05 20:09:39 +00:00
|
|
|
class OverviewPage : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit OverviewPage(QWidget *parent = 0);
|
|
|
|
~OverviewPage();
|
|
|
|
|
2012-10-24 19:47:07 +00:00
|
|
|
void setClientModel(ClientModel *clientModel);
|
|
|
|
void setWalletModel(WalletModel *walletModel);
|
2012-05-15 14:57:59 +00:00
|
|
|
void showOutOfSyncWarning(bool fShow);
|
2011-07-11 18:42:10 +00:00
|
|
|
|
2015-07-14 11:59:05 +00:00
|
|
|
public Q_SLOTS:
|
2014-04-22 22:46:19 +00:00
|
|
|
void setBalance(const CAmount& balance, const CAmount& unconfirmedBalance, const CAmount& immatureBalance,
|
|
|
|
const CAmount& watchOnlyBalance, const CAmount& watchUnconfBalance, const CAmount& watchImmatureBalance);
|
2011-07-05 20:09:39 +00:00
|
|
|
|
2015-07-14 11:59:05 +00:00
|
|
|
Q_SIGNALS:
|
2011-08-04 02:41:01 +00:00
|
|
|
void transactionClicked(const QModelIndex &index);
|
|
|
|
|
2011-07-05 20:09:39 +00:00
|
|
|
private:
|
|
|
|
Ui::OverviewPage *ui;
|
2012-10-24 19:47:07 +00:00
|
|
|
ClientModel *clientModel;
|
|
|
|
WalletModel *walletModel;
|
2014-04-22 22:46:19 +00:00
|
|
|
CAmount currentBalance;
|
|
|
|
CAmount currentUnconfirmedBalance;
|
|
|
|
CAmount currentImmatureBalance;
|
|
|
|
CAmount currentWatchOnlyBalance;
|
|
|
|
CAmount currentWatchUnconfBalance;
|
|
|
|
CAmount currentWatchImmatureBalance;
|
2011-07-05 20:09:39 +00:00
|
|
|
|
2011-08-03 18:52:18 +00:00
|
|
|
TxViewDelegate *txdelegate;
|
2012-05-12 11:19:44 +00:00
|
|
|
TransactionFilterProxy *filter;
|
2011-08-03 18:52:18 +00:00
|
|
|
|
2015-07-14 11:59:05 +00:00
|
|
|
private Q_SLOTS:
|
2012-06-09 13:41:21 +00:00
|
|
|
void updateDisplayUnit();
|
2012-05-12 11:19:44 +00:00
|
|
|
void handleTransactionClicked(const QModelIndex &index);
|
2012-10-24 19:47:07 +00:00
|
|
|
void updateAlerts(const QString &warnings);
|
2014-07-26 19:05:11 +00:00
|
|
|
void updateWatchOnlyLabels(bool showWatchOnly);
|
2011-07-05 20:09:39 +00:00
|
|
|
};
|
|
|
|
|
2014-11-03 15:16:40 +00:00
|
|
|
#endif // BITCOIN_QT_OVERVIEWPAGE_H
|