5#ifndef BITCOIN_QT_RECENTREQUESTSTABLEMODEL_H
6#define BITCOIN_QT_RECENTREQUESTSTABLEMODEL_H
10#include <QAbstractTableModel>
28 unsigned int date_timet;
29 SER_WRITE(obj, date_timet = obj.date.toTime_t());
30 READWRITE(obj.nVersion, obj.id, date_timet, obj.recipient);
31 SER_READ(obj, obj.date = QDateTime::fromTime_t(date_timet));
68 int rowCount(
const QModelIndex &parent)
const override;
69 int columnCount(
const QModelIndex &parent)
const override;
70 QVariant
data(
const QModelIndex &
index,
int role)
const override;
71 bool setData(
const QModelIndex &
index,
const QVariant &value,
73 QVariant
headerData(
int section, Qt::Orientation orientation,
74 int role)
const override;
75 QModelIndex
index(
int row,
int column,
76 const QModelIndex &parent = QModelIndex())
const override;
78 const QModelIndex &parent = QModelIndex())
override;
79 Qt::ItemFlags
flags(
const QModelIndex &
index)
const override;
80 void sort(
int column, Qt::SortOrder order = Qt::AscendingOrder)
override;
94 QList<RecentRequestEntry>
list;
static const int CURRENT_VERSION
SERIALIZE_METHODS(RecentRequestEntry, obj)
SendCoinsRecipient recipient
bool operator()(const RecentRequestEntry &left, const RecentRequestEntry &right) const
RecentRequestEntryLessThan(int nColumn, Qt::SortOrder fOrder)
Model for list of recently generated payment requests / bitcoincash: URIs.
bool removeRows(int row, int count, const QModelIndex &parent=QModelIndex()) override
QVariant headerData(int section, Qt::Orientation orientation, int role) const override
bool setData(const QModelIndex &index, const QVariant &value, int role) override
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const override
QVariant data(const QModelIndex &index, int role) const override
const RecentRequestEntry & entry(int row) const
~RecentRequestsTableModel()
void sort(int column, Qt::SortOrder order=Qt::AscendingOrder) override
QList< RecentRequestEntry > list
int rowCount(const QModelIndex &parent) const override
void updateAmountColumnTitle()
Updates the column title to "Amount (DisplayUnit)" and emits headerDataChanged() signal for table hea...
QString getAmountTitle()
Gets title for amount column including current display unit if optionsModel reference available.
WalletModel * walletModel
Qt::ItemFlags flags(const QModelIndex &index) const override
void addNewRequest(const SendCoinsRecipient &recipient)
RecentRequestsTableModel(WalletModel *parent)
int64_t nReceiveRequestsMaxId
int columnCount(const QModelIndex &parent) const override
Interface to Bitcoin wallet from Qt view code.
#define SER_WRITE(obj, code)
#define SER_READ(obj, code)