Master Core  v0.0.9 - 2abfd2849db8ba7a83957c64eb976b406713c123
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
walletmodeltransaction.cpp
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 
6 
7 #include "wallet.h"
8 
9 WalletModelTransaction::WalletModelTransaction(const QList<SendCoinsRecipient> &recipients) :
10  recipients(recipients),
11  walletTransaction(0),
12  keyChange(0),
13  fee(0)
14 {
16 }
17 
19 {
20  delete keyChange;
21  delete walletTransaction;
22 }
23 
24 QList<SendCoinsRecipient> WalletModelTransaction::getRecipients()
25 {
26  return recipients;
27 }
28 
30 {
31  return walletTransaction;
32 }
33 
35 {
36  return fee;
37 }
38 
40 {
41  fee = newFee;
42 }
43 
45 {
46  qint64 totalTransactionAmount = 0;
47  foreach(const SendCoinsRecipient &rcp, recipients)
48  {
49  totalTransactionAmount += rcp.amount;
50  }
51  return totalTransactionAmount;
52 }
53 
55 {
56  keyChange = new CReserveKey(wallet);
57 }
58 
60 {
61  return keyChange;
62 }
void newPossibleKeyChange(CWallet *wallet)
void setTransactionFee(qint64 newFee)
WalletModelTransaction(const QList< SendCoinsRecipient > &recipients)
QList< SendCoinsRecipient > getRecipients()
A transaction with a bunch of additional info that only the owner cares about.
Definition: wallet.h:451
A key allocated from the key pool.
Definition: wallet.h:402
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances...
Definition: wallet.h:100
const QList< SendCoinsRecipient > recipients