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

UI model for the transaction table of a wallet. More...

#include <tokentransactiontablemodel.h>

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

Public Types

enum  ColumnIndex {
  Status = 0, Date = 1, Type = 2, ToAddress = 3,
  Name = 4, Amount = 5
}
 
enum  RoleIndex {
  TypeRole = Qt::UserRole, DateRole, LongDescriptionRole, NameRole,
  AddressRole, LabelRole, AmountRole, TxHashRole,
  TxHexRole, TxPlainTextRole, ConfirmedRole, FormattedAmountRole,
  FormattedAmountWithUnitRole, StatusRole, RawDecorationRole
}
 Roles to get specific information from a transaction row. More...
 

Public Slots

void emitDataChanged (int index)
 
void updateTransaction (const QString &hash, int status, bool showTransaction)
 
void updateConfirmations ()
 
void setProcessingQueuedTransactions (bool value)
 

Public Member Functions

 TokenTransactionTableModel (const PlatformStyle *platformStyle, CWallet *wallet, WalletModel *parent=0)
 
 ~TokenTransactionTableModel ()
 
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
 
bool processingQueuedTransactions ()
 

Private Member Functions

void subscribeToCoreSignals ()
 
void unsubscribeFromCoreSignals ()
 
QString lookupAddress (const std::string &address, const std::string &label, bool tooltip) const
 
QVariant addressColor (const TokenTransactionRecord *wtx) const
 
QString formatTxStatus (const TokenTransactionRecord *wtx) const
 
QString formatTxDate (const TokenTransactionRecord *wtx) const
 
QString formatTxType (const TokenTransactionRecord *wtx) const
 
QString formatTxToAddress (const TokenTransactionRecord *wtx, bool tooltip) const
 
QString formatTxTokenSymbol (const TokenTransactionRecord *wtx) const
 
QString formatTxAmount (const TokenTransactionRecord *wtx, bool showUnconfirmed=true, FabcoinUnits::SeparatorStyle separators=FabcoinUnits::separatorStandard) const
 
QString formatTxAmountWithUnit (const TokenTransactionRecord *wtx, bool showUnconfirmed=true, FabcoinUnits::SeparatorStyle separators=FabcoinUnits::separatorStandard) const
 
QString formatTooltip (const TokenTransactionRecord *rec) const
 
QVariant txStatusDecoration (const TokenTransactionRecord *wtx) const
 
QVariant txAddressDecoration (const TokenTransactionRecord *wtx) const
 

Private Attributes

CWalletwallet
 
WalletModelwalletModel
 
QStringList columns
 
TokenTransactionTablePrivpriv
 
bool fProcessingQueuedTransactions
 
const PlatformStyleplatformStyle
 

Friends

class TokenTransactionTablePriv
 

Detailed Description

UI model for the transaction table of a wallet.

Definition at line 18 of file tokentransactiontablemodel.h.

Member Enumeration Documentation

Enumerator
Status 
Date 
Type 
ToAddress 
Name 
Amount 

Definition at line 26 of file tokentransactiontablemodel.h.

Roles to get specific information from a transaction row.

These are independent of column.

Enumerator
TypeRole 

Type of transaction.

DateRole 

Date and time this transaction was created.

LongDescriptionRole 

Long description (HTML format)

NameRole 

Name of the token.

AddressRole 

Address of transaction.

LabelRole 

Label of address related to transaction.

AmountRole 

Net amount of transaction.

TxHashRole 

Transaction hash.

TxHexRole 

Transaction data, hex-encoded.

TxPlainTextRole 

Whole transaction as plain text.

ConfirmedRole 

Is transaction confirmed?

FormattedAmountRole 

Formatted amount, without brackets when unconfirmed.

FormattedAmountWithUnitRole 

Formatted amount, with unit.

StatusRole 

Transaction status (TokenTransactionRecord::Status)

RawDecorationRole 

Unprocessed icon.

Definition at line 38 of file tokentransactiontablemodel.h.

Constructor & Destructor Documentation

TokenTransactionTableModel::TokenTransactionTableModel ( const PlatformStyle platformStyle,
CWallet wallet,
WalletModel parent = 0 
)
explicit

Definition at line 269 of file tokentransactiontablemodel.cpp.

Here is the call graph for this function:

TokenTransactionTableModel::~TokenTransactionTableModel ( )

Definition at line 283 of file tokentransactiontablemodel.cpp.

Here is the call graph for this function:

Member Function Documentation

QVariant TokenTransactionTableModel::addressColor ( const TokenTransactionRecord wtx) const
private

Definition at line 428 of file tokentransactiontablemodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 313 of file tokentransactiontablemodel.cpp.

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

Definition at line 499 of file tokentransactiontablemodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void TokenTransactionTableModel::emitDataChanged ( int  index)
slot

Definition at line 677 of file tokentransactiontablemodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QString TokenTransactionTableModel::formatTooltip ( const TokenTransactionRecord rec) const
private

Definition at line 488 of file tokentransactiontablemodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QString TokenTransactionTableModel::formatTxAmount ( const TokenTransactionRecord wtx,
bool  showUnconfirmed = true,
FabcoinUnits::SeparatorStyle  separators = FabcoinUnits::separatorStandard 
) const
private

Definition at line 448 of file tokentransactiontablemodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QString TokenTransactionTableModel::formatTxAmountWithUnit ( const TokenTransactionRecord wtx,
bool  showUnconfirmed = true,
FabcoinUnits::SeparatorStyle  separators = FabcoinUnits::separatorStandard 
) const
private

Definition at line 461 of file tokentransactiontablemodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QString TokenTransactionTableModel::formatTxDate ( const TokenTransactionRecord wtx) const
private

Definition at line 342 of file tokentransactiontablemodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QString TokenTransactionTableModel::formatTxStatus ( const TokenTransactionRecord wtx) const
private

Definition at line 319 of file tokentransactiontablemodel.cpp.

Here is the caller graph for this function:

QString TokenTransactionTableModel::formatTxToAddress ( const TokenTransactionRecord wtx,
bool  tooltip 
) const
private

Definition at line 406 of file tokentransactiontablemodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QString TokenTransactionTableModel::formatTxTokenSymbol ( const TokenTransactionRecord wtx) const
private

Definition at line 423 of file tokentransactiontablemodel.cpp.

Here is the caller graph for this function:

QString TokenTransactionTableModel::formatTxType ( const TokenTransactionRecord wtx) const
private

Definition at line 373 of file tokentransactiontablemodel.cpp.

Here is the caller graph for this function:

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

Definition at line 633 of file tokentransactiontablemodel.cpp.

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

Definition at line 666 of file tokentransactiontablemodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QString TokenTransactionTableModel::lookupAddress ( const std::string &  address,
const std::string &  label,
bool  tooltip 
) const
private

Definition at line 354 of file tokentransactiontablemodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool TokenTransactionTableModel::processingQueuedTransactions ( )
inline

Definition at line 76 of file tokentransactiontablemodel.h.

Here is the caller graph for this function:

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

Definition at line 307 of file tokentransactiontablemodel.cpp.

Here is the call graph for this function:

void TokenTransactionTableModel::setProcessingQueuedTransactions ( bool  value)
inlineslot

Definition at line 109 of file tokentransactiontablemodel.h.

void TokenTransactionTableModel::subscribeToCoreSignals ( )
private

Definition at line 750 of file tokentransactiontablemodel.cpp.

Here is the caller graph for this function:

QVariant TokenTransactionTableModel::txAddressDecoration ( const TokenTransactionRecord wtx) const
private

Definition at line 391 of file tokentransactiontablemodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QVariant TokenTransactionTableModel::txStatusDecoration ( const TokenTransactionRecord wtx) const
private

Definition at line 468 of file tokentransactiontablemodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void TokenTransactionTableModel::unsubscribeFromCoreSignals ( )
private

Definition at line 757 of file tokentransactiontablemodel.cpp.

Here is the caller graph for this function:

void TokenTransactionTableModel::updateConfirmations ( )
slot

Definition at line 297 of file tokentransactiontablemodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void TokenTransactionTableModel::updateTransaction ( const QString &  hash,
int  status,
bool  showTransaction 
)
slot

Definition at line 289 of file tokentransactiontablemodel.cpp.

Here is the call graph for this function:

Friends And Related Function Documentation

friend class TokenTransactionTablePriv
friend

Definition at line 111 of file tokentransactiontablemodel.h.

Member Data Documentation

QStringList TokenTransactionTableModel::columns
private

Definition at line 81 of file tokentransactiontablemodel.h.

bool TokenTransactionTableModel::fProcessingQueuedTransactions
private

Definition at line 83 of file tokentransactiontablemodel.h.

const PlatformStyle* TokenTransactionTableModel::platformStyle
private

Definition at line 84 of file tokentransactiontablemodel.h.

TokenTransactionTablePriv* TokenTransactionTableModel::priv
private

Definition at line 82 of file tokentransactiontablemodel.h.

CWallet* TokenTransactionTableModel::wallet
private

Definition at line 79 of file tokentransactiontablemodel.h.

WalletModel* TokenTransactionTableModel::walletModel
private

Definition at line 80 of file tokentransactiontablemodel.h.


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