mirror of
https://git.wownero.com/wowlet/wowlet.git
synced 2024-08-15 01:03:14 +00:00
133700160a
Co-Authored-By: tobtoht <thotbot@protonmail.com>
54 lines
1.2 KiB
C++
54 lines
1.2 KiB
C++
// SPDX-License-Identifier: BSD-3-Clause
|
|
// Copyright (c) 2020, The Monero Project.
|
|
|
|
#ifndef FEATHER_COINSMODEL_H
|
|
#define FEATHER_COINSMODEL_H
|
|
|
|
#include <wallet/api/wallet2_api.h>
|
|
|
|
#include <QAbstractTableModel>
|
|
#include <QSortFilterProxyModel>
|
|
#include <QDebug>
|
|
|
|
class Coins;
|
|
class CoinsInfo;
|
|
|
|
class CoinsModel : public QAbstractTableModel
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
enum ModelColumn
|
|
{
|
|
PubKey = 0,
|
|
OutputPoint,
|
|
Address,
|
|
AddressLabel,
|
|
BlockHeight,
|
|
SpentHeight,
|
|
Amount,
|
|
Spent,
|
|
Frozen,
|
|
COUNT
|
|
};
|
|
|
|
explicit CoinsModel(QObject *parent, Coins *coins);
|
|
|
|
Coins * coins() const;
|
|
|
|
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
|
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
|
|
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
|
QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
|
|
|
|
public slots:
|
|
void startReset();
|
|
void endReset();
|
|
|
|
private:
|
|
QVariant parseTransactionInfo(const CoinsInfo &cInfo, int column, int role) const;
|
|
|
|
Coins *m_coins;
|
|
};
|
|
|
|
#endif //FEATHER_COINSMODEL_H
|