2017-11-09 19:34:51 +01:00
|
|
|
/*
|
|
|
|
|
* This file is part of the Flowee project
|
|
|
|
|
* Copyright (C) 2011-2015 The Bitcoin Core developers
|
|
|
|
|
*
|
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
2013-11-04 16:20:43 +01:00
|
|
|
|
2018-01-16 10:47:52 +00:00
|
|
|
#ifndef FLOWEE_QT_OVERVIEWPAGE_H
|
|
|
|
|
#define FLOWEE_QT_OVERVIEWPAGE_H
|
2011-07-05 22:09:39 +02:00
|
|
|
|
2014-04-22 15:46:19 -07:00
|
|
|
#include "amount.h"
|
|
|
|
|
|
2011-07-05 22:09:39 +02:00
|
|
|
#include <QWidget>
|
|
|
|
|
|
2013-04-13 00:13:08 -05:00
|
|
|
class ClientModel;
|
|
|
|
|
class TransactionFilterProxy;
|
|
|
|
|
class TxViewDelegate;
|
2015-07-28 15:20:14 +02:00
|
|
|
class PlatformStyle;
|
2013-04-13 00:13:08 -05:00
|
|
|
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:
|
2015-07-28 15:20:14 +02:00
|
|
|
explicit OverviewPage(const PlatformStyle *platformStyle, QWidget *parent = 0);
|
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-01-20 19:21:53 +01:00
|
|
|
void setBalance(const int64_t& balance, const int64_t& unconfirmedBalance, const int64_t& immatureBalance,
|
|
|
|
|
const int64_t& watchOnlyBalance, const int64_t& watchUnconfBalance, const int64_t& watchImmatureBalance);
|
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);
|
|
|
|
|
|
2011-07-05 22:09:39 +02:00
|
|
|
private:
|
|
|
|
|
Ui::OverviewPage *ui;
|
2012-10-24 21:47:07 +02:00
|
|
|
ClientModel *clientModel;
|
|
|
|
|
WalletModel *walletModel;
|
2021-01-20 19:21:53 +01:00
|
|
|
int64_t currentBalance;
|
|
|
|
|
int64_t currentUnconfirmedBalance;
|
|
|
|
|
int64_t currentImmatureBalance;
|
|
|
|
|
int64_t currentWatchOnlyBalance;
|
|
|
|
|
int64_t currentWatchUnconfBalance;
|
|
|
|
|
int64_t 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
|
|
|
|
2015-07-14 13:59:05 +02:00
|
|
|
private Q_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
|
|
|
};
|
|
|
|
|
|
2018-01-16 10:47:52 +00:00
|
|
|
#endif
|