5 #if defined(HAVE_CONFIG_H) 10 #include <qt/forms/ui_sendcoinsentry.h> 19 #include <QApplication> 23 QStackedWidget(parent),
26 platformStyle(_platformStyle)
36 setCurrentWidget(
ui->SendCoins);
39 ui->payToLayout->setSpacing(4);
63 ui->payTo->setText(QApplication::clipboard()->text());
75 ui->payAmount->setFocus();
98 ui->addAsLabel->clear();
99 ui->payAmount->clear();
100 ui->checkboxSubtractFeeFromAmount->setCheckState(Qt::Unchecked);
101 ui->messageTextLabel->clear();
102 ui->messageTextLabel->hide();
103 ui->messageLabel->hide();
105 ui->payTo_is->clear();
106 ui->memoTextLabel_is->clear();
107 ui->payAmount_is->clear();
109 ui->payTo_s->clear();
110 ui->memoTextLabel_s->clear();
111 ui->payAmount_s->clear();
119 ui->checkboxSubtractFeeFromAmount->setChecked(
true);
142 ui->payTo->setValid(
false);
146 if (!
ui->payAmount->validate())
152 if (
ui->payAmount->value(
nullptr) <= 0)
154 ui->payAmount->setValid(
false);
160 ui->payAmount->setValid(
false);
180 QWidget::setTabOrder(prev,
ui->payTo);
181 QWidget::setTabOrder(
ui->payTo,
ui->addAsLabel);
182 QWidget *w =
ui->payAmount->setupTabChain(
ui->addAsLabel);
183 QWidget::setTabOrder(w,
ui->checkboxSubtractFeeFromAmount);
184 QWidget::setTabOrder(
ui->checkboxSubtractFeeFromAmount,
ui->addressBookButton);
185 QWidget::setTabOrder(
ui->addressBookButton,
ui->pasteButton);
186 QWidget::setTabOrder(
ui->pasteButton,
ui->deleteButton);
187 return ui->deleteButton;
199 ui->addAsLabel->clear();
209 ui->payTo->setText(address);
210 ui->payAmount->setFocus();
215 ui->payAmount->setValue(amount);
220 return ui->payTo->text().isEmpty() &&
ui->payTo_is->text().isEmpty() &&
ui->payTo_s->text().isEmpty();
225 ui->payTo->setFocus();
241 if (e->type() == QEvent::PaletteChange) {
249 QStackedWidget::changeEvent(e);
259 if(!associatedLabel.isEmpty())
261 ui->addAsLabel->setText(associatedLabel);
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)
void on_payTo_textChanged(const QString &address)
QFont fixedPitchFont(bool use_embedded_font)
Open address book to pick address.
AddressTableModel * getAddressTableModel()
A single entry in the dialog for sending bitcoins.
int getDisplayUnit() const
QWidget * setupTabChain(QWidget *prev)
Set up the tab chain manually, as Qt messes up the tab chain by default in some cases (issue https://...
int64_t CAmount
Amount in satoshis (Can be negative)
bool validate(interfaces::Node &node)
void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent)
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 displayUnitChanged(int unit)
void checkSubtractFeeFromAmount()
bool isClear()
Return whether the entry is still empty and unedited.
bool validateAddress(const QString &address)
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)
bool fSubtractFeeFromAmount
const PlatformStyle * platformStyle
void useAvailableBalanceClicked()
Top-level interface for a bitcoin node (bitcoind process).
OptionsModel * getOptionsModel()
const QString & getReturnValue() const
void changeEvent(QEvent *e) override