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);
|
2014-12-23 03:28:52 +01:00
|
|
|
void updateDarksendProgress();
|
2011-07-11 20:42:10 +02:00
|
|
|
|
2011-07-05 22:09:39 +02:00
|
|
|
public slots:
|
2014-12-23 03:28:52 +01:00
|
|
|
void darkSendStatus();
|
|
|
|
void setBalance(qint64 balance, qint64 unconfirmedBalance, qint64 immatureBalance, qint64 anonymizedBalance);
|
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:
|
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;
|
2011-07-29 14:36:35 +02:00
|
|
|
qint64 currentBalance;
|
|
|
|
qint64 currentUnconfirmedBalance;
|
2012-02-14 12:08:00 +01:00
|
|
|
qint64 currentImmatureBalance;
|
2014-12-23 03:28:52 +01:00
|
|
|
qint64 currentAnonymizedBalance;
|
2015-02-02 16:04:09 +01:00
|
|
|
qint64 cachedTxLocks;
|
2015-02-01 16:53:49 +01:00
|
|
|
qint64 lastNewBlock;
|
2011-07-05 22:09:39 +02:00
|
|
|
|
2014-12-23 03:28:52 +01:00
|
|
|
int showingDarkSendMessage;
|
|
|
|
int darksendActionCheck;
|
|
|
|
int cachedNumBlocks;
|
2014-12-28 00:45:07 +01: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:
|
2014-12-23 03:28:52 +01:00
|
|
|
void toggleDarksend();
|
2014-12-28 00:45:07 +01:00
|
|
|
void darksendAuto();
|
|
|
|
void darksendReset();
|
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);
|
2011-07-05 22:09:39 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // OVERVIEWPAGE_H
|