2013-11-04 16:20:43 +01:00
|
|
|
// Copyright (c) 2011-2013 The Bitcoin developers
|
|
|
|
// Distributed under the MIT/X11 software license, see the accompanying
|
|
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
2011-07-05 22:09:39 +02:00
|
|
|
#ifndef OVERVIEWPAGE_H
|
|
|
|
#define OVERVIEWPAGE_H
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
|
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:
|
|
|
|
explicit OverviewPage(QWidget *parent = 0);
|
|
|
|
~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
|
|
|
|
2011-07-05 22:09:39 +02:00
|
|
|
public slots:
|
2014-03-29 05:15:28 +01:00
|
|
|
void setBalance(qint64 balance, qint64 unconfirmedBalance, qint64 immatureBalance,
|
|
|
|
qint64 watchOnlyBalance, qint64 watchUnconfBalance, qint64 watchImmatureBalance);
|
2011-07-05 22:09:39 +02:00
|
|
|
|
2011-08-04 04:41:01 +02:00
|
|
|
signals:
|
|
|
|
void transactionClicked(const QModelIndex &index);
|
|
|
|
|
2011-07-05 22:09:39 +02:00
|
|
|
private:
|
|
|
|
Ui::OverviewPage *ui;
|
2012-10-24 21:47:07 +02:00
|
|
|
ClientModel *clientModel;
|
|
|
|
WalletModel *walletModel;
|
2011-07-29 14:36:35 +02:00
|
|
|
qint64 currentBalance;
|
|
|
|
qint64 currentUnconfirmedBalance;
|
2012-02-14 12:08:00 +01:00
|
|
|
qint64 currentImmatureBalance;
|
2014-03-29 05:15:28 +01:00
|
|
|
qint64 currentWatchOnlyBalance;
|
|
|
|
qint64 currentWatchUnconfBalance;
|
|
|
|
qint64 currentWatchImmatureBalance;
|
2011-07-05 22:09:39 +02:00
|
|
|
|
2011-08-03 20:52:18 +02:00
|
|
|
TxViewDelegate *txdelegate;
|
2012-05-12 13:19:44 +02:00
|
|
|
TransactionFilterProxy *filter;
|
2011-08-03 20:52:18 +02:00
|
|
|
|
2011-07-29 14:36:35 +02:00
|
|
|
private slots:
|
2012-06-09 15:41:21 +02:00
|
|
|
void updateDisplayUnit();
|
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);
|
2011-07-05 22:09:39 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // OVERVIEWPAGE_H
|