electrum

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

commit ca4e9261e0a5d05c0a9d10d6221e4ec840291a52
parent 5f8c04cd565fd693ac19a5b6024589a080d6e4bf
Author: ThomasV <thomasv@gitorious>
Date:   Fri, 13 Jun 2014 14:27:48 +0200

qrscanner: use win.show_qr_code

Diffstat:
Mplugins/qrscanner.py | 31+------------------------------
1 file changed, 1 insertion(+), 30 deletions(-)

diff --git a/plugins/qrscanner.py b/plugins/qrscanner.py @@ -84,39 +84,10 @@ class Plugin(BasePlugin): def show_raw_qr(self, tx): try: json_text = json.dumps(tx.as_dict()).replace(' ', '') - self.show_tx_qrcode(json_text, 'Unsigned Transaction') + self.win.show_qrcode(json_text, 'Unsigned Transaction') except Exception as e: self.win.show_message(str(e)) - def show_tx_qrcode(self, data, title): - if not data: return - d = QDialog(self.win) - d.setModal(1) - d.setWindowTitle(title) - d.setMinimumSize(250, 525) - vbox = QVBoxLayout() - qrw = QRCodeWidget(data) - vbox.addWidget(qrw, 0) - hbox = QHBoxLayout() - hbox.addStretch(1) - - def print_qr(self): - filename = "qrcode.bmp" - electrum_gui.bmp.save_qrcode(qrw.qr, filename) - QMessageBox.information(None, _('Message'), _("QR code saved to file") + " " + filename, _('OK')) - - b = QPushButton(_("Save")) - hbox.addWidget(b) - b.clicked.connect(print_qr) - - b = QPushButton(_("Close")) - hbox.addWidget(b) - b.clicked.connect(d.accept) - b.setDefault(True) - - vbox.addLayout(hbox, 1) - d.setLayout(vbox) - d.exec_() def read_raw_qr(self): qrcode = self.scan_qr()