Changeset View
Changeset View
Standalone View
Standalone View
src/qt/recentrequeststablemodel.h
Show First 20 Lines • Show All 65 Lines • ▼ Show 20 Lines | enum ColumnIndex { | ||||
Label = 1, | Label = 1, | ||||
Message = 2, | Message = 2, | ||||
Amount = 3, | Amount = 3, | ||||
NUMBER_OF_COLUMNS | NUMBER_OF_COLUMNS | ||||
}; | }; | ||||
/** @name Methods overridden from QAbstractTableModel | /** @name Methods overridden from QAbstractTableModel | ||||
@{*/ | @{*/ | ||||
int rowCount(const QModelIndex &parent) const; | int rowCount(const QModelIndex &parent) const override; | ||||
int columnCount(const QModelIndex &parent) const; | int columnCount(const QModelIndex &parent) const override; | ||||
QVariant data(const QModelIndex &index, int role) const; | QVariant data(const QModelIndex &index, int role) const override; | ||||
bool setData(const QModelIndex &index, const QVariant &value, int role); | bool setData(const QModelIndex &index, const QVariant &value, | ||||
int role) override; | |||||
QVariant headerData(int section, Qt::Orientation orientation, | QVariant headerData(int section, Qt::Orientation orientation, | ||||
int role) const; | int role) const override; | ||||
QModelIndex index(int row, int column, const QModelIndex &parent) const; | QModelIndex index(int row, int column, | ||||
const QModelIndex &parent) const override; | |||||
bool removeRows(int row, int count, | bool removeRows(int row, int count, | ||||
const QModelIndex &parent = QModelIndex()); | const QModelIndex &parent = QModelIndex()) override; | ||||
Qt::ItemFlags flags(const QModelIndex &index) const; | Qt::ItemFlags flags(const QModelIndex &index) const override; | ||||
/*@}*/ | /*@}*/ | ||||
const RecentRequestEntry &entry(int row) const { return list[row]; } | const RecentRequestEntry &entry(int row) const { return list[row]; } | ||||
void addNewRequest(const SendCoinsRecipient &recipient); | void addNewRequest(const SendCoinsRecipient &recipient); | ||||
void addNewRequest(const std::string &recipient); | void addNewRequest(const std::string &recipient); | ||||
void addNewRequest(RecentRequestEntry &recipient); | void addNewRequest(RecentRequestEntry &recipient); | ||||
public Q_SLOTS: | public Q_SLOTS: | ||||
void sort(int column, Qt::SortOrder order = Qt::AscendingOrder); | void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) override; | ||||
void updateDisplayUnit(); | void updateDisplayUnit(); | ||||
private: | private: | ||||
WalletModel *walletModel; | WalletModel *walletModel; | ||||
QStringList columns; | QStringList columns; | ||||
QList<RecentRequestEntry> list; | QList<RecentRequestEntry> list; | ||||
int64_t nReceiveRequestsMaxId; | int64_t nReceiveRequestsMaxId; | ||||
Show All 9 Lines |