Bitcoin
|
#include <recentrequeststablemodel.h>
Public Types | |
enum | ColumnIndex { Date = 0, Label = 1, Message = 2, Amount = 3, NUMBER_OF_COLUMNS } |
Public Slots | |
void | sort (int column, Qt::SortOrder order=Qt::AscendingOrder) |
void | updateDisplayUnit () |
Public Member Functions | |
RecentRequestsTableModel (WalletModel *parent) | |
~RecentRequestsTableModel () | |
const RecentRequestEntry & | entry (int row) const |
void | addNewRequest (const SendCoinsRecipient &recipient) |
void | addNewRequest (const std::string &recipient) |
void | addNewRequest (RecentRequestEntry &recipient) |
Methods overridden from QAbstractTableModel | |
int | rowCount (const QModelIndex &parent) const |
int | columnCount (const QModelIndex &parent) const |
QVariant | data (const QModelIndex &index, int role) const |
bool | setData (const QModelIndex &index, const QVariant &value, int role) |
QVariant | headerData (int section, Qt::Orientation orientation, int role) const |
QModelIndex | index (int row, int column, const QModelIndex &parent) const |
bool | removeRows (int row, int count, const QModelIndex &parent=QModelIndex()) |
Qt::ItemFlags | flags (const QModelIndex &index) const |
Private Member Functions | |
void | updateAmountColumnTitle () |
QString | getAmountTitle () |
Private Attributes | |
WalletModel * | walletModel |
QStringList | columns |
QList< RecentRequestEntry > | list |
int64_t | nReceiveRequestsMaxId {0} |
Model for list of recently generated payment requests / bitcoin: URIs. Part of wallet model.
|
explicit |
RecentRequestsTableModel::~RecentRequestsTableModel | ( | ) |
void RecentRequestsTableModel::addNewRequest | ( | const SendCoinsRecipient & | recipient | ) |
void RecentRequestsTableModel::addNewRequest | ( | const std::string & | recipient | ) |
void RecentRequestsTableModel::addNewRequest | ( | RecentRequestEntry & | recipient | ) |
int RecentRequestsTableModel::columnCount | ( | const QModelIndex & | parent | ) | const |
QVariant RecentRequestsTableModel::data | ( | const QModelIndex & | index, |
int | role | ||
) | const |
|
inline |
Qt::ItemFlags RecentRequestsTableModel::flags | ( | const QModelIndex & | index | ) | const |
|
private |
Gets title for amount column including current display unit if optionsModel reference available.
QVariant RecentRequestsTableModel::headerData | ( | int | section, |
Qt::Orientation | orientation, | ||
int | role | ||
) | const |
QModelIndex RecentRequestsTableModel::index | ( | int | row, |
int | column, | ||
const QModelIndex & | parent | ||
) | const |
bool RecentRequestsTableModel::removeRows | ( | int | row, |
int | count, | ||
const QModelIndex & | parent = QModelIndex() |
||
) |
int RecentRequestsTableModel::rowCount | ( | const QModelIndex & | parent | ) | const |
bool RecentRequestsTableModel::setData | ( | const QModelIndex & | index, |
const QVariant & | value, | ||
int | role | ||
) |
|
slot |
|
private |
Updates the column title to "Amount (DisplayUnit)" and emits headerDataChanged() signal for table headers to react.
|
slot |
|
private |
|
private |
|
private |
|
private |