You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

overviewpage.h 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. // Copyright (c) 2011-2016 The Starwels developers
  2. // Distributed under the MIT software license, see the accompanying
  3. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
  4. #ifndef STARWELS_QT_OVERVIEWPAGE_H
  5. #define STARWELS_QT_OVERVIEWPAGE_H
  6. #include "amount.h"
  7. #include <QWidget>
  8. #include <memory>
  9. class ClientModel;
  10. class TransactionFilterProxy;
  11. class TxViewDelegate;
  12. class PlatformStyle;
  13. class WalletModel;
  14. namespace Ui {
  15. class OverviewPage;
  16. }
  17. QT_BEGIN_NAMESPACE
  18. class QModelIndex;
  19. QT_END_NAMESPACE
  20. /** Overview ("home") page widget */
  21. class OverviewPage : public QWidget
  22. {
  23. Q_OBJECT
  24. public:
  25. explicit OverviewPage(const PlatformStyle *platformStyle, QWidget *parent = 0);
  26. ~OverviewPage();
  27. void setClientModel(ClientModel *clientModel);
  28. void setWalletModel(WalletModel *walletModel);
  29. void showOutOfSyncWarning(bool fShow);
  30. public Q_SLOTS:
  31. void setBalance(const CAmount& balance, const CAmount& unconfirmedBalance, const CAmount& immatureBalance,
  32. const CAmount& watchOnlyBalance, const CAmount& watchUnconfBalance, const CAmount& watchImmatureBalance);
  33. Q_SIGNALS:
  34. void transactionClicked(const QModelIndex &index);
  35. void outOfSyncWarningClicked();
  36. private:
  37. Ui::OverviewPage *ui;
  38. ClientModel *clientModel;
  39. WalletModel *walletModel;
  40. CAmount currentBalance;
  41. CAmount currentUnconfirmedBalance;
  42. CAmount currentImmatureBalance;
  43. CAmount currentWatchOnlyBalance;
  44. CAmount currentWatchUnconfBalance;
  45. CAmount currentWatchImmatureBalance;
  46. TxViewDelegate *txdelegate;
  47. std::unique_ptr<TransactionFilterProxy> filter;
  48. private Q_SLOTS:
  49. void updateDisplayUnit();
  50. void handleTransactionClicked(const QModelIndex &index);
  51. void updateAlerts(const QString &warnings);
  52. void updateWatchOnlyLabels(bool showWatchOnly);
  53. void handleOutOfSyncWarningClicks();
  54. };
  55. #endif // STARWELS_QT_OVERVIEWPAGE_H