add account support

Co-authored-by: kenshi84 <kenshi84@protonmail.ch>
This commit is contained in:
selsta
2019-01-14 13:25:59 +01:00
parent 9689fff957
commit bd809abc52
17 changed files with 654 additions and 7 deletions

View File

@@ -0,0 +1,33 @@
#ifndef SUBADDRESSACCOUNT_H
#define SUBADDRESSACCOUNT_H
#include <wallet/api/wallet2_api.h>
#include <QObject>
#include <QList>
#include <QDateTime>
class SubaddressAccount : public QObject
{
Q_OBJECT
public:
Q_INVOKABLE QList<Monero::SubaddressAccountRow*> getAll(bool update = false) const;
Q_INVOKABLE Monero::SubaddressAccountRow * getRow(int index) const;
Q_INVOKABLE void addRow(const QString &label) const;
Q_INVOKABLE void setLabel(quint32 accountIndex, const QString &label) const;
Q_INVOKABLE void refresh() const;
quint64 count() const;
signals:
void refreshStarted() const;
void refreshFinished() const;
public slots:
private:
explicit SubaddressAccount(Monero::SubaddressAccount * subaddressAccountImpl, QObject *parent);
friend class Wallet;
Monero::SubaddressAccount * m_subaddressAccountImpl;
mutable QList<Monero::SubaddressAccountRow*> m_rows;
};
#endif // SUBADDRESSACCOUNT_H