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.

walletmodeltransaction.h 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // Copyright (c) 2011-2014 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_WALLETMODELTRANSACTION_H
  5. #define STARWELS_QT_WALLETMODELTRANSACTION_H
  6. #include "walletmodel.h"
  7. #include <QObject>
  8. class SendCoinsRecipient;
  9. class CReserveKey;
  10. class CWallet;
  11. class CWalletTx;
  12. /** Data model for a walletmodel transaction. */
  13. class WalletModelTransaction
  14. {
  15. public:
  16. explicit WalletModelTransaction(const QList<SendCoinsRecipient> &recipients);
  17. ~WalletModelTransaction();
  18. QList<SendCoinsRecipient> getRecipients();
  19. CWalletTx *getTransaction();
  20. unsigned int getTransactionSize();
  21. void setTransactionFee(const CAmount& newFee);
  22. CAmount getTransactionFee();
  23. CAmount getTotalTransactionAmount();
  24. void newPossibleKeyChange(CWallet *wallet);
  25. CReserveKey *getPossibleKeyChange();
  26. void reassignAmounts(int nChangePosRet); // needed for the subtract-fee-from-amount feature
  27. private:
  28. QList<SendCoinsRecipient> recipients;
  29. CWalletTx *walletTransaction;
  30. CReserveKey *keyChange;
  31. CAmount fee;
  32. };
  33. #endif // STARWELS_QT_WALLETMODELTRANSACTION_H