1 #ifndef QTUM_QT_STAKEPAGE_H 2 #define QTUM_QT_STAKEPAGE_H 3 4 #include <interfaces/wallet.h> 5 6 #include <QWidget> 7 #include <memory> 8 9 class ClientModel; 10 class TransactionFilterProxy; 11 class PlatformStyle; 12 class WalletModel; 13 class TransactionView; 14 15 namespace Ui { 16 class StakePage; 17 } 18 19 QT_BEGIN_NAMESPACE 20 class QModelIndex; 21 QT_END_NAMESPACE 22 23 /** Stake page widget */ 24 class StakePage : public QWidget 25 { 26 Q_OBJECT 27 28 public: 29 explicit StakePage(const PlatformStyle *platformStyle, QWidget *parent = nullptr); 30 ~StakePage(); 31 32 void setClientModel(ClientModel *clientModel); 33 void setWalletModel(WalletModel *walletModel); 34 35 public Q_SLOTS: 36 void setBalance(const interfaces::WalletBalances& balances); 37 void numBlocksChanged(int count, const QDateTime& blockDate, double nVerificationProgress, bool headers); 38 void updateEncryptionStatus(); 39 40 Q_SIGNALS: 41 void requireUnlock(bool fromMenu); 42 43 44 private: 45 Ui::StakePage *ui; 46 ClientModel *clientModel; 47 WalletModel *walletModel; 48 const PlatformStyle* const platformStyle; 49 TransactionView* transactionView; 50 interfaces::WalletBalances m_balances; 51 int64_t m_subsidy; 52 uint64_t m_networkWeight; 53 double m_expectedAnnualROI; 54 55 private Q_SLOTS: 56 void updateDisplayUnit(); 57 void on_checkStake_clicked(bool checked); 58 59 private: 60 void updateSubsidy(); 61 void updateNetworkWeight(); 62 void updateAnnualROI(); 63 }; 64 65 #endif // QTUM_QT_STAKEPAGE_H 66