Changeset View
Changeset View
Standalone View
Standalone View
src/qt/receiverequestdialog.cpp
Show First 20 Lines • Show All 108 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
void ReceiveRequestDialog::update() { | void ReceiveRequestDialog::update() { | ||||
if (!model) return; | if (!model) return; | ||||
QString target = info.label; | QString target = info.label; | ||||
if (target.isEmpty()) target = info.address; | if (target.isEmpty()) target = info.address; | ||||
setWindowTitle(tr("Request payment to %1").arg(target)); | setWindowTitle(tr("Request payment to %1").arg(target)); | ||||
QString uri = GUIUtil::formatBitcoinURI(info); | QString uri = GUIUtil::formatBitcoinURI(*cfg, info); | ||||
ui->btnSaveAs->setEnabled(false); | ui->btnSaveAs->setEnabled(false); | ||||
QString html; | QString html; | ||||
html += "<html><font face='verdana, arial, helvetica, sans-serif'>"; | html += "<html><font face='verdana, arial, helvetica, sans-serif'>"; | ||||
html += "<b>" + tr("Payment information") + "</b><br>"; | html += "<b>" + tr("Payment information") + "</b><br>"; | ||||
html += "<b>" + tr("URI") + "</b>: "; | html += "<b>" + tr("URI") + "</b>: "; | ||||
html += "<a href=\"" + uri + "\">" + GUIUtil::HtmlEscape(uri) + "</a><br>"; | html += "<a href=\"" + uri + "\">" + GUIUtil::HtmlEscape(uri) + "</a><br>"; | ||||
html += "<b>" + tr("Address") + "</b>: " + | html += "<b>" + tr("Address") + "</b>: " + | ||||
GUIUtil::HtmlEscape(info.address) + "<br>"; | GUIUtil::HtmlEscape(info.address) + "<br>"; | ||||
▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | if (!uri.isEmpty()) { | ||||
ui->lblQRCode->setPixmap(QPixmap::fromImage(qrAddrImage)); | ui->lblQRCode->setPixmap(QPixmap::fromImage(qrAddrImage)); | ||||
ui->btnSaveAs->setEnabled(true); | ui->btnSaveAs->setEnabled(true); | ||||
} | } | ||||
} | } | ||||
#endif | #endif | ||||
} | } | ||||
void ReceiveRequestDialog::on_btnCopyURI_clicked() { | void ReceiveRequestDialog::on_btnCopyURI_clicked() { | ||||
GUIUtil::setClipboard(GUIUtil::formatBitcoinURI(info)); | GUIUtil::setClipboard(GUIUtil::formatBitcoinURI(*cfg, info)); | ||||
} | } | ||||
void ReceiveRequestDialog::on_btnCopyAddress_clicked() { | void ReceiveRequestDialog::on_btnCopyAddress_clicked() { | ||||
GUIUtil::setClipboard(info.address); | GUIUtil::setClipboard(info.address); | ||||
} | } |