Changeset View
Changeset View
Standalone View
Standalone View
src/qt/walletmodeltransaction.h
Show All 14 Lines | |||||
class CWallet; | class CWallet; | ||||
class CWalletTx; | class CWalletTx; | ||||
/** Data model for a walletmodel transaction. */ | /** Data model for a walletmodel transaction. */ | ||||
class WalletModelTransaction { | class WalletModelTransaction { | ||||
public: | public: | ||||
explicit WalletModelTransaction( | explicit WalletModelTransaction( | ||||
const QList<SendCoinsRecipient> &recipients); | const QList<SendCoinsRecipient> &recipients); | ||||
~WalletModelTransaction(); | |||||
QList<SendCoinsRecipient> getRecipients() const; | QList<SendCoinsRecipient> getRecipients() const; | ||||
CWalletTx *getTransaction() const; | CTransactionRef &getTransaction(); | ||||
unsigned int getTransactionSize(); | unsigned int getTransactionSize(); | ||||
void setTransactionFee(const Amount newFee); | void setTransactionFee(const Amount newFee); | ||||
Amount getTransactionFee() const; | Amount getTransactionFee() const; | ||||
Amount getTotalTransactionAmount() const; | Amount getTotalTransactionAmount() const; | ||||
void newPossibleKeyChange(CWallet *wallet); | void newPossibleKeyChange(CWallet *wallet); | ||||
CReserveKey *getPossibleKeyChange(); | CReserveKey *getPossibleKeyChange(); | ||||
// needed for the subtract-fee-from-amount feature | // needed for the subtract-fee-from-amount feature | ||||
void reassignAmounts(int nChangePosRet); | void reassignAmounts(int nChangePosRet); | ||||
private: | private: | ||||
QList<SendCoinsRecipient> recipients; | QList<SendCoinsRecipient> recipients; | ||||
CWalletTx *walletTransaction; | CTransactionRef walletTransaction; | ||||
std::unique_ptr<CReserveKey> keyChange; | std::unique_ptr<CReserveKey> keyChange; | ||||
Amount fee; | Amount fee; | ||||
}; | }; | ||||
#endif // BITCOIN_QT_WALLETMODELTRANSACTION_H | #endif // BITCOIN_QT_WALLETMODELTRANSACTION_H |