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

Model for list of recently generated payment requests / bitcoin: 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 / bitcoin: URIs.

Part of wallet model.

Definition at line 52 of file recentrequeststablemodel.h.

Member Enumeration Documentation

◆ ColumnIndex

Enumerator
Date 
Label 
Message 
Amount 
NUMBER_OF_COLUMNS 

Definition at line 60 of file recentrequeststablemodel.h.

Constructor & Destructor Documentation

◆ RecentRequestsTableModel()

RecentRequestsTableModel::RecentRequestsTableModel ( WalletModel parent)
explicit

Definition at line 25 of file recentrequeststablemodel.cpp.

Here is the call graph for this function:

◆ ~RecentRequestsTableModel()

RecentRequestsTableModel::~RecentRequestsTableModel ( )
default

Member Function Documentation

◆ addNewRequest() [1/3]

void RecentRequestsTableModel::addNewRequest ( const SendCoinsRecipient recipient)

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

Here is the call graph for this function:

◆ addNewRequest() [3/3]

void RecentRequestsTableModel::addNewRequest ( RecentRequestEntry recipient)

Definition at line 208 of file recentrequeststablemodel.cpp.

◆ columnCount()

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

Definition at line 49 of file recentrequeststablemodel.cpp.

◆ data()

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

Definition at line 57 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 81 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 167 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 129 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 109 of file recentrequeststablemodel.cpp.

◆ index()

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

Definition at line 138 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 145 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 41 of file recentrequeststablemodel.cpp.

◆ setData()

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

Definition at line 104 of file recentrequeststablemodel.cpp.

◆ sort()

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

Definition at line 215 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 122 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 221 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 91 of file recentrequeststablemodel.h.

◆ list

QList<RecentRequestEntry> RecentRequestsTableModel::list
private

Definition at line 92 of file recentrequeststablemodel.h.

◆ nReceiveRequestsMaxId

int64_t RecentRequestsTableModel::nReceiveRequestsMaxId {0}
private

Definition at line 93 of file recentrequeststablemodel.h.

◆ walletModel

WalletModel* RecentRequestsTableModel::walletModel
private

Definition at line 90 of file recentrequeststablemodel.h.


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