Fabcoin Core  0.16.2
P2P Digital Currency
Public Types | Public Slots | Public Member Functions | Private Member Functions | Private Attributes | List of all members
RecentRequestsTableModel Class Reference

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

Part of wallet model.

Definition at line 58 of file recentrequeststablemodel.h.

Member Enumeration Documentation

Enumerator
Date 
Label 
Message 
Amount 
NUMBER_OF_COLUMNS 

Definition at line 66 of file recentrequeststablemodel.h.

Constructor & Destructor Documentation

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

Definition at line 15 of file recentrequeststablemodel.cpp.

Here is the call graph for this function:

RecentRequestsTableModel::~RecentRequestsTableModel ( )

Definition at line 33 of file recentrequeststablemodel.cpp.

Member Function Documentation

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:

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

Definition at line 182 of file recentrequeststablemodel.cpp.

Here is the call graph for this function:

void RecentRequestsTableModel::addNewRequest ( RecentRequestEntry recipient)

Definition at line 200 of file recentrequeststablemodel.cpp.

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

Definition at line 45 of file recentrequeststablemodel.cpp.

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

Definition at line 52 of file recentrequeststablemodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 86 of file recentrequeststablemodel.h.

Here is the caller graph for this function:

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

Definition at line 159 of file recentrequeststablemodel.cpp.

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.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 104 of file recentrequeststablemodel.cpp.

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

Definition at line 129 of file recentrequeststablemodel.cpp.

Here is the caller graph for this function:

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

Definition at line 136 of file recentrequeststablemodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 38 of file recentrequeststablemodel.cpp.

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

Definition at line 99 of file recentrequeststablemodel.cpp.

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

Definition at line 207 of file recentrequeststablemodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Here is the call graph for this function:

Here is the caller graph for this function:

void RecentRequestsTableModel::updateDisplayUnit ( )
slot

Definition at line 213 of file recentrequeststablemodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

QStringList RecentRequestsTableModel::columns
private

Definition at line 97 of file recentrequeststablemodel.h.

QList<RecentRequestEntry> RecentRequestsTableModel::list
private

Definition at line 98 of file recentrequeststablemodel.h.

int64_t RecentRequestsTableModel::nReceiveRequestsMaxId
private

Definition at line 99 of file recentrequeststablemodel.h.

WalletModel* RecentRequestsTableModel::walletModel
private

Definition at line 96 of file recentrequeststablemodel.h.


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