5 #ifndef BITCOIN_QT_RECENTREQUESTSTABLEMODEL_H 6 #define BITCOIN_QT_RECENTREQUESTSTABLEMODEL_H 10 #include <QAbstractTableModel> 12 #include <QStringList> 29 template <
typename Stream,
typename Operation>
31 unsigned int nDate = date.toTime_t();
38 if (ser_action.ForRead()) date = QDateTime::fromTime_t(nDate);
45 : column(nColumn), order(fOrder) {}
75 int rowCount(
const QModelIndex &parent)
const override;
76 int columnCount(
const QModelIndex &parent)
const override;
77 QVariant data(
const QModelIndex &index,
int role)
const override;
78 bool setData(
const QModelIndex &index,
const QVariant &value,
80 QVariant headerData(
int section, Qt::Orientation orientation,
81 int role)
const override;
82 QModelIndex index(
int row,
int column,
83 const QModelIndex &parent = QModelIndex())
const override;
84 bool removeRows(
int row,
int count,
85 const QModelIndex &parent = QModelIndex())
override;
86 Qt::ItemFlags
flags(
const QModelIndex &index)
const override;
91 void addNewRequest(
const std::string &recipient);
95 void sort(
int column, Qt::SortOrder order = Qt::AscendingOrder)
override;
96 void updateDisplayUnit();
101 QList<RecentRequestEntry>
list;
102 int64_t nReceiveRequestsMaxId{0};
106 void updateAmountColumnTitle();
109 QString getAmountTitle();
112 #endif // BITCOIN_QT_RECENTREQUESTSTABLEMODEL_H Model for list of recently generated payment requests / bitcoincash: URIs.
void SerializationOp(Stream &s, Operation ser_action)
RecentRequestEntryLessThan(int nColumn, Qt::SortOrder fOrder)
QList< RecentRequestEntry > list
static const int CURRENT_VERSION
SendCoinsRecipient recipient
const RecentRequestEntry & entry(int row) const
WalletModel * walletModel
Interface to Bitcoin wallet from Qt view code.