6 #include "ui_sendcoinsentry.h"
15 #include <QApplication>
19 QStackedWidget(parent),
22 platformStyle(_platformStyle)
32 setCurrentWidget(
ui->SendCoins);
35 ui->payToLayout->setSpacing(4);
36 #if QT_VERSION >= 0x040700
37 ui->addAsLabel->setPlaceholderText(tr(
"Enter a label for this address to add it to your address book"));
48 connect(
ui->deleteButton, SIGNAL(clicked()),
this, SLOT(
deleteClicked()));
49 connect(
ui->deleteButton_is, SIGNAL(clicked()),
this, SLOT(
deleteClicked()));
50 connect(
ui->deleteButton_s, SIGNAL(clicked()),
this, SLOT(
deleteClicked()));
61 ui->payTo->setText(QApplication::clipboard()->text());
73 ui->payAmount->setFocus();
96 ui->addAsLabel->clear();
97 ui->payAmount->clear();
98 ui->checkboxSubtractFeeFromAmount->setCheckState(Qt::Unchecked);
99 ui->messageTextLabel->clear();
100 ui->messageTextLabel->hide();
101 ui->messageLabel->hide();
103 ui->payTo_is->clear();
104 ui->memoTextLabel_is->clear();
105 ui->payAmount_is->clear();
107 ui->payTo_s->clear();
108 ui->memoTextLabel_s->clear();
109 ui->payAmount_s->clear();
134 ui->payTo->setValid(
false);
138 if (!
ui->payAmount->validate())
144 if (
ui->payAmount->value(0) <= 0)
146 ui->payAmount->setValid(
false);
152 ui->payAmount->setValid(
false);
177 QWidget::setTabOrder(prev,
ui->payTo);
178 QWidget::setTabOrder(
ui->payTo,
ui->addAsLabel);
179 QWidget *w =
ui->payAmount->setupTabChain(
ui->addAsLabel);
180 QWidget::setTabOrder(w,
ui->checkboxSubtractFeeFromAmount);
181 QWidget::setTabOrder(
ui->checkboxSubtractFeeFromAmount,
ui->addressBookButton);
182 QWidget::setTabOrder(
ui->addressBookButton,
ui->pasteButton);
183 QWidget::setTabOrder(
ui->pasteButton,
ui->deleteButton);
184 return ui->deleteButton;
198 ui->payAmount_is->setReadOnly(
true);
199 setCurrentWidget(
ui->SendCoins_UnauthenticatedPaymentRequest);
206 ui->payAmount_s->setReadOnly(
true);
207 setCurrentWidget(
ui->SendCoins_AuthenticatedPaymentRequest);
217 ui->addAsLabel->clear();
227 ui->payTo->setText(address);
228 ui->payAmount->setFocus();
233 return ui->payTo->text().isEmpty() &&
ui->payTo_is->text().isEmpty() &&
ui->payTo_s->text().isEmpty();
238 ui->payTo->setFocus();
259 if(!associatedLabel.isEmpty())
261 ui->addAsLabel->setText(associatedLabel);
Widget that shows a list of sending or receiving addresses.
@ ForSelection
Open address book to pick address.
void setModel(AddressTableModel *model)
const QString & getReturnValue() const
QString labelForAddress(const QString &address) const
bool IsInitialized() const
A single entry in the dialog for sending bitcoins.
bool updateLabel(const QString &address)
void setAddress(const QString &address)
bool isClear()
Return whether the entry is still empty and unedited.
void subtractFeeFromAmountChanged()
SendCoinsRecipient recipient
void setValue(const SendCoinsRecipient &value)
SendCoinsEntry(const PlatformStyle *platformStyle, QWidget *parent=0)
void on_payTo_textChanged(const QString &address)
void on_pasteButton_clicked()
void setModel(WalletModel *model)
void removeEntry(SendCoinsEntry *entry)
QWidget * setupTabChain(QWidget *prev)
Set up the tab chain manually, as Qt messes up the tab chain by default in some cases (issue https://...
const PlatformStyle * platformStyle
void on_addressBookButton_clicked()
SendCoinsRecipient getValue()
PaymentRequestPlus paymentRequest
bool fSubtractFeeFromAmount
QString authenticatedMerchant
Interface to Bitcoin wallet from Qt view code.
bool validateAddress(const QString &address)
AddressTableModel * getAddressTableModel()
OptionsModel * getOptionsModel()
void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent)
bool isDust(const QString &address, const CAmount &amount)