PIVX Core  5.6.99
P2P Digital Currency
Public Types | Public Slots | Public Member Functions | Private Member Functions | Private Attributes | List of all members
ColdStakingModel Class Reference

#include <coldstakingmodel.h>

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

Public Types

enum  ColumnIndex {
  OWNER_ADDRESS = 0 , OWNER_ADDRESS_LABEL = 1 , STAKING_ADDRESS = 2 , STAKING_ADDRESS_LABEL = 3 ,
  IS_WHITELISTED = 4 , IS_WHITELISTED_STRING = 5 , DELEGATED_UTXO_IDS = 6 , TOTAL_STACKEABLE_AMOUNT_STR = 7 ,
  TOTAL_STACKEABLE_AMOUNT = 8 , IS_RECEIVED_DELEGATION = 9 , COLUMN_COUNT = 10
}
 

Public Slots

void emitDataSetChanged ()
 

Public Member Functions

 ColdStakingModel (WalletModel *model, TransactionTableModel *_tableModel, AddressTableModel *_addressTableModel, QObject *parent=nullptr)
 
 ~ColdStakingModel () override
 
int rowCount (const QModelIndex &parent=QModelIndex()) const override
 
int columnCount (const QModelIndex &parent=QModelIndex()) const override
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const override
 
bool whitelist (const QModelIndex &modelIndex)
 
bool blacklist (const QModelIndex &index)
 
void removeRowAndEmitDataChanged (const int idx)
 
void updateCSList ()
 
CAmount getTotalAmount () const
 
void refresh ()
 

Private Member Functions

bool parseCSDelegation (const CTxOut &out, CSDelegation &ret, const QString &txId, const int utxoIndex)
 

Private Attributes

WalletModelmodel = nullptr
 
TransactionTableModeltableModel = nullptr
 
AddressTableModeladdressTableModel = nullptr
 
QList< CSDelegationcachedDelegations
 List with all of the grouped delegations received by this wallet. More...
 
CAmount cachedAmount
 

Detailed Description

Definition at line 37 of file coldstakingmodel.h.

Member Enumeration Documentation

◆ ColumnIndex

Enumerator
OWNER_ADDRESS 
OWNER_ADDRESS_LABEL 
STAKING_ADDRESS 
STAKING_ADDRESS_LABEL 
IS_WHITELISTED 
IS_WHITELISTED_STRING 
DELEGATED_UTXO_IDS 
TOTAL_STACKEABLE_AMOUNT_STR 
TOTAL_STACKEABLE_AMOUNT 
IS_RECEIVED_DELEGATION 
COLUMN_COUNT 

Definition at line 50 of file coldstakingmodel.h.

Constructor & Destructor Documentation

◆ ColdStakingModel()

ColdStakingModel::ColdStakingModel ( WalletModel model,
TransactionTableModel _tableModel,
AddressTableModel _addressTableModel,
QObject *  parent = nullptr 
)
explicit

Definition at line 12 of file coldstakingmodel.cpp.

◆ ~ColdStakingModel()

ColdStakingModel::~ColdStakingModel ( )
inlineoverride

Definition at line 43 of file coldstakingmodel.h.

Member Function Documentation

◆ blacklist()

bool ColdStakingModel::blacklist ( const QModelIndex &  index)

Definition at line 164 of file coldstakingmodel.cpp.

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

◆ columnCount()

int ColdStakingModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const
override

Definition at line 107 of file coldstakingmodel.cpp.

◆ data()

QVariant ColdStakingModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
override

Definition at line 114 of file coldstakingmodel.cpp.

Here is the call graph for this function:

◆ emitDataSetChanged

void ColdStakingModel::emitDataSetChanged ( )
slot

Definition at line 24 of file coldstakingmodel.cpp.

◆ getTotalAmount()

CAmount ColdStakingModel::getTotalAmount ( ) const
inline

Definition at line 71 of file coldstakingmodel.h.

Here is the caller graph for this function:

◆ parseCSDelegation()

bool ColdStakingModel::parseCSDelegation ( const CTxOut out,
CSDelegation ret,
const QString &  txId,
const int  utxoIndex 
)
private

Definition at line 75 of file coldstakingmodel.cpp.

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

◆ refresh()

void ColdStakingModel::refresh ( )

Definition at line 29 of file coldstakingmodel.cpp.

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

◆ removeRowAndEmitDataChanged()

void ColdStakingModel::removeRowAndEmitDataChanged ( const int  idx)

Definition at line 181 of file coldstakingmodel.cpp.

Here is the caller graph for this function:

◆ rowCount()

int ColdStakingModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
override

Definition at line 101 of file coldstakingmodel.cpp.

Here is the caller graph for this function:

◆ updateCSList()

void ColdStakingModel::updateCSList ( )

Definition at line 18 of file coldstakingmodel.cpp.

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

◆ whitelist()

bool ColdStakingModel::whitelist ( const QModelIndex &  modelIndex)

Definition at line 147 of file coldstakingmodel.cpp.

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

Member Data Documentation

◆ addressTableModel

AddressTableModel* ColdStakingModel::addressTableModel = nullptr
private

Definition at line 81 of file coldstakingmodel.h.

◆ cachedAmount

CAmount ColdStakingModel::cachedAmount
private

Definition at line 87 of file coldstakingmodel.h.

◆ cachedDelegations

QList<CSDelegation> ColdStakingModel::cachedDelegations
private

List with all of the grouped delegations received by this wallet.

Definition at line 86 of file coldstakingmodel.h.

◆ model

WalletModel* ColdStakingModel::model = nullptr
private

Definition at line 79 of file coldstakingmodel.h.

◆ tableModel

TransactionTableModel* ColdStakingModel::tableModel = nullptr
private

Definition at line 80 of file coldstakingmodel.h.


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