6 #include <qt/forms/ui_editaddressdialog.h> 11 #include <QDataWidgetMapper> 12 #include <QMessageBox> 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);
66 mapper->setCurrentIndex(row);
79 ui->labelEdit->text(),
80 ui->addressEdit->text(),
110 QMessageBox::warning(
this, windowTitle(),
111 tr(
"The entered address \"%1\" is not a valid BSHA3 address.").arg(
ui->addressEdit->text()),
112 QMessageBox::Ok, QMessageBox::Ok);
115 QMessageBox::warning(
this, windowTitle(),
117 QMessageBox::Ok, QMessageBox::Ok);
120 QMessageBox::critical(
this, windowTitle(),
121 tr(
"Could not unlock wallet."),
122 QMessageBox::Ok, QMessageBox::Ok);
125 QMessageBox::critical(
this, windowTitle(),
126 tr(
"New key generation failed."),
127 QMessageBox::Ok, QMessageBox::Ok);
138 QString dup_address =
ui->addressEdit->text();
142 if (existing_purpose ==
"receive" &&
145 "Address \"%1\" already exists as a receiving address with label " 146 "\"%2\" and so cannot be added as a sending address." 147 ).arg(dup_address).arg(existing_label);
150 "The entered address \"%1\" is already in the address book with " 152 ).arg(dup_address).arg(existing_label);
163 ui->addressEdit->setText(_address);
Generating a new public key for a receiving address failed.
EditAddressDialog(Mode mode, QWidget *parent=0)
Address already in address book.
QString purposeForAddress(const QString &address) const
Look up purpose for address in address book, if not found return empty string.
QString addRow(const QString &type, const QString &label, const QString &address, const OutputType address_type)
static const QString Send
Specifies send address.
void setModel(AddressTableModel *model)
void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent)
Wallet could not be unlocked to create new receiving address.
QDataWidgetMapper * mapper
QString labelForAddress(const QString &address) const
Look up label for address in address book, if not found return empty string.
Qt model of the address book in the core.
AddressTableModel * model
OutputType GetDefaultAddressType() const
void setAddress(const QString &address)
Dialog for editing an address and associated information.
QString getAddress() const
No changes were made during edit operation.
Ui::EditAddressDialog * ui
EditStatus getEditStatus() const
QString getDuplicateAddressWarning() const
Return a descriptive string when adding an already-existing address fails.