1 // Copyright (c) 2011-2014 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 #ifndef BITCOIN_QT_WALLETMODELTRANSACTION_H
6 #define BITCOIN_QT_WALLETMODELTRANSACTION_H
8 #include "walletmodel.h"
12 class SendCoinsRecipient
;
18 /** Data model for a walletmodel transaction. */
19 class WalletModelTransaction
22 explicit WalletModelTransaction(const QList
<SendCoinsRecipient
> &recipients
);
23 ~WalletModelTransaction();
25 QList
<SendCoinsRecipient
> getRecipients();
27 CWalletTx
*getTransaction();
28 unsigned int getTransactionSize();
30 void setTransactionFee(const CAmount
& newFee
);
31 CAmount
getTransactionFee();
33 CAmount
getTotalTransactionAmount();
35 void newPossibleKeyChange(CWallet
*wallet
);
36 CReserveKey
*getPossibleKeyChange();
38 void reassignAmounts(int nChangePosRet
); // needed for the subtract-fee-from-amount feature
41 QList
<SendCoinsRecipient
> recipients
;
42 CWalletTx
*walletTransaction
;
43 CReserveKey
*keyChange
;
47 #endif // BITCOIN_QT_WALLETMODELTRANSACTION_H