6 #include <qt/forms/ui_sendcoinsentry.h> 15 #include <QApplication> 21 platformStyle(_platformStyle)
30 ui->payToLayout->setSpacing(4);
49 ui->payTo->setText(QApplication::clipboard()->text());
61 ui->payAmount->setFocus();
84 ui->addAsLabel->clear();
85 ui->payAmount->clear();
89 ui->messageTextLabel->clear();
90 ui->messageTextLabel->hide();
91 ui->messageLabel->hide();
99 ui->checkboxSubtractFeeFromAmount->setChecked(
true);
122 ui->payTo->setValid(
false);
126 if (!
ui->payAmount->validate())
132 if (
ui->payAmount->value(
nullptr) <= 0)
134 ui->payAmount->setValid(
false);
140 ui->payAmount->setValid(
false);
160 QWidget::setTabOrder(prev,
ui->payTo);
161 QWidget::setTabOrder(
ui->payTo,
ui->addAsLabel);
162 QWidget *w =
ui->payAmount->setupTabChain(
ui->addAsLabel);
163 QWidget::setTabOrder(w,
ui->checkboxSubtractFeeFromAmount);
164 QWidget::setTabOrder(
ui->checkboxSubtractFeeFromAmount,
ui->addressBookButton);
165 QWidget::setTabOrder(
ui->addressBookButton,
ui->pasteButton);
166 QWidget::setTabOrder(
ui->pasteButton,
ui->deleteButton);
167 return ui->deleteButton;
179 ui->addAsLabel->clear();
189 ui->payTo->setText(address);
190 ui->payAmount->setFocus();
195 ui->payAmount->setValue(amount);
200 return ui->payTo->text().isEmpty();
205 ui->payTo->setFocus();
217 if (e->type() == QEvent::PaletteChange) {
223 QWidget::changeEvent(e);
233 if(!associatedLabel.isEmpty())
235 ui->addAsLabel->setText(associatedLabel);
OptionsModel * getOptionsModel() const
void setValue(const SendCoinsRecipient &value)
SendCoinsRecipient getValue()
void setModel(AddressTableModel *model)
bool isDust(interfaces::Node &node, const QString &address, const CAmount &amount)
void setAddress(const QString &address)
bool updateLabel(const QString &address)
BitcoinUnit getDisplayUnit() const
void on_payTo_textChanged(const QString &address)
bool validateAddress(const QString &address) const
Open address book to pick address.
A single entry in the dialog for sending bitcoins.
QWidget * setupTabChain(QWidget *prev)
Set up the tab chain manually, as Qt messes up the tab chain by default in some cases (issue https://...
bool getSubFeeFromAmount() const
int64_t CAmount
Amount in satoshis (Can be negative)
bool validate(interfaces::Node &node)
void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent)
void displayUnitChanged(BitcoinUnit unit)
QString labelForAddress(const QString &address) const
Look up label for address in address book, if not found return empty string.
Widget that shows a list of sending or receiving addresses.
void removeEntry(SendCoinsEntry *entry)
void checkSubtractFeeFromAmount()
bool isClear()
Return whether the entry is still empty and unedited.
void subtractFeeFromAmountChanged()
void on_pasteButton_clicked()
Interface to Bitcoin wallet from Qt view code.
SendCoinsEntry(const PlatformStyle *platformStyle, QWidget *parent=nullptr)
SendCoinsRecipient recipient
void setAmount(const CAmount &amount)
void on_addressBookButton_clicked()
void setModel(WalletModel *model)
void useAvailableBalance(SendCoinsEntry *entry)
AddressTableModel * getAddressTableModel() const
bool fSubtractFeeFromAmount
const PlatformStyle * platformStyle
void useAvailableBalanceClicked()
Top-level interface for a bitcoin node (bitcoind process).
const QString & getReturnValue() const
void changeEvent(QEvent *e) override