]>
Commit | Line | Data |
---|---|---|
f914f1a7 | 1 | // Copyright (c) 2011-2013 The Bitcoin Core developers |
78253fcb | 2 | // Distributed under the MIT software license, see the accompanying |
e592d43f WL |
3 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. |
4 | ||
84738627 PJ |
5 | #ifndef BITCOIN_QT_WALLETMODELTRANSACTION_H |
6 | #define BITCOIN_QT_WALLETMODELTRANSACTION_H | |
9e8904f6 JS |
7 | |
8 | #include "walletmodel.h" | |
9 | ||
51ed9ec9 BD |
10 | #include <QObject> |
11 | ||
9e8904f6 JS |
12 | class SendCoinsRecipient; |
13 | ||
51ed9ec9 BD |
14 | class CReserveKey; |
15 | class CWallet; | |
16 | class CWalletTx; | |
17 | ||
9e8904f6 JS |
18 | /** Data model for a walletmodel transaction. */ |
19 | class WalletModelTransaction | |
20 | { | |
21 | public: | |
22 | explicit WalletModelTransaction(const QList<SendCoinsRecipient> &recipients); | |
23 | ~WalletModelTransaction(); | |
24 | ||
25 | QList<SendCoinsRecipient> getRecipients(); | |
26 | ||
27 | CWalletTx *getTransaction(); | |
c1c9d5b4 | 28 | unsigned int getTransactionSize(); |
9e8904f6 | 29 | |
a372168e MF |
30 | void setTransactionFee(const CAmount& newFee); |
31 | CAmount getTransactionFee(); | |
9e8904f6 | 32 | |
a372168e | 33 | CAmount getTotalTransactionAmount(); |
9e8904f6 JS |
34 | |
35 | void newPossibleKeyChange(CWallet *wallet); | |
36 | CReserveKey *getPossibleKeyChange(); | |
37 | ||
292623ad CL |
38 | void reassignAmounts(int nChangePosRet); // needed for the subtract-fee-from-amount feature |
39 | ||
9e8904f6 | 40 | private: |
292623ad | 41 | QList<SendCoinsRecipient> recipients; |
9e8904f6 JS |
42 | CWalletTx *walletTransaction; |
43 | CReserveKey *keyChange; | |
a372168e | 44 | CAmount fee; |
9e8904f6 JS |
45 | }; |
46 | ||
84738627 | 47 | #endif // BITCOIN_QT_WALLETMODELTRANSACTION_H |