mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-11 05:14:34 +00:00
history: add Transfer class
This commit is contained in:
parent
26abdee5c4
commit
a4c3de9e2e
2 changed files with 29 additions and 0 deletions
|
@ -24,6 +24,7 @@ HEADERS += \
|
||||||
src/libwalletqt/TransactionHistory.h \
|
src/libwalletqt/TransactionHistory.h \
|
||||||
src/libwalletqt/TransactionInfo.h \
|
src/libwalletqt/TransactionInfo.h \
|
||||||
src/libwalletqt/QRCodeImageProvider.h \
|
src/libwalletqt/QRCodeImageProvider.h \
|
||||||
|
src/libwalletqt/Transfer.h \
|
||||||
oshelper.h \
|
oshelper.h \
|
||||||
TranslationManager.h \
|
TranslationManager.h \
|
||||||
src/model/TransactionHistoryModel.h \
|
src/model/TransactionHistoryModel.h \
|
||||||
|
|
28
src/libwalletqt/Transfer.h
Normal file
28
src/libwalletqt/Transfer.h
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
#ifndef TRANSFER_H
|
||||||
|
#define TRANSFER_H
|
||||||
|
|
||||||
|
#include <wallet/wallet2_api.h>
|
||||||
|
#include <QObject>
|
||||||
|
|
||||||
|
class Transfer : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
Q_PROPERTY(quint64 amount READ amount)
|
||||||
|
Q_PROPERTY(QString address READ address)
|
||||||
|
private:
|
||||||
|
explicit Transfer(uint64_t _amount, const QString &_address, QObject *parent = 0): m_amount(_amount), m_address(_address), QObject(parent) {};
|
||||||
|
private:
|
||||||
|
friend class TransactionInfo;
|
||||||
|
qint64 m_amount;
|
||||||
|
QString m_address;
|
||||||
|
|
||||||
|
public:
|
||||||
|
qint64 amount(){ return m_amount; }
|
||||||
|
QString address(){ return m_address; };
|
||||||
|
|
||||||
|
};
|
||||||
|
// in order to wrap it to QVariant
|
||||||
|
Q_DECLARE_METATYPE(Transfer*)
|
||||||
|
|
||||||
|
|
||||||
|
#endif // TRANSACTIONINFO_H
|
Loading…
Reference in a new issue