Bitcoin ABC  0.29.2
P2P Digital Currency
Public Types | Public Member Functions | List of all members
RecentRequestsTableModel Class Reference

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

#include <recentrequeststablemodel.h>

Inheritance diagram for RecentRequestsTableModel:
[legend]
Collaboration diagram for RecentRequestsTableModel:
[legend]

Public Types

enum  ColumnIndex {
  Date = 0 , Label = 1 , Message = 2 , Amount = 3 ,
  NUMBER_OF_COLUMNS
}
 

Public Member Functions

 RecentRequestsTableModel (WalletModel *parent)
 
 ~RecentRequestsTableModel ()
 

Methods overridden from QAbstractTableModel

WalletModelwalletModel
 
QStringList columns
 
QList< RecentRequestEntrylist
 
int64_t nReceiveRequestsMaxId {0}
 
int rowCount (const QModelIndex &parent) const override
 
int columnCount (const QModelIndex &parent) const override
 
QVariant data (const QModelIndex &index, int role) const override
 
bool setData (const QModelIndex &index, const QVariant &value, int role) override
 
QVariant headerData (int section, Qt::Orientation orientation, int role) const override
 
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const override
 
bool removeRows (int row, int count, const QModelIndex &parent=QModelIndex()) override
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 
void sort (int column, Qt::SortOrder order=Qt::AscendingOrder) override
 
const RecentRequestEntryentry (int row) const
 
void addNewRequest (const SendCoinsRecipient &recipient)
 
void addNewRequest (const std::string &recipient)
 
void addNewRequest (RecentRequestEntry &recipient)
 
void updateDisplayUnit ()
 
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...
 

Detailed Description

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

Part of wallet model.

Definition at line 51 of file recentrequeststablemodel.h.

Member Enumeration Documentation

◆ ColumnIndex

Enumerator
Date 
Label 
Message 
Amount 
NUMBER_OF_COLUMNS 

Definition at line 58 of file recentrequeststablemodel.h.

Constructor & Destructor Documentation

◆ RecentRequestsTableModel()

RecentRequestsTableModel::RecentRequestsTableModel ( WalletModel parent)
explicit

Definition at line 17 of file recentrequeststablemodel.cpp.

Here is the call graph for this function:

◆ ~RecentRequestsTableModel()

RecentRequestsTableModel::~RecentRequestsTableModel ( )

Definition at line 33 of file recentrequeststablemodel.cpp.

Member Function Documentation

◆ addNewRequest() [1/3]

void RecentRequestsTableModel::addNewRequest ( const SendCoinsRecipient recipient)

Definition at line 165 of file recentrequeststablemodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addNewRequest() [2/3]

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

Definition at line 184 of file recentrequeststablemodel.cpp.

Here is the call graph for this function:

◆ addNewRequest() [3/3]

void RecentRequestsTableModel::addNewRequest ( RecentRequestEntry recipient)

Definition at line 204 of file recentrequeststablemodel.cpp.

◆ columnCount()

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

Definition at line 43 of file recentrequeststablemodel.cpp.

◆ data()

QVariant RecentRequestsTableModel::data ( const QModelIndex &  index,
int  role 
) const
override

Definition at line 49 of file recentrequeststablemodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ entry()

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

Definition at line 83 of file recentrequeststablemodel.h.

Here is the caller graph for this function:

◆ flags()

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

Definition at line 160 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 121 of file recentrequeststablemodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ headerData()

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

Definition at line 101 of file recentrequeststablemodel.cpp.

◆ index()

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

Definition at line 131 of file recentrequeststablemodel.cpp.

Here is the caller graph for this function:

◆ removeRows()

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

Definition at line 138 of file recentrequeststablemodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rowCount()

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

Definition at line 37 of file recentrequeststablemodel.cpp.

◆ setData()

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

Definition at line 96 of file recentrequeststablemodel.cpp.

◆ sort()

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

Definition at line 210 of file recentrequeststablemodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateAmountColumnTitle()

void RecentRequestsTableModel::updateAmountColumnTitle ( )
private

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

Definition at line 114 of file recentrequeststablemodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateDisplayUnit

void RecentRequestsTableModel::updateDisplayUnit ( )
slot

Definition at line 218 of file recentrequeststablemodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ columns

QStringList RecentRequestsTableModel::columns
private

Definition at line 93 of file recentrequeststablemodel.h.

◆ list

QList<RecentRequestEntry> RecentRequestsTableModel::list
private

Definition at line 94 of file recentrequeststablemodel.h.

◆ nReceiveRequestsMaxId

int64_t RecentRequestsTableModel::nReceiveRequestsMaxId {0}
private

Definition at line 95 of file recentrequeststablemodel.h.

◆ walletModel

WalletModel* RecentRequestsTableModel::walletModel
private

Definition at line 92 of file recentrequeststablemodel.h.


The documentation for this class was generated from the following files: