5 #ifndef PIVX_QT_COLDSTAKINGMODEL_H
6 #define PIVX_QT_COLDSTAKINGMODEL_H
8 #include <QAbstractTableModel>
19 CSDelegation(
const std::string& _stakingAddress,
const std::string& _ownerAddress) :
64 int rowCount(
const QModelIndex &parent = QModelIndex())
const override;
65 int columnCount(
const QModelIndex &parent = QModelIndex())
const override;
66 QVariant
data(
const QModelIndex &index,
int role = Qt::DisplayRole)
const override;
67 bool whitelist(
const QModelIndex& modelIndex);
int64_t CAmount
Amount in PIV (Can be negative)
Qt model of the address book in the core.
bool operator==(const CSDelegation &obj)
CSDelegation(const std::string &_stakingAddress, const std::string &_ownerAddress)
std::string stakingAddress
QMap< QString, int > delegatedUtxo
Map of txId --> index num for stakeable utxo delegations.
CAmount cachedTotalAmount
An output of a transaction.
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
int rowCount(const QModelIndex &parent=QModelIndex()) const override
CAmount getTotalAmount() const
QList< CSDelegation > cachedDelegations
List with all of the grouped delegations received by this wallet.
bool whitelist(const QModelIndex &modelIndex)
void removeRowAndEmitDataChanged(const int idx)
bool blacklist(const QModelIndex &index)
TransactionTableModel * tableModel
void emitDataSetChanged()
bool parseCSDelegation(const CTxOut &out, CSDelegation &ret, const QString &txId, const int utxoIndex)
ColdStakingModel(WalletModel *model, TransactionTableModel *_tableModel, AddressTableModel *_addressTableModel, QObject *parent=nullptr)
@ TOTAL_STACKEABLE_AMOUNT_STR
@ TOTAL_STACKEABLE_AMOUNT
int columnCount(const QModelIndex &parent=QModelIndex()) const override
~ColdStakingModel() override
AddressTableModel * addressTableModel
UI model for the transaction table of a wallet.
Interface to PIVX wallet from Qt view code.