You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.1 KiB
40 lines
1.1 KiB
// SPDX-License-Identifier: BSD-3-Clause
|
|
// Copyright (c) 2014-2021, The Monero Project.
|
|
|
|
#ifndef SUBADDRESSACCOUNTMODEL_H
|
|
#define SUBADDRESSACCOUNTMODEL_H
|
|
|
|
#include <QAbstractListModel>
|
|
|
|
class SubaddressAccount;
|
|
|
|
class SubaddressAccountModel : public QAbstractListModel
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
enum SubaddressAccountRowRole {
|
|
SubaddressAccountRole = Qt::UserRole + 1, // for the SubaddressAccountRow object;
|
|
SubaddressAccountAddressRole,
|
|
SubaddressAccountLabelRole,
|
|
SubaddressAccountBalanceRole,
|
|
SubaddressAccountUnlockedBalanceRole,
|
|
};
|
|
Q_ENUM(SubaddressAccountRowRole)
|
|
|
|
SubaddressAccountModel(QObject *parent, SubaddressAccount *subaddressAccount);
|
|
|
|
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
|
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
|
QHash<int, QByteArray> roleNames() const override;
|
|
|
|
public slots:
|
|
void startReset();
|
|
void endReset();
|
|
|
|
private:
|
|
SubaddressAccount *m_subaddressAccount;
|
|
};
|
|
|
|
#endif // SUBADDRESSACCOUNTMODEL_H
|