PIVX Core  5.6.99
P2P Digital Currency
walletmodeltransaction.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2013 The Bitcoin developers
2 // Distributed under the MIT/X11 software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef PIVX_QT_WALLETMODELTRANSACTION_H
6 #define PIVX_QT_WALLETMODELTRANSACTION_H
7 
8 #include "walletmodel.h"
9 
10 #include "amount.h"
11 #include "primitives/transaction.h"
12 
13 #include <QObject>
14 
15 class SendCoinsRecipient;
16 
17 class CReserveKey;
18 class CWallet;
19 class CWalletTx;
20 
23 {
24 public:
25  explicit WalletModelTransaction(const QList<SendCoinsRecipient>& recipients);
27 
28  QList<SendCoinsRecipient> getRecipients();
29 
30  unsigned int getTransactionSize();
31 
32  void setTransactionFee(const CAmount& newFee);
34 
36 
39 
41 
42  // return the number of recipients with subtract-fee-from-amount
43  unsigned int subtractFeeFromRecipents() const;
44 
45  // Whether should create a +v2 tx or go simple and create a v1.
46  bool useV2{false};
48 
49 private:
50  const QList<SendCoinsRecipient> recipients;
54 };
55 
56 #endif // PIVX_QT_WALLETMODELTRANSACTION_H
int64_t CAmount
Amount in PIV (Can be negative)
Definition: amount.h:13
A key allocated from the key pool.
Definition: wallet.h:1256
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances,...
Definition: wallet.h:577
A transaction with a bunch of additional info that only the owner cares about.
Definition: wallet.h:325
Data model for a walletmodel transaction.
unsigned int subtractFeeFromRecipents() const
void setTransactionFee(const CAmount &newFee)
const QList< SendCoinsRecipient > recipients
QList< SendCoinsRecipient > getRecipients()
CReserveKey * newPossibleKeyChange(CWallet *wallet)
CTransactionRef & getTransaction()
WalletModelTransaction(const QList< SendCoinsRecipient > &recipients)
std::shared_ptr< const CTransaction > CTransactionRef
Definition: transaction.h:456