2016-06-08 10:53:24 +00:00
|
|
|
#ifndef TRANSACTIONHISTORY_H
|
|
|
|
#define TRANSACTIONHISTORY_H
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QList>
|
2016-10-07 22:22:45 +00:00
|
|
|
#include <QDateTime>
|
2016-06-08 10:53:24 +00:00
|
|
|
|
2016-12-13 18:51:07 +00:00
|
|
|
namespace Monero {
|
2016-06-08 10:53:24 +00:00
|
|
|
class TransactionHistory;
|
|
|
|
}
|
|
|
|
|
|
|
|
class TransactionInfo;
|
|
|
|
|
|
|
|
class TransactionHistory : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
Q_PROPERTY(int count READ count)
|
2016-10-07 22:22:45 +00:00
|
|
|
Q_PROPERTY(QDateTime firstDateTime READ firstDateTime NOTIFY firstDateTimeChanged)
|
|
|
|
Q_PROPERTY(QDateTime lastDateTime READ lastDateTime NOTIFY lastDateTimeChanged)
|
2017-01-13 22:21:58 +00:00
|
|
|
Q_PROPERTY(int minutesToUnlock READ minutesToUnlock)
|
|
|
|
Q_PROPERTY(bool locked READ locked)
|
2016-06-08 10:53:24 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
Q_INVOKABLE TransactionInfo *transaction(int index);
|
2016-10-06 21:47:28 +00:00
|
|
|
// Q_INVOKABLE TransactionInfo * transaction(const QString &id);
|
2017-07-04 03:34:09 +00:00
|
|
|
Q_INVOKABLE QList<TransactionInfo*> getAll(quint32 accountIndex) const;
|
|
|
|
Q_INVOKABLE void refresh(quint32 accountIndex);
|
2019-01-20 15:18:27 +00:00
|
|
|
Q_INVOKABLE QString writeCSV(quint32 accountIndex, QString out);
|
2016-10-02 18:40:40 +00:00
|
|
|
quint64 count() const;
|
2016-10-07 22:22:45 +00:00
|
|
|
QDateTime firstDateTime() const;
|
|
|
|
QDateTime lastDateTime() const;
|
2017-01-13 22:21:58 +00:00
|
|
|
quint64 minutesToUnlock() const;
|
|
|
|
bool locked() const;
|
2016-06-08 10:53:24 +00:00
|
|
|
|
|
|
|
signals:
|
2016-10-06 21:47:28 +00:00
|
|
|
void refreshStarted() const;
|
|
|
|
void refreshFinished() const;
|
2016-10-07 22:22:45 +00:00
|
|
|
void firstDateTimeChanged() const;
|
|
|
|
void lastDateTimeChanged() const;
|
2016-06-08 10:53:24 +00:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
2016-12-13 18:51:07 +00:00
|
|
|
explicit TransactionHistory(Monero::TransactionHistory * pimpl, QObject *parent = 0);
|
2016-06-08 10:53:24 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
friend class Wallet;
|
2016-12-13 18:51:07 +00:00
|
|
|
Monero::TransactionHistory * m_pimpl;
|
2016-06-08 10:53:24 +00:00
|
|
|
mutable QList<TransactionInfo*> m_tinfo;
|
2016-10-07 22:22:45 +00:00
|
|
|
mutable QDateTime m_firstDateTime;
|
|
|
|
mutable QDateTime m_lastDateTime;
|
2017-01-13 22:21:58 +00:00
|
|
|
mutable int m_minutesToUnlock;
|
|
|
|
// history contains locked transfers
|
|
|
|
mutable bool m_locked;
|
2016-06-08 10:53:24 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // TRANSACTIONHISTORY_H
|