Changeset View
Changeset View
Standalone View
Standalone View
src/qt/walletmodeltransaction.h
Show All 9 Lines | |||||
#include <amount.h> | #include <amount.h> | ||||
#include <QObject> | #include <QObject> | ||||
class SendCoinsRecipient; | class SendCoinsRecipient; | ||||
namespace interfaces { | namespace interfaces { | ||||
class Node; | class Node; | ||||
class PendingWalletTx; | |||||
} // namespace interfaces | } // namespace interfaces | ||||
/** 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); | ||||
QList<SendCoinsRecipient> getRecipients() const; | QList<SendCoinsRecipient> getRecipients() const; | ||||
std::unique_ptr<interfaces::PendingWalletTx> &getWtx(); | CTransactionRef &getWtx(); | ||||
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; | ||||
// 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; | ||||
std::unique_ptr<interfaces::PendingWalletTx> wtx; | CTransactionRef wtx; | ||||
Amount fee; | Amount fee; | ||||
}; | }; | ||||
#endif // BITCOIN_QT_WALLETMODELTRANSACTION_H | #endif // BITCOIN_QT_WALLETMODELTRANSACTION_H |