1
0
Commit Graph

20 Commits

Author SHA1 Message Date
SomberNight
5398b9d9c9 qr qrtextedit: move functionality up to ButtonsWidget 2022-05-14 18:56:07 +02:00
SomberNight
6bb057b548 qt refactor qrtextedit.py, create "ScanShowQRTextEdit" 2022-05-14 18:56:01 +02:00
SomberNight
013cf869f1 qt: qrreader: keep both old and new toolchain; try to abstract it away 2021-06-25 16:52:02 +02:00
SomberNight
c1dbcab9bb qt: new qrreader using QtMultimedia; drop CalinsQRReader(mac)
This commit ports the work of EchterAgo and cculianu from Electron-Cash,
to implement a new toolchain to scan qr codes.

Previously, on Linux and Win, we have been using zbar to access the camera
and read qrcodes; and on macOS we used CalinsQRReader (an objective-C
project by cculianu).

The new toolchain added here can use QtMultimedia to access the camera,
and then feed that image into zbar. When used this way, zbar needs
fewer dependencies and is easier to compile, in particular it can be
compiled for macOS.

The new toolchain works on all three platforms, with some caveats
(see code comments in related commits) -- so we also keep the end-to-end
zbar toolchain; but at least we can drop CalinsQRReader.

The related changes in Electron-Cash are spread over 50+ commits (several PRs and direct
pushes to master), but see in particular:
https://github.com/Electron-Cash/Electron-Cash/pull/1376

some other interesting links:
b2b737001c
163224cf1f
3b31e0fcb1
eda015908e
https://github.com/Electron-Cash/Electron-Cash/pull/1545
052aa06c23
2021-06-25 16:51:58 +02:00
SomberNight
129d5ba417 qt: (fix) make ScanQRTextEdit inherit Logger
the error handling in `qr_input()`, around line 81,
references `self.logger`, which would raise
2021-06-25 16:50:52 +02:00
SomberNight
4a8286c744 qrscanner: nicer error messages 2021-02-23 22:38:53 +01:00
SomberNight
b28b3994c7 qt: move window.get{Open,Save}FileName to util
Sometimes we want its "remember path" behaviour but it does not make sense to
parent the dialog from main window. When so, caller code no longer needs to
get a reference to a main window.

Also rm last usages of get_parent_main_window().
2020-12-20 15:25:35 +01:00
SomberNight
096d853482 qt: rm some usages of get_parent_main_window
instead, pass around the main window or config (whichever is actually needed)

fixes #6342
2020-12-20 15:25:31 +01:00
SomberNight
1c9a6f5770 qt wizard: fix scanning qr code when restoring from xpub
fixes #6342
2020-07-08 01:51:14 +02:00
SomberNight
aa3d817ef2 qt: clean-up imports 2019-11-18 20:56:49 +01:00
SomberNight
9ff7d2c5a7 transactions (qt): fix opening raw bytes files
(both when trying to "load tx from file", and "load tx from text" > "browse file")
2019-11-08 15:10:54 +01:00
SomberNight
04edad9984 config: no longer singleton. it is passed to Wallet.__init__
The few other cases that used SimpleConfig.get_instance() now
either get passed a config instance, or they try to get a reference
to something else that has a reference to a config.
(see lnsweep, qt/qrcodewidget, qt/qrtextedit)
2019-09-22 20:46:01 +02:00
SomberNight
b2920db8b8 config: enforce that SimpleConfig is singleton
related: #5629
2019-09-10 18:01:10 +02:00
SomberNight
f60f690ca9 change many str(e) to repr(e) as some exceptions were cryptic
it's often valuable to see the type of the exception
(especially as for some exceptions str(e) == '')
2019-07-17 20:12:52 +02:00
SomberNight
026448837f no more "import *"
fixes #5101
fixes #5105
2019-02-11 20:21:24 +01:00
SomberNight
16bac5fd73 rm qt icons file
so we don't need pyrcc5, which is not deterministic,
and so we don't need the submodule for the icons

based on electrumsv/electrumsv@bf8802c2ea
2019-02-01 20:15:28 +01:00
ThomasV
7a4270f5a4 Qt: camera icon 2018-12-13 17:21:56 +01:00
SomberNight
ea235a1468 qt dark theme: use correct QR code icon (light/dark) 2018-12-03 17:51:05 +01:00
SomberNight
33d14e4238 some import clean-up in qt 2018-09-25 18:15:28 +02:00
Janus
097ac144d9 file reorganization with top-level module 2018-07-13 14:01:37 +02:00