2 #include "ui_sendcoinsentry.h"
11 #include <QApplication>
22 ui->payToLayout->setSpacing(4);
24 #if QT_VERSION >= 0x040700
26 ui->addAsLabel->setPlaceholderText(tr(
"Enter a label for this address to add it to your address book"));
27 ui->payTo->setPlaceholderText(tr(
"Enter a Feathercoin address (e.g. 6nqmPL9tX4Uz3uQhbz8GrgLfXQNQEXstVu)"));
29 setFocusPolicy(Qt::TabFocus);
30 setFocusProxy(
ui->payTo);
43 ui->payTo->setText(QApplication::clipboard()->text());
55 ui->payAmount->setFocus();
65 if(!associatedLabel.isEmpty())
66 ui->addAsLabel->setText(associatedLabel);
83 ui->deleteButton->setEnabled(enabled);
89 ui->addAsLabel->clear();
90 ui->payAmount->clear();
91 ui->payTo->setFocus();
106 if(!
ui->payAmount->validate())
112 if(
ui->payAmount->value() <= 0)
115 ui->payAmount->setValid(
false);
120 if(!
ui->payTo->hasAcceptableInput() ||
123 ui->payTo->setValid(
false);
135 rv.
label =
ui->addAsLabel->text();
143 QWidget::setTabOrder(prev,
ui->payTo);
144 QWidget::setTabOrder(
ui->payTo,
ui->addressBookButton);
145 QWidget::setTabOrder(
ui->addressBookButton,
ui->pasteButton);
146 QWidget::setTabOrder(
ui->pasteButton,
ui->deleteButton);
147 QWidget::setTabOrder(
ui->deleteButton,
ui->addAsLabel);
148 return ui->payAmount->setupTabChain(
ui->addAsLabel);
154 ui->addAsLabel->setText(value.
label);
155 ui->payAmount->setValue(value.
amount);
161 if (address.size() > 34) {
165 int x = address.indexOf(
":", 0, Qt::CaseInsensitive);
167 _address = address.mid(x+1, 34);
169 ui->payTo->setText(_address);
172 ui->payTo->setText(address);
174 ui->payAmount->setFocus();
179 return ui->payTo->text().isEmpty();
184 ui->payTo->setFocus();
void setValue(const SendCoinsRecipient &value)
SendCoinsRecipient getValue()
void setModel(AddressTableModel *model)
const QString & getReturnValue() const
void setAddress(const QString &address)
void on_payTo_textChanged(const QString &address)
AddressTableModel * getAddressTableModel()
void setupAddressWidget(QLineEdit *widget, QWidget *parent)
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://...
Open address book to pick address for sending.
void on_deleteButton_clicked()
Widget that shows a list of sending or receiving addresses.
void removeEntry(SendCoinsEntry *entry)
void setRemoveEnabled(bool enabled)
bool isClear()
Return whether the entry is still empty and unedited.
bool validateAddress(const QString &address)
void on_pasteButton_clicked()
QString labelForAddress(const QString &address) const
Interface to Bitcoin wallet from Qt view code.
void on_addressBookButton_clicked()
void setModel(WalletModel *model)
SendCoinsEntry(QWidget *parent=0)
OptionsModel * getOptionsModel()