Raven Core  3.0.0
P2P Digital Currency
Public Types | Public Member Functions | Private Attributes | Friends | List of all members
AssetTableModel Class Reference

Models assets portion of wallet as table of owned assets. More...

#include <assettablemodel.h>

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

Public Types

enum  ColumnIndex { Name = 0, Quantity = 1 }
 
enum  RoleIndex { AmountRole = 100, AssetNameRole = 101, FormattedAmountRole = 102, AdministratorRole = 103 }
 Roles to get specific information from a transaction row. More...
 

Public Member Functions

 AssetTableModel (WalletModel *parent=0)
 
 ~AssetTableModel ()
 
int rowCount (const QModelIndex &parent) const
 
int columnCount (const QModelIndex &parent) const
 
QVariant data (const QModelIndex &index, int role) const
 
QVariant headerData (int section, Qt::Orientation orientation, int role) const
 
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const
 
QString formatTooltip (const AssetRecord *rec) const
 
QString formatAssetName (const AssetRecord *wtx) const
 
QString formatAssetQuantity (const AssetRecord *wtx) const
 
void checkBalanceChanged ()
 

Private Attributes

WalletModelwalletModel
 
QStringList columns
 
AssetTablePrivpriv
 

Friends

class AssetTablePriv
 

Detailed Description

Models assets portion of wallet as table of owned assets.

Definition at line 22 of file assettablemodel.h.

Member Enumeration Documentation

◆ ColumnIndex

Enumerator
Name 
Quantity 

Definition at line 30 of file assettablemodel.h.

◆ RoleIndex

Roles to get specific information from a transaction row.

These are independent of column.

Enumerator
AmountRole 

Net amount of transaction.

AssetNameRole 

RVN or name of an asset.

FormattedAmountRole 

Formatted amount, without brackets when unconfirmed.

AdministratorRole 

AdministratorRole.

Definition at line 38 of file assettablemodel.h.

Constructor & Destructor Documentation

◆ AssetTableModel()

AssetTableModel::AssetTableModel ( WalletModel parent = 0)
explicit

Definition at line 104 of file assettablemodel.cpp.

Here is the call graph for this function:

◆ ~AssetTableModel()

AssetTableModel::~AssetTableModel ( )

Definition at line 114 of file assettablemodel.cpp.

Member Function Documentation

◆ checkBalanceChanged()

void AssetTableModel::checkBalanceChanged ( )

Definition at line 119 of file assettablemodel.cpp.

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

◆ columnCount()

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

Definition at line 134 of file assettablemodel.cpp.

◆ data()

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

Definition at line 140 of file assettablemodel.cpp.

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

◆ formatAssetName()

QString AssetTableModel::formatAssetName ( const AssetRecord wtx) const

Definition at line 217 of file assettablemodel.cpp.

Here is the caller graph for this function:

◆ formatAssetQuantity()

QString AssetTableModel::formatAssetQuantity ( const AssetRecord wtx) const

Definition at line 222 of file assettablemodel.cpp.

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

◆ formatTooltip()

QString AssetTableModel::formatTooltip ( const AssetRecord rec) const

Definition at line 211 of file assettablemodel.cpp.

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

◆ headerData()

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

Definition at line 180 of file assettablemodel.cpp.

◆ index()

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

Definition at line 198 of file assettablemodel.cpp.

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

◆ rowCount()

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

Definition at line 128 of file assettablemodel.cpp.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ AssetTablePriv

friend class AssetTablePriv
friend

Definition at line 65 of file assettablemodel.h.

Member Data Documentation

◆ columns

QStringList AssetTableModel::columns
private

Definition at line 62 of file assettablemodel.h.

◆ priv

AssetTablePriv* AssetTableModel::priv
private

Definition at line 63 of file assettablemodel.h.

◆ walletModel

WalletModel* AssetTableModel::walletModel
private

Definition at line 61 of file assettablemodel.h.


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