5 #if defined(HAVE_CONFIG_H) 10 #include <qt/forms/ui_sendcoinsentry.h> 18 #include <QApplication> 22 QStackedWidget(parent),
25 platformStyle(_platformStyle)
35 setCurrentWidget(
ui->SendCoins);
38 ui->payToLayout->setSpacing(4);
39 ui->addAsLabel->setPlaceholderText(tr(
"Enter a label for this address to add it to your address book"));
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 if (
recipient.paymentRequest.IsInitialized())
148 ui->payTo->setValid(
false);
152 if (!
ui->payAmount->validate())
158 if (
ui->payAmount->value(0) <= 0)
160 ui->payAmount->setValid(
false);
166 ui->payAmount->setValid(
false);
177 if (
recipient.paymentRequest.IsInitialized())
193 QWidget::setTabOrder(prev,
ui->payTo);
194 QWidget::setTabOrder(
ui->payTo,
ui->addAsLabel);
195 QWidget *w =
ui->payAmount->setupTabChain(
ui->addAsLabel);
196 QWidget::setTabOrder(w,
ui->checkboxSubtractFeeFromAmount);
197 QWidget::setTabOrder(
ui->checkboxSubtractFeeFromAmount,
ui->addressBookButton);
198 QWidget::setTabOrder(
ui->addressBookButton,
ui->pasteButton);
199 QWidget::setTabOrder(
ui->pasteButton,
ui->deleteButton);
200 return ui->deleteButton;
208 if (
recipient.paymentRequest.IsInitialized())
215 ui->payAmount_is->setReadOnly(
true);
216 setCurrentWidget(
ui->SendCoins_UnauthenticatedPaymentRequest);
223 ui->payAmount_s->setReadOnly(
true);
224 setCurrentWidget(
ui->SendCoins_AuthenticatedPaymentRequest);
235 ui->addAsLabel->clear();
245 ui->payTo->setText(address);
246 ui->payAmount->setFocus();
251 ui->payAmount->setValue(amount);
256 return ui->payTo->text().isEmpty() &&
ui->payTo_is->text().isEmpty() &&
ui->payTo_s->text().isEmpty();
261 ui->payTo->setFocus();
282 if(!associatedLabel.isEmpty())
284 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)
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.
SendCoinsRecipient recipient
void setAmount(const CAmount &amount)
void on_addressBookButton_clicked()
void setModel(WalletModel *model)
void useAvailableBalance(SendCoinsEntry *entry)
SendCoinsEntry(const PlatformStyle *platformStyle, QWidget *parent=0)
bool fSubtractFeeFromAmount
const PlatformStyle * platformStyle
void useAvailableBalanceClicked()
QString authenticatedMerchant
Top-level interface for a bitcoin node (bsha3d process).
OptionsModel * getOptionsModel()
const QString & getReturnValue() const