6#include <qt/forms/ui_editaddressdialog.h>
11#include <QDataWidgetMapper>
27 ui->addressEdit->setEnabled(
false);
35 mapper->setSubmitPolicy(QDataWidgetMapper::ManualSubmit);
39 &EditAddressDialog::reject);
100 tr(
"The entered address \"%1\" is not a "
101 "valid Bitcoin address.")
102 .
arg(
ui->addressEdit->text()),
103 QMessageBox::Ok, QMessageBox::Ok);
108 QMessageBox::Ok, QMessageBox::Ok);
112 tr(
"Could not unlock wallet."),
113 QMessageBox::Ok, QMessageBox::Ok);
117 tr(
"New key generation failed."),
118 QMessageBox::Ok, QMessageBox::Ok);
133 return tr(
"Address \"%1\" already exists as a receiving address with "
135 "\"%2\" and so cannot be added as a sending address.")
139 return tr(
"The entered address \"%1\" is already in the address book with "
151 ui->addressEdit->setText(_address);
Qt model of the address book in the core.
OutputType GetDefaultAddressType() const
EditStatus getEditStatus() const
@ WALLET_UNLOCK_FAILURE
Wallet could not be unlocked to create new receiving address.
@ NO_CHANGES
No changes were made during edit operation.
@ INVALID_ADDRESS
Unparseable address.
@ KEY_GENERATION_FAILURE
Generating a new public key for a receiving address failed.
@ DUPLICATE_ADDRESS
Address already in address book.
@ Address
Bitcoin address.
@ Label
User specified label.
static const QString Send
Specifies send address.
QString addRow(const QString &type, const QString &label, const QString &address, const OutputType address_type)
QString purposeForAddress(const QString &address) const
Look up purpose for address in address book, if not found return empty string.
QString labelForAddress(const QString &address) const
Look up label for address in address book, if not found return empty string.
Dialog for editing an address and associated information.
Ui::EditAddressDialog * ui
EditAddressDialog(Mode mode, QWidget *parent=nullptr)
QString getDuplicateAddressWarning() const
Return a descriptive string when adding an already-existing address fails.
void setModel(AddressTableModel *model)
QDataWidgetMapper * mapper
AddressTableModel * model
void setAddress(const QString &address)
QString getAddress() const
void handleCloseWindowShortcut(QWidget *w)
void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent)
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...