59fbb1dc8626bc486522c9f10d1fe4eac6b8b8f4
[novacoin.git] / src / qt / overviewpage.h
1 #ifndef OVERVIEWPAGE_H
2 #define OVERVIEWPAGE_H
3
4 #include <QWidget>
5
6 QT_BEGIN_NAMESPACE
7 class QModelIndex;
8 QT_END_NAMESPACE
9
10 namespace Ui {
11     class OverviewPage;
12 }
13 class WalletModel;
14 class TxViewDelegate;
15 class TransactionFilterProxy;
16
17 /** Overview ("home") page widget */
18 class OverviewPage : public QWidget
19 {
20     Q_OBJECT
21
22 public:
23     explicit OverviewPage(QWidget *parent = 0);
24     ~OverviewPage();
25
26     void setModel(WalletModel *model);
27     void showOutOfSyncWarning(bool fShow);
28
29 public slots:
30     void setBalance(qint64 balance, qint64 stake, qint64 unconfirmedBalance, qint64 immatureBalance);
31     void setNumTransactions(int count);
32
33 signals:
34     void transactionClicked(const QModelIndex &index);
35
36 private:
37     Ui::OverviewPage *ui;
38     WalletModel *model;
39     qint64 currentBalance;
40     qint64 currentStake;
41     qint64 currentUnconfirmedBalance;
42     qint64 currentImmatureBalance;
43
44     TxViewDelegate *txdelegate;
45     TransactionFilterProxy *filter;
46
47 private slots:
48     void updateDisplayUnit();
49     void handleTransactionClicked(const QModelIndex &index);
50 };
51
52 #endif // OVERVIEWPAGE_H