![]() |
Dash Core
0.12.2.1
P2P Digital Currency
|
#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 (CWallet *wallet, 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 |
Model for list of recently generated payment requests / dash: URIs. Part of wallet model.
Definition at line 59 of file recentrequeststablemodel.h.
Enumerator | |
---|---|
Date | |
Label | |
Message | |
Amount | |
NUMBER_OF_COLUMNS |
Definition at line 67 of file recentrequeststablemodel.h.
|
explicit |
Definition at line 16 of file recentrequeststablemodel.cpp.
RecentRequestsTableModel::~RecentRequestsTableModel | ( | ) |
Definition at line 34 of file recentrequeststablemodel.cpp.
void RecentRequestsTableModel::addNewRequest | ( | const SendCoinsRecipient & | recipient | ) |
Definition at line 172 of file recentrequeststablemodel.cpp.
Referenced by addNewRequest(), ReceiveCoinsDialog::on_receiveButton_clicked(), and RecentRequestsTableModel().
void RecentRequestsTableModel::addNewRequest | ( | const std::string & | recipient | ) |
Definition at line 189 of file recentrequeststablemodel.cpp.
void RecentRequestsTableModel::addNewRequest | ( | RecentRequestEntry & | recipient | ) |
Definition at line 207 of file recentrequeststablemodel.cpp.
int RecentRequestsTableModel::columnCount | ( | const QModelIndex & | parent | ) | const |
Definition at line 46 of file recentrequeststablemodel.cpp.
QVariant RecentRequestsTableModel::data | ( | const QModelIndex & | index, |
int | role | ||
) | const |
Definition at line 53 of file recentrequeststablemodel.cpp.
Referenced by addNewRequest(), and ReceiveCoinsDialog::copyColumnToClipboard().
|
inline |
Definition at line 87 of file recentrequeststablemodel.h.
Referenced by addNewRequest(), ReceiveCoinsDialog::copyURI(), and ReceiveCoinsDialog::on_recentRequestsView_doubleClicked().
Qt::ItemFlags RecentRequestsTableModel::flags | ( | const QModelIndex & | index | ) | const |
Definition at line 166 of file recentrequeststablemodel.cpp.
|
private |
Gets title for amount column including current display unit if optionsModel reference available.
Definition at line 126 of file recentrequeststablemodel.cpp.
Referenced by RecentRequestsTableModel(), and updateAmountColumnTitle().
QVariant RecentRequestsTableModel::headerData | ( | int | section, |
Qt::Orientation | orientation, | ||
int | role | ||
) | const |
Definition at line 106 of file recentrequeststablemodel.cpp.
QModelIndex RecentRequestsTableModel::index | ( | int | row, |
int | column, | ||
const QModelIndex & | parent | ||
) | const |
Definition at line 136 of file recentrequeststablemodel.cpp.
bool RecentRequestsTableModel::removeRows | ( | int | row, |
int | count, | ||
const QModelIndex & | parent = QModelIndex() |
||
) |
Definition at line 143 of file recentrequeststablemodel.cpp.
Referenced by ReceiveCoinsDialog::on_removeRequestButton_clicked().
int RecentRequestsTableModel::rowCount | ( | const QModelIndex & | parent | ) | const |
Definition at line 39 of file recentrequeststablemodel.cpp.
bool RecentRequestsTableModel::setData | ( | const QModelIndex & | index, |
const QVariant & | value, | ||
int | role | ||
) |
Definition at line 101 of file recentrequeststablemodel.cpp.
|
slot |
Definition at line 214 of file recentrequeststablemodel.cpp.
Referenced by ReceiveCoinsDialog::setModel().
|
private |
Updates the column title to "Amount (DisplayUnit)" and emits headerDataChanged() signal for table headers to react.
Definition at line 119 of file recentrequeststablemodel.cpp.
Referenced by updateDisplayUnit().
|
slot |
Definition at line 220 of file recentrequeststablemodel.cpp.
Referenced by RecentRequestsTableModel().
|
private |
Definition at line 98 of file recentrequeststablemodel.h.
Referenced by columnCount(), headerData(), RecentRequestsTableModel(), and updateAmountColumnTitle().
|
private |
Definition at line 99 of file recentrequeststablemodel.h.
Referenced by addNewRequest(), data(), entry(), removeRows(), rowCount(), and sort().
|
private |
Definition at line 100 of file recentrequeststablemodel.h.
Referenced by addNewRequest(), and RecentRequestsTableModel().
|
private |
Definition at line 97 of file recentrequeststablemodel.h.
Referenced by addNewRequest(), data(), getAmountTitle(), RecentRequestsTableModel(), and removeRows().