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

#include <send.h>

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

Public Slots

void onChangeAddressClicked ()
 
void onChangeCustomFeeClicked ()
 
void onCoinControlClicked ()
 
void onOpenUriClicked ()
 
void onShieldCoinsClicked ()
 
void onValueChanged ()
 
void refreshAmounts ()
 
void changeTheme (bool isLightTheme, QString &theme) override
 
void updateAmounts (const QString &titleTotalRemaining, const QString &labelAmountSend, const QString &labelAmountRemaining, CAmount _delegationBalance)
 

Signals

void receivedURI (const QString &uri)
 Signal raised when a URI was entered or dragged to the GUI. More...
 
- 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)
 

Public Member Functions

 SendWidget (PIVXGUI *parent)
 
 ~SendWidget ()
 
void addEntry ()
 
void loadClientModel () override
 
void loadWalletModel () 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 inform (const QString &message)
 
void emitMessage (const QString &title, const QString &message, unsigned int style, bool *ret=nullptr)
 
QString translate (const char *msg) override
 

Protected Member Functions

void resizeEvent (QResizeEvent *event) override
 
void showEvent (QShowEvent *event) override
 
void run (int type) override
 
void onError (QString error, int type) override
 
- Protected Member Functions inherited from PWidget
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)
 

Private Slots

void onPIVSelected (bool _isTransparent)
 
void onSendClicked ()
 
void onContactsClicked (SendMultiRow *entry)
 
void onMenuClicked (SendMultiRow *entry)
 
void onAddEntryClicked ()
 
void clearEntries ()
 
void clearAll (bool fClearSettings=true)
 
void onCheckBoxChanged ()
 
void onContactMultiClicked ()
 
void onDeleteClicked ()
 
void onEntryMemoClicked ()
 
void onSubtractFeeFromAmountChecked ()
 
void onResetCustomOptions (bool fRefreshAmounts)
 
void onResetSettings ()
 

Private Member Functions

void resizeMenu ()
 
SendMultiRowcreateEntry ()
 
void ProcessSend (QList< SendCoinsRecipient > &recipients, bool hasShieldedOutput, const std::function< bool(QList< SendCoinsRecipient > &)> &func=nullptr)
 
OperationResult prepareShielded (WalletModelTransaction *tx, bool fromTransparent)
 
OperationResult prepareTransparent (WalletModelTransaction *tx)
 
bool sendFinalStep ()
 
void setFocusOnLastEntry ()
 
void showHideCheckBoxDelegations (CAmount delegationBalance)
 
void updateEntryLabels (const QList< SendCoinsRecipient > &recipients)
 
void setCustomFeeSelected (bool isSelected, const CAmount &customFee=DEFAULT_TRANSACTION_FEE)
 
void setCoinControlPayAmounts ()
 
void resetCoinControl ()
 
void resetChangeAddress ()
 
void hideContactsMenu ()
 
void tryRefreshAmounts ()
 

Private Attributes

Ui::send * ui
 
QPushButton * coinIcon
 
SendCustomFeeDialogcustomFeeDialog = nullptr
 
bool isCustomFeeSelected = false
 
bool fDelegationsChecked = false
 
int nDisplayUnit
 
QList< SendMultiRow * > entries
 
CoinControlDialogcoinControlDialog = nullptr
 
WalletModelTransactionptrModelTx {nullptr}
 
std::atomic< bool > isProcessing {false}
 
Optional< QString > processingResultError {nullopt}
 
std::atomic< bool > processingResult {false}
 
std::atomic< bool > isUpdatingBalance {false}
 
ContactsDropdownmenuContacts = nullptr
 
TooltipMenumenu = nullptr
 
SendMultiRowfocusedEntry = nullptr
 
bool isTransparent = true
 

Additional Inherited Members

- Protected Slots inherited from PWidget
virtual void changeTheme (bool isLightTheme, QString &theme)
 
void onChangeTheme (bool isLightTheme, QString &theme)
 
- Protected Attributes inherited from PWidget
PIVXGUIwindow = nullptr
 
ClientModelclientModel = nullptr
 
WalletModelwalletModel = nullptr
 

Detailed Description

Definition at line 34 of file send.h.

Constructor & Destructor Documentation

◆ SendWidget()

SendWidget::SendWidget ( PIVXGUI parent)
explicit

Definition at line 31 of file send.cpp.

Here is the call graph for this function:

◆ ~SendWidget()

SendWidget::~SendWidget ( )

Definition at line 1025 of file send.cpp.

Member Function Documentation

◆ addEntry()

void SendWidget::addEntry ( )

Definition at line 299 of file send.cpp.

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

◆ changeTheme

void SendWidget::changeTheme ( bool  isLightTheme,
QString &  theme 
)
overrideslot

Definition at line 1020 of file send.cpp.

◆ clearAll

void SendWidget::clearAll ( bool  fClearSettings = true)
privateslot

Definition at line 247 of file send.cpp.

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

◆ clearEntries

void SendWidget::clearEntries ( )
privateslot

Definition at line 288 of file send.cpp.

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

◆ createEntry()

SendMultiRow * SendWidget::createEntry ( )
private

Definition at line 320 of file send.cpp.

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

◆ hideContactsMenu()

void SendWidget::hideContactsMenu ( )
private

Definition at line 240 of file send.cpp.

Here is the caller graph for this function:

◆ loadClientModel()

void SendWidget::loadClientModel ( )
overridevirtual

Reimplemented from PWidget.

Definition at line 202 of file send.cpp.

Here is the call graph for this function:

◆ loadWalletModel()

void SendWidget::loadWalletModel ( )
overridevirtual
Todo:
: This only happen when the coin control features are modified in other screen, check before do this if the wallet has another screen modifying it.

Reimplemented from PWidget.

Definition at line 211 of file send.cpp.

Here is the call graph for this function:

◆ onAddEntryClicked

void SendWidget::onAddEntryClicked ( )
privateslot

Definition at line 332 of file send.cpp.

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

◆ onChangeAddressClicked

void SendWidget::onChangeAddressClicked ( )
slot

Definition at line 611 of file send.cpp.

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

◆ onChangeCustomFeeClicked

void SendWidget::onChangeCustomFeeClicked ( )
slot

Definition at line 688 of file send.cpp.

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

◆ onCheckBoxChanged

void SendWidget::onCheckBoxChanged ( )
privateslot

Definition at line 794 of file send.cpp.

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

◆ onCoinControlClicked

void SendWidget::onCoinControlClicked ( )
slot

Definition at line 700 of file send.cpp.

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

◆ onContactMultiClicked

void SendWidget::onContactMultiClicked ( )
privateslot

Definition at line 901 of file send.cpp.

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

◆ onContactsClicked

void SendWidget::onContactsClicked ( SendMultiRow entry)
privateslot

Definition at line 814 of file send.cpp.

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

◆ onDeleteClicked

void SendWidget::onDeleteClicked ( )
privateslot

Definition at line 965 of file send.cpp.

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

◆ onEntryMemoClicked

void SendWidget::onEntryMemoClicked ( )
privateslot

Definition at line 950 of file send.cpp.

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

◆ onError()

void SendWidget::onError ( QString  error,
int  type 
)
overrideprotectedvirtual

Reimplemented from PWidget.

Definition at line 576 of file send.cpp.

Here is the call graph for this function:

◆ onMenuClicked

void SendWidget::onMenuClicked ( SendMultiRow entry)
privateslot

Definition at line 870 of file send.cpp.

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

◆ onOpenUriClicked

void SendWidget::onOpenUriClicked ( )
slot

Definition at line 652 of file send.cpp.

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

◆ onPIVSelected

void SendWidget::onPIVSelected ( bool  _isTransparent)
privateslot

Definition at line 803 of file send.cpp.

Here is the call graph for this function:

◆ onResetCustomOptions

void SendWidget::onResetCustomOptions ( bool  fRefreshAmounts)
privateslot

Definition at line 263 of file send.cpp.

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

◆ onResetSettings

void SendWidget::onResetSettings ( )
privateslot

Definition at line 256 of file send.cpp.

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

◆ onSendClicked

void SendWidget::onSendClicked ( )
privateslot
Todo:
: Check UTXO splitter here..

Definition at line 378 of file send.cpp.

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

◆ onShieldCoinsClicked

void SendWidget::onShieldCoinsClicked ( )
slot
Todo:
future: Unify this code with the code in coincontroldialog into the model.

Definition at line 716 of file send.cpp.

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

◆ onSubtractFeeFromAmountChecked

void SendWidget::onSubtractFeeFromAmountChecked ( )
privateslot

Definition at line 958 of file send.cpp.

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

◆ onValueChanged

void SendWidget::onValueChanged ( )
slot

Definition at line 789 of file send.cpp.

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

◆ prepareShielded()

OperationResult SendWidget::prepareShielded ( WalletModelTransaction tx,
bool  fromTransparent 
)
private

Definition at line 475 of file send.cpp.

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

◆ prepareTransparent()

OperationResult SendWidget::prepareTransparent ( WalletModelTransaction tx)
private

Definition at line 483 of file send.cpp.

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

◆ ProcessSend()

void SendWidget::ProcessSend ( QList< SendCoinsRecipient > &  recipients,
bool  hasShieldedOutput,
const std::function< bool(QList< SendCoinsRecipient > &)> &  func = nullptr 
)
private
Todo:
: this can get wrapped on a cached struct.

Definition at line 420 of file send.cpp.

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

◆ receivedURI

void SendWidget::receivedURI ( const QString &  uri)
signal

Signal raised when a URI was entered or dragged to the GUI.

Here is the caller graph for this function:

◆ refreshAmounts

void SendWidget::refreshAmounts ( )
slot

Definition at line 140 of file send.cpp.

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

◆ resetChangeAddress()

void SendWidget::resetChangeAddress ( )
private

Definition at line 279 of file send.cpp.

Here is the caller graph for this function:

◆ resetCoinControl()

void SendWidget::resetCoinControl ( )
private

Definition at line 273 of file send.cpp.

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

◆ resizeEvent()

void SendWidget::resizeEvent ( QResizeEvent *  event)
overrideprotected

Definition at line 344 of file send.cpp.

Here is the call graph for this function:

◆ resizeMenu()

void SendWidget::resizeMenu ( )
private

Definition at line 997 of file send.cpp.

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

◆ run()

void SendWidget::run ( int  type)
overrideprotectedvirtual

Reimplemented from PWidget.

Definition at line 549 of file send.cpp.

Here is the call graph for this function:

◆ sendFinalStep()

bool SendWidget::sendFinalStep ( )
private

Definition at line 513 of file send.cpp.

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

◆ setCoinControlPayAmounts()

void SendWidget::setCoinControlPayAmounts ( )
private

Definition at line 778 of file send.cpp.

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

◆ setCustomFeeSelected()

void SendWidget::setCustomFeeSelected ( bool  isSelected,
const CAmount customFee = DEFAULT_TRANSACTION_FEE 
)
private

Definition at line 1010 of file send.cpp.

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

◆ setFocusOnLastEntry()

void SendWidget::setFocusOnLastEntry ( )
private

Definition at line 357 of file send.cpp.

Here is the caller graph for this function:

◆ showEvent()

void SendWidget::showEvent ( QShowEvent *  event)
overrideprotected

Definition at line 350 of file send.cpp.

Here is the call graph for this function:

◆ showHideCheckBoxDelegations()

void SendWidget::showHideCheckBoxDelegations ( CAmount  delegationBalance)
private

Definition at line 362 of file send.cpp.

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

◆ tryRefreshAmounts()

void SendWidget::tryRefreshAmounts ( )
private

Definition at line 582 of file send.cpp.

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

◆ updateAmounts

void SendWidget::updateAmounts ( const QString &  titleTotalRemaining,
const QString &  labelAmountSend,
const QString &  labelAmountRemaining,
CAmount  _delegationBalance 
)
slot

Definition at line 190 of file send.cpp.

Here is the call graph for this function:

◆ updateEntryLabels()

void SendWidget::updateEntryLabels ( const QList< SendCoinsRecipient > &  recipients)
private

Definition at line 589 of file send.cpp.

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

Member Data Documentation

◆ coinControlDialog

CoinControlDialog* SendWidget::coinControlDialog = nullptr
private

Definition at line 98 of file send.h.

◆ coinIcon

QPushButton* SendWidget::coinIcon
private

Definition at line 90 of file send.h.

◆ customFeeDialog

SendCustomFeeDialog* SendWidget::customFeeDialog = nullptr
private

Definition at line 92 of file send.h.

◆ entries

QList<SendMultiRow*> SendWidget::entries
private

Definition at line 97 of file send.h.

◆ fDelegationsChecked

bool SendWidget::fDelegationsChecked = false
private

Definition at line 94 of file send.h.

◆ focusedEntry

SendMultiRow* SendWidget::focusedEntry = nullptr
private

Definition at line 112 of file send.h.

◆ isCustomFeeSelected

bool SendWidget::isCustomFeeSelected = false
private

Definition at line 93 of file send.h.

◆ isProcessing

std::atomic<bool> SendWidget::isProcessing {false}
private

Definition at line 102 of file send.h.

◆ isTransparent

bool SendWidget::isTransparent = true
private

Definition at line 114 of file send.h.

◆ isUpdatingBalance

std::atomic<bool> SendWidget::isUpdatingBalance {false}
private

Definition at line 107 of file send.h.

◆ menu

TooltipMenu* SendWidget::menu = nullptr
private

Definition at line 110 of file send.h.

◆ menuContacts

ContactsDropdown* SendWidget::menuContacts = nullptr
private

Definition at line 109 of file send.h.

◆ nDisplayUnit

int SendWidget::nDisplayUnit
private

Definition at line 96 of file send.h.

◆ processingResult

std::atomic<bool> SendWidget::processingResult {false}
private

Definition at line 104 of file send.h.

◆ processingResultError

Optional<QString> SendWidget::processingResultError {nullopt}
private

Definition at line 103 of file send.h.

◆ ptrModelTx

WalletModelTransaction* SendWidget::ptrModelTx {nullptr}
private

Definition at line 101 of file send.h.

◆ ui

Ui::send* SendWidget::ui
private

Definition at line 89 of file send.h.


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