New classes ScanQRTextEdit and ShowQRTextEdit.
Reason: dependencies on zbar availability and issues with the QRTextEdit constructor.
- ScanQRTextEdit needs access to the config (fetch camera). It needs to load
the zbar processor properly before trying to scan. Keeping a reference to
the processor in qrscaner fixes the crashes on windows.
- ShowQRTextEdit should not have access to scan_qr().
- no need to setReadOnly anymore. It is clear from the class name.
Show master pub keys now has a Combobox if multiple accounts are
available.
raiseBaseException("\n".join([_("Cannot start QR scanner."),_("The zbar package is not available."),_("On Linux, try 'sudo apt-get install python-zbar'")]))
raiseBaseException("\n".join([_("Cannot start QR scanner."),_("The zbar package is not available."),_("On Linux, try 'sudo apt-get install python-zbar'")]))
device=config.get("video_device","default")
device=config.get("video_device","default")
ifdevice=='default':
ifdevice=='default':
device=''
device=''
globalproc
proc=zbar.Processor()
proc=zbar.Processor()
proc.init(video_device=device)
proc.init(video_device=device)
defscan_qr(self):
ifnotzbar:
raiseBaseException("\n".join([_("Cannot start QR scanner."),_("The zbar package is not available."),_("On Linux, try 'sudo apt-get install python-zbar'")]))