electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 28a31b65ee83dccf1c5f169a11c194e956d541d9
parent 554d8dd3b7511503bbc68805c8a1a4c92fc4148f
Author: ThomasV <thomasv@gitorious>
Date:   Fri, 18 Oct 2013 12:32:00 +0200

export QR code to clipboard (fixes issue #318)

Diffstat:
Mgui/qt/main_window.py | 14++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py @@ -1581,11 +1581,21 @@ class ElectrumWindow(QMainWindow): hbox = QHBoxLayout() hbox.addStretch(1) - def print_qr(self): - filename = "qrcode.bmp" + filename = os.path.join(self.config.path, "qrcode.bmp") + + def print_qr(): bmp.save_qrcode(qrw.qr, filename) QMessageBox.information(None, _('Message'), _("QR code saved to file") + " " + filename, _('OK')) + def copy_to_clipboard(): + bmp.save_qrcode(qrw.qr, filename) + self.app.clipboard().setImage(QImage(filename)) + QMessageBox.information(None, _('Message'), _("QR code saved to clipboard"), _('OK')) + + b = QPushButton(_("Copy")) + hbox.addWidget(b) + b.clicked.connect(copy_to_clipboard) + b = QPushButton(_("Save")) hbox.addWidget(b) b.clicked.connect(print_qr)