Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

Model for list of recently generated payment requests / dash: URIs. More...

#include <recentrequeststablemodel.h>

+ Inheritance diagram for RecentRequestsTableModel:
+ Collaboration diagram for RecentRequestsTableModel:

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 RecentRequestEntryentry (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 ()
 Updates the column title to "Amount (DisplayUnit)" and emits headerDataChanged() signal for table headers to react. More...
 
QString getAmountTitle ()
 Gets title for amount column including current display unit if optionsModel reference available. More...
 

Private Attributes

WalletModelwalletModel
 
QStringList columns
 
QList< RecentRequestEntrylist
 
int64_t nReceiveRequestsMaxId
 

Detailed Description

Model for list of recently generated payment requests / dash: URIs.

Part of wallet model.

Definition at line 58 of file recentrequeststablemodel.h.

Member Enumeration Documentation

◆ ColumnIndex

Enumerator
Date 
Label 
Message 
Amount 
NUMBER_OF_COLUMNS 

Definition at line 66 of file recentrequeststablemodel.h.

Constructor & Destructor Documentation

◆ RecentRequestsTableModel()

RecentRequestsTableModel::RecentRequestsTableModel ( CWallet wallet,
WalletModel parent 
)
explicit

◆ ~RecentRequestsTableModel()

RecentRequestsTableModel::~RecentRequestsTableModel ( )

Definition at line 33 of file recentrequeststablemodel.cpp.

Member Function Documentation

◆ addNewRequest() [1/3]

◆ addNewRequest() [2/3]

void RecentRequestsTableModel::addNewRequest ( const std::string &  recipient)

◆ addNewRequest() [3/3]

void RecentRequestsTableModel::addNewRequest ( RecentRequestEntry recipient)

Definition at line 200 of file recentrequeststablemodel.cpp.

References list.

◆ columnCount()

int RecentRequestsTableModel::columnCount ( const QModelIndex &  parent) const

Definition at line 45 of file recentrequeststablemodel.cpp.

References columns.

◆ data()

◆ entry()

const RecentRequestEntry& RecentRequestsTableModel::entry ( int  row) const
inline

◆ flags()

Qt::ItemFlags RecentRequestsTableModel::flags ( const QModelIndex &  index) const

Definition at line 159 of file recentrequeststablemodel.cpp.

◆ getAmountTitle()

QString RecentRequestsTableModel::getAmountTitle ( )
private

Gets title for amount column including current display unit if optionsModel reference available.

Definition at line 124 of file recentrequeststablemodel.cpp.

References OptionsModel::getDisplayUnit(), WalletModel::getOptionsModel(), BitcoinUnits::name(), and walletModel.

Referenced by RecentRequestsTableModel(), and updateAmountColumnTitle().

◆ headerData()

QVariant RecentRequestsTableModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role 
) const

Definition at line 104 of file recentrequeststablemodel.cpp.

References columns.

◆ index()

QModelIndex RecentRequestsTableModel::index ( int  row,
int  column,
const QModelIndex &  parent 
) const

Definition at line 129 of file recentrequeststablemodel.cpp.

Referenced by data(), and sort().

◆ removeRows()

bool RecentRequestsTableModel::removeRows ( int  row,
int  count,
const QModelIndex &  parent = QModelIndex() 
)

◆ rowCount()

int RecentRequestsTableModel::rowCount ( const QModelIndex &  parent) const

Definition at line 38 of file recentrequeststablemodel.cpp.

References list.

◆ setData()

bool RecentRequestsTableModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role 
)

Definition at line 99 of file recentrequeststablemodel.cpp.

◆ sort

void RecentRequestsTableModel::sort ( int  column,
Qt::SortOrder  order = Qt::AscendingOrder 
)
slot

Definition at line 207 of file recentrequeststablemodel.cpp.

References index(), list, and NUMBER_OF_COLUMNS.

Referenced by ReceiveCoinsDialog::setModel().

◆ updateAmountColumnTitle()

void RecentRequestsTableModel::updateAmountColumnTitle ( )
private

Updates the column title to "Amount (DisplayUnit)" and emits headerDataChanged() signal for table headers to react.

Definition at line 117 of file recentrequeststablemodel.cpp.

References Amount, columns, and getAmountTitle().

Referenced by updateDisplayUnit().

◆ updateDisplayUnit

void RecentRequestsTableModel::updateDisplayUnit ( )
slot

Definition at line 213 of file recentrequeststablemodel.cpp.

References updateAmountColumnTitle().

Referenced by RecentRequestsTableModel().

Member Data Documentation

◆ columns

QStringList RecentRequestsTableModel::columns
private

◆ list

QList<RecentRequestEntry> RecentRequestsTableModel::list
private

Definition at line 98 of file recentrequeststablemodel.h.

Referenced by addNewRequest(), data(), entry(), removeRows(), rowCount(), and sort().

◆ nReceiveRequestsMaxId

int64_t RecentRequestsTableModel::nReceiveRequestsMaxId
private

Definition at line 99 of file recentrequeststablemodel.h.

Referenced by addNewRequest(), and RecentRequestsTableModel().

◆ walletModel

WalletModel* RecentRequestsTableModel::walletModel
private

The documentation for this class was generated from the following files:
Released under the MIT license