Hush lite wallet
https://faq.hush.is/sdl
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.
52 lines
1.3 KiB
52 lines
1.3 KiB
// Copyright 2019-2023 The Hush developers
|
|
// Released under the GPLv3
|
|
#ifndef STRINGSTABLEMODEL_H
|
|
#define STRINGSTABLEMODEL_H
|
|
|
|
#include "precompiled.h"
|
|
|
|
struct TransactionItem;
|
|
|
|
class TxTableModel: public QAbstractTableModel
|
|
{
|
|
public:
|
|
TxTableModel(QObject* parent);
|
|
~TxTableModel();
|
|
|
|
enum Column
|
|
{
|
|
Type = 0,
|
|
Address = 1,
|
|
Time = 2,
|
|
Confirmations = 3,
|
|
Amount = 4
|
|
};
|
|
|
|
void replaceData (const QList<TransactionItem>& data);
|
|
|
|
QString getTxId(int row) const;
|
|
QString getMemo(int row) const;
|
|
QString getAddr(int row) const;
|
|
qint64 getDate(int row) const;
|
|
QString getType(int row) const;
|
|
qint64 getConfirmations(int row) const;
|
|
QString getAmt (int row) const;
|
|
|
|
bool exportToCsv(QString fileName) const;
|
|
|
|
int rowCount(const QModelIndex &parent) const;
|
|
int columnCount(const QModelIndex &parent) const;
|
|
QVariant data(const QModelIndex &index, int role) const;
|
|
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
|
|
QImage colorizeIcon(const QIcon icon, const QColor color) const;
|
|
|
|
private:
|
|
QString concatMultipleMemos(const TransactionItem&) const;
|
|
|
|
QList<TransactionItem>* modeldata = nullptr;
|
|
|
|
QList<QString> headers;
|
|
};
|
|
|
|
|
|
#endif // STRINGSTABLEMODEL_H
|
|
|