mirror of
https://github.com/feather-wallet/feather.git
synced 2025-02-27 21:40:36 +00:00
41 lines
1.1 KiB
C++
41 lines
1.1 KiB
C++
// SPDX-License-Identifier: BSD-3-Clause
|
|
// SPDX-FileCopyrightText: 2014-2022 The Monero Project
|
|
|
|
#ifndef SUBADDRESSACCOUNT_H
|
|
#define SUBADDRESSACCOUNT_H
|
|
|
|
#include <functional>
|
|
|
|
#include <wallet/api/wallet2_api.h>
|
|
#include <QObject>
|
|
#include <QReadWriteLock>
|
|
#include <QList>
|
|
#include <QDateTime>
|
|
|
|
class SubaddressAccount : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
Q_INVOKABLE void getAll() const;
|
|
Q_INVOKABLE bool getRow(int index, std::function<void (Monero::SubaddressAccountRow &)> callback) 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;
|
|
Monero::SubaddressAccountRow* row(int index) const;
|
|
|
|
signals:
|
|
void refreshStarted() const;
|
|
void refreshFinished() const;
|
|
|
|
public slots:
|
|
|
|
private:
|
|
explicit SubaddressAccount(Monero::SubaddressAccount * subaddressAccountImpl, QObject *parent);
|
|
friend class Wallet;
|
|
mutable QReadWriteLock m_lock;
|
|
Monero::SubaddressAccount * m_subaddressAccountImpl;
|
|
mutable QList<Monero::SubaddressAccountRow*> m_rows;
|
|
};
|
|
|
|
#endif // SUBADDRESSACCOUNT_H
|