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

#include <coldstakingwidget.h>

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

Public Slots

void walletSynced (bool sync)
 

Public Member Functions

 ColdStakingWidget (PIVXGUI *parent)
 
 ~ColdStakingWidget ()
 
void loadWalletModel () override
 
void run (int type) override
 
void onError (QString error, int type) override
 
void showEvent (QShowEvent *event) override
 
- Public Member Functions inherited from PWidget
 PWidget (PIVXGUI *_window=nullptr, QWidget *parent=nullptr)
 
 PWidget (PWidget *parent=nullptr)
 
void setClientModel (ClientModel *model)
 
void setWalletModel (WalletModel *model)
 
PIVXGUIgetWindow ()
 
void run (int type) override
 
void onError (QString error, int type) override
 
void inform (const QString &message)
 
void emitMessage (const QString &title, const QString &message, unsigned int style, bool *ret=nullptr)
 
QString translate (const char *msg) override
 

Private Slots

void changeTheme (bool isLightTheme, QString &theme) override
 
void handleAddressClicked (const QModelIndex &index)
 
void handleMyColdAddressClicked (const QModelIndex &rIndex)
 
void onCoinControlClicked ()
 
void onColdStakeClicked ()
 
void updateDisplayUnit ()
 
void showList (bool show)
 
void onSendClicked ()
 
void onDelegateSelected (bool delegate)
 
void onEditClicked ()
 
void onDeleteClicked ()
 
void onCopyClicked ()
 
void onCopyOwnerClicked ()
 
void onAddressCopyClicked ()
 
void onAddressEditClicked ()
 
void onTxArrived (const QString &hash, const bool isCoinStake, const bool isMNReward, const bool isCSAnyType)
 
void onContactsClicked (bool ownerAdd)
 
void clearAll ()
 
void onLabelClicked ()
 
void onMyStakingAddressesClicked ()
 
void onOwnerAddressChanged ()
 
void onDelegationsRefreshed ()
 
void onSortChanged (int idx)
 
void onSortOrderChanged (int idx)
 
void filterChanged (const QString &str)
 

Private Member Functions

void showAddressGenerationDialog (bool isPaymentRequest)
 
void onContactsClicked ()
 
void tryRefreshDelegations ()
 
bool refreshDelegations ()
 
void onLabelClicked (QString dialogTitle, const QModelIndex &index, const bool isMyColdStakingAddresses)
 
void updateStakingTotalLabel ()
 
void sortAddresses ()
 
void setCoinControlPayAmounts ()
 

Private Attributes

Ui::ColdStakingWidget * ui = nullptr
 
FurAbstractListItemDelegatedelegate = nullptr
 
FurAbstractListItemDelegateaddressDelegate = nullptr
 
TransactionTableModeltxModel = nullptr
 
AddressHolderaddressHolder = nullptr
 
AddressTableModeladdressTableModel = nullptr
 
AddressFilterProxyModeladdressesFilter = nullptr
 
ColdStakingModelcsModel = nullptr
 
CSDelegationHoldertxHolder = nullptr
 
CoinControlDialogcoinControlDialog = nullptr
 
QAction * btnOwnerContact = nullptr
 
QSpacerItem * spacerDiv = nullptr
 
bool isInDelegation = true
 
bool isStakingAddressListVisible = false
 
ContactsDropdownmenuContacts = nullptr
 
TooltipMenumenu = nullptr
 
TooltipMenumenuAddresses = nullptr
 
SendMultiRowsendMultiRow = nullptr
 
bool isShowingDialog = false
 
bool isChainSync = false
 
bool isContactOwnerSelected {false}
 
int64_t lastRefreshTime {0}
 
std::atomic< bool > isLoading
 
QModelIndex index
 
QModelIndex addressIndex
 
AddressTableModel::ColumnIndex sortType = AddressTableModel::Label
 
Qt::SortOrder sortOrder = Qt::AscendingOrder
 
int nDisplayUnit {0}
 

Additional Inherited Members

- Signals inherited from PWidget
void message (const QString &title, const QString &body, unsigned int style, bool *ret=nullptr)
 
void showHide (bool show)
 
bool execDialog (QDialog *dialog, int xDiv=3, int yDiv=5)
 
- Protected Slots inherited from PWidget
virtual void changeTheme (bool isLightTheme, QString &theme)
 
void onChangeTheme (bool isLightTheme, QString &theme)
 
- Protected Member Functions inherited from PWidget
virtual void loadClientModel ()
 
void showHideOp (bool show)
 
bool execute (int type, std::unique_ptr< WalletModel::UnlockContext > pctx=nullptr)
 
void warn (const QString &title, const QString &message)
 
bool ask (const QString &title, const QString &message)
 
void showDialog (QDialog *dialog, int xDiv=3, int yDiv=5)
 
- Protected Attributes inherited from PWidget
PIVXGUIwindow = nullptr
 
ClientModelclientModel = nullptr
 
WalletModelwalletModel = nullptr
 

Detailed Description

Definition at line 39 of file coldstakingwidget.h.

Constructor & Destructor Documentation

◆ ColdStakingWidget()

ColdStakingWidget::ColdStakingWidget ( PIVXGUI parent)
explicit

Definition at line 75 of file coldstakingwidget.cpp.

Here is the call graph for this function:

◆ ~ColdStakingWidget()

ColdStakingWidget::~ColdStakingWidget ( )

Definition at line 836 of file coldstakingwidget.cpp.

Member Function Documentation

◆ changeTheme

void ColdStakingWidget::changeTheme ( bool  isLightTheme,
QString &  theme 
)
overrideprivateslot

Definition at line 797 of file coldstakingwidget.cpp.

Here is the call graph for this function:

◆ clearAll

void ColdStakingWidget::clearAll ( )
privateslot

Definition at line 531 of file coldstakingwidget.cpp.

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

◆ filterChanged

void ColdStakingWidget::filterChanged ( const QString &  str)
privateslot

Definition at line 824 of file coldstakingwidget.cpp.

Here is the caller graph for this function:

◆ handleAddressClicked

void ColdStakingWidget::handleAddressClicked ( const QModelIndex &  index)
privateslot

Definition at line 623 of file coldstakingwidget.cpp.

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

◆ handleMyColdAddressClicked

void ColdStakingWidget::handleMyColdAddressClicked ( const QModelIndex &  rIndex)
privateslot

Definition at line 593 of file coldstakingwidget.cpp.

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

◆ loadWalletModel()

void ColdStakingWidget::loadWalletModel ( )
overridevirtual

Reimplemented from PWidget.

Definition at line 210 of file coldstakingwidget.cpp.

Here is the call graph for this function:

◆ onAddressCopyClicked

void ColdStakingWidget::onAddressCopyClicked ( )
privateslot

Definition at line 675 of file coldstakingwidget.cpp.

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

◆ onAddressEditClicked

void ColdStakingWidget::onAddressEditClicked ( )
privateslot

Definition at line 681 of file coldstakingwidget.cpp.

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

◆ onCoinControlClicked

void ColdStakingWidget::onCoinControlClicked ( )
privateslot

Definition at line 541 of file coldstakingwidget.cpp.

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

◆ onColdStakeClicked

void ColdStakingWidget::onColdStakeClicked ( )
privateslot

Definition at line 563 of file coldstakingwidget.cpp.

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

◆ onContactsClicked() [1/2]

void ColdStakingWidget::onContactsClicked ( )
private

Definition at line 308 of file coldstakingwidget.cpp.

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

◆ onContactsClicked [2/2]

void ColdStakingWidget::onContactsClicked ( bool  ownerAdd)
privateslot

Definition at line 302 of file coldstakingwidget.cpp.

Here is the call graph for this function:

◆ onCopyClicked

void ColdStakingWidget::onCopyClicked ( )
privateslot

Definition at line 720 of file coldstakingwidget.cpp.

◆ onCopyOwnerClicked

void ColdStakingWidget::onCopyOwnerClicked ( )
privateslot

Definition at line 725 of file coldstakingwidget.cpp.

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

◆ onDelegateSelected

void ColdStakingWidget::onDelegateSelected ( bool  delegate)
privateslot

Definition at line 375 of file coldstakingwidget.cpp.

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

◆ onDelegationsRefreshed

void ColdStakingWidget::onDelegationsRefreshed ( )
privateslot

Definition at line 275 of file coldstakingwidget.cpp.

Here is the call graph for this function:

◆ onDeleteClicked

void ColdStakingWidget::onDeleteClicked ( )
privateslot

Definition at line 705 of file coldstakingwidget.cpp.

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

◆ onEditClicked

void ColdStakingWidget::onEditClicked ( )
privateslot

Definition at line 690 of file coldstakingwidget.cpp.

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

◆ onError()

void ColdStakingWidget::onError ( QString  error,
int  type 
)
overridevirtual

Implements Runnable.

Definition at line 296 of file coldstakingwidget.cpp.

Here is the call graph for this function:

◆ onLabelClicked [1/2]

void ColdStakingWidget::onLabelClicked ( )
privateslot

Definition at line 732 of file coldstakingwidget.cpp.

Here is the caller graph for this function:

◆ onLabelClicked() [2/2]

void ColdStakingWidget::onLabelClicked ( QString  dialogTitle,
const QModelIndex &  index,
const bool  isMyColdStakingAddresses 
)
private

Definition at line 741 of file coldstakingwidget.cpp.

Here is the call graph for this function:

◆ onMyStakingAddressesClicked

void ColdStakingWidget::onMyStakingAddressesClicked ( )
privateslot

Definition at line 773 of file coldstakingwidget.cpp.

Here is the caller graph for this function:

◆ onOwnerAddressChanged

void ColdStakingWidget::onOwnerAddressChanged ( )
privateslot

Definition at line 789 of file coldstakingwidget.cpp.

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

◆ onSendClicked

void ColdStakingWidget::onSendClicked ( )
privateslot

Definition at line 424 of file coldstakingwidget.cpp.

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

◆ onSortChanged

void ColdStakingWidget::onSortChanged ( int  idx)
privateslot

Definition at line 812 of file coldstakingwidget.cpp.

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

◆ onSortOrderChanged

void ColdStakingWidget::onSortOrderChanged ( int  idx)
privateslot

Definition at line 818 of file coldstakingwidget.cpp.

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

◆ onTxArrived

void ColdStakingWidget::onTxArrived ( const QString &  hash,
const bool  isCoinStake,
const bool  isMNReward,
const bool  isCSAnyType 
)
privateslot

Definition at line 237 of file coldstakingwidget.cpp.

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

◆ refreshDelegations()

bool ColdStakingWidget::refreshDelegations ( )
private

Definition at line 268 of file coldstakingwidget.cpp.

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

◆ run()

void ColdStakingWidget::run ( int  type)
overridevirtual

Implements Runnable.

Definition at line 289 of file coldstakingwidget.cpp.

Here is the call graph for this function:

◆ setCoinControlPayAmounts()

void ColdStakingWidget::setCoinControlPayAmounts ( )
private

Definition at line 556 of file coldstakingwidget.cpp.

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

◆ showAddressGenerationDialog()

void ColdStakingWidget::showAddressGenerationDialog ( bool  isPaymentRequest)
private

Definition at line 568 of file coldstakingwidget.cpp.

Here is the caller graph for this function:

◆ showEvent()

void ColdStakingWidget::showEvent ( QShowEvent *  event)
override

Definition at line 252 of file coldstakingwidget.cpp.

Here is the call graph for this function:

◆ showList

void ColdStakingWidget::showList ( bool  show)
privateslot

Definition at line 417 of file coldstakingwidget.cpp.

Here is the caller graph for this function:

◆ sortAddresses()

void ColdStakingWidget::sortAddresses ( )
private

Definition at line 829 of file coldstakingwidget.cpp.

Here is the caller graph for this function:

◆ tryRefreshDelegations()

void ColdStakingWidget::tryRefreshDelegations ( )
private

Definition at line 257 of file coldstakingwidget.cpp.

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

◆ updateDisplayUnit

void ColdStakingWidget::updateDisplayUnit ( )
privateslot

Definition at line 411 of file coldstakingwidget.cpp.

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

◆ updateStakingTotalLabel()

void ColdStakingWidget::updateStakingTotalLabel ( )
private

Definition at line 804 of file coldstakingwidget.cpp.

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

◆ walletSynced

void ColdStakingWidget::walletSynced ( bool  sync)
slot

Definition at line 244 of file coldstakingwidget.cpp.

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

Member Data Documentation

◆ addressDelegate

FurAbstractListItemDelegate* ColdStakingWidget::addressDelegate = nullptr
private

Definition at line 86 of file coldstakingwidget.h.

◆ addressesFilter

AddressFilterProxyModel* ColdStakingWidget::addressesFilter = nullptr
private

Definition at line 90 of file coldstakingwidget.h.

◆ addressHolder

AddressHolder* ColdStakingWidget::addressHolder = nullptr
private

Definition at line 88 of file coldstakingwidget.h.

◆ addressIndex

QModelIndex ColdStakingWidget::addressIndex
private

Definition at line 113 of file coldstakingwidget.h.

◆ addressTableModel

AddressTableModel* ColdStakingWidget::addressTableModel = nullptr
private

Definition at line 89 of file coldstakingwidget.h.

◆ btnOwnerContact

QAction* ColdStakingWidget::btnOwnerContact = nullptr
private

Definition at line 94 of file coldstakingwidget.h.

◆ coinControlDialog

CoinControlDialog* ColdStakingWidget::coinControlDialog = nullptr
private

Definition at line 93 of file coldstakingwidget.h.

◆ csModel

ColdStakingModel* ColdStakingWidget::csModel = nullptr
private

Definition at line 91 of file coldstakingwidget.h.

◆ delegate

FurAbstractListItemDelegate* ColdStakingWidget::delegate = nullptr
private

Definition at line 85 of file coldstakingwidget.h.

◆ index

QModelIndex ColdStakingWidget::index
private

Definition at line 112 of file coldstakingwidget.h.

◆ isChainSync

bool ColdStakingWidget::isChainSync = false
private

Definition at line 105 of file coldstakingwidget.h.

◆ isContactOwnerSelected

bool ColdStakingWidget::isContactOwnerSelected {false}
private

Definition at line 107 of file coldstakingwidget.h.

◆ isInDelegation

bool ColdStakingWidget::isInDelegation = true
private

Definition at line 97 of file coldstakingwidget.h.

◆ isLoading

std::atomic<bool> ColdStakingWidget::isLoading
private

Definition at line 109 of file coldstakingwidget.h.

◆ isShowingDialog

bool ColdStakingWidget::isShowingDialog = false
private

Definition at line 104 of file coldstakingwidget.h.

◆ isStakingAddressListVisible

bool ColdStakingWidget::isStakingAddressListVisible = false
private

Definition at line 98 of file coldstakingwidget.h.

◆ lastRefreshTime

int64_t ColdStakingWidget::lastRefreshTime {0}
private

Definition at line 108 of file coldstakingwidget.h.

◆ menu

TooltipMenu* ColdStakingWidget::menu = nullptr
private

Definition at line 101 of file coldstakingwidget.h.

◆ menuAddresses

TooltipMenu* ColdStakingWidget::menuAddresses = nullptr
private

Definition at line 102 of file coldstakingwidget.h.

◆ menuContacts

ContactsDropdown* ColdStakingWidget::menuContacts = nullptr
private

Definition at line 100 of file coldstakingwidget.h.

◆ nDisplayUnit

int ColdStakingWidget::nDisplayUnit {0}
private

Definition at line 119 of file coldstakingwidget.h.

◆ sendMultiRow

SendMultiRow* ColdStakingWidget::sendMultiRow = nullptr
private

Definition at line 103 of file coldstakingwidget.h.

◆ sortOrder

Qt::SortOrder ColdStakingWidget::sortOrder = Qt::AscendingOrder
private

Definition at line 117 of file coldstakingwidget.h.

◆ sortType

AddressTableModel::ColumnIndex ColdStakingWidget::sortType = AddressTableModel::Label
private

Definition at line 116 of file coldstakingwidget.h.

◆ spacerDiv

QSpacerItem* ColdStakingWidget::spacerDiv = nullptr
private

Definition at line 95 of file coldstakingwidget.h.

◆ txHolder

CSDelegationHolder* ColdStakingWidget::txHolder = nullptr
private

Definition at line 92 of file coldstakingwidget.h.

◆ txModel

TransactionTableModel* ColdStakingWidget::txModel = nullptr
private

Definition at line 87 of file coldstakingwidget.h.

◆ ui

Ui::ColdStakingWidget* ColdStakingWidget::ui = nullptr
private

Definition at line 84 of file coldstakingwidget.h.


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