6#include <qt/forms/ui_editaddressdialog.h>
13#include <QDataWidgetMapper>
29 setWindowTitle(tr(
"New sending address"));
32 setWindowTitle(tr(
"Edit receiving address"));
33 ui->addressEdit->setEnabled(
false);
36 setWindowTitle(tr(
"Edit sending address"));
40 mapper =
new QDataWidgetMapper(
this);
41 mapper->setSubmitPolicy(QDataWidgetMapper::ManualSubmit);
45 mapper->setItemDelegate(delegate);
68 mapper->setCurrentIndex(row);
81 ui->labelEdit->text(),
82 ui->addressEdit->text(),
112 QMessageBox::warning(
this, windowTitle(),
113 tr(
"The entered address \"%1\" is not a valid Bitcoin address.").arg(
ui->addressEdit->text()),
114 QMessageBox::Ok, QMessageBox::Ok);
117 QMessageBox::warning(
this, windowTitle(),
119 QMessageBox::Ok, QMessageBox::Ok);
122 QMessageBox::critical(
this, windowTitle(),
123 tr(
"Could not unlock wallet."),
124 QMessageBox::Ok, QMessageBox::Ok);
127 QMessageBox::critical(
this, windowTitle(),
128 tr(
"New key generation failed."),
129 QMessageBox::Ok, QMessageBox::Ok);
140 QString dup_address =
ui->addressEdit->text();
147 "Address \"%1\" already exists as a receiving address with label "
148 "\"%2\" and so cannot be added as a sending address."
149 ).arg(dup_address).arg(existing_label);
152 "The entered address \"%1\" is already in the address book with "
154 ).arg(dup_address).arg(existing_label);
165 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.
std::optional< wallet::AddressPurpose > purposeForAddress(const QString &address) const
Look up purpose for address in address book, if not found return empty string.
static const QString Send
Specifies send address.
QString addRow(const QString &type, const QString &label, const QString &address, const OutputType address_type)
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
Utility functions used by the Bitcoin Qt UI.
void handleCloseWindowShortcut(QWidget *w)
constexpr auto dialog_flags
void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent)
is a home for public enum and struct type definitions that are used by internally by wallet code,...