Commit Graph

25 Commits

Author SHA1 Message Date
ThomasV b15387c89b Qt send tab: move payto_edit input buttons to toolbar 2023-03-13 08:55:45 +01:00
SomberNight 44655bcca2 qt qrtextedit: also show icon in ShowQRTextEdit.contextMenu
follow-up https://github.com/spesmilo/electrum/commit/955986d024155e6c00a82e187a94b46d1507e66a
2022-07-12 15:33:28 +02:00
SomberNight 955986d024 qt: PayToEdit and OverlayControlMixin: move around input buttons 2022-07-11 19:08:53 +02:00
SomberNight df974c2384 qt paytoedit: evaluate text on textChanged(), but no network requests
- add param to _check_text to toggle if network requests are allowed ("full check")
- every 0.5 sec, if the textedit has no focus, do full check
- on textChanged()
  - detect if user copy-pasted by comparing current text against clipboard contents,
    if so, do full check
  - otherwise, do partial check
- on clicking ButtonsWidget btns (scan qr, paste, read file), do full check
2022-06-29 16:18:30 +02:00
Jonas Lundqvist b7b53e56bc Qt PayToEdit: add option to scan QR code from screen(shot)
this ports the following commits:
https://github.com/Electron-Cash/Electron-Cash/commit/448376e4410951f12f53ce42b59bdfe856afc66b
https://github.com/Electron-Cash/Electron-Cash/commit/6053f6f696c3f65a93a84e570454e8a1d8c5f490
2022-06-01 19:10:01 +02:00
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:
https://github.com/Electron-Cash/Electron-Cash/commit/b2b737001c8cc41a38fa580ea252a6d24e08f5d5
https://github.com/Electron-Cash/Electron-Cash/commit/163224cf1fad3af63f2d3cbe68a34fb8ff279af6
https://github.com/Electron-Cash/Electron-Cash/commit/3b31e0fcb13f67646228ff42c0dd39d2a0912291
https://github.com/Electron-Cash/Electron-Cash/commit/eda015908e9d6ea9a0adfbda9db55b929c0926ba
https://github.com/Electron-Cash/Electron-Cash/pull/1545
https://github.com/Electron-Cash/Electron-Cash/commit/052aa06c23b939adcea07c701f70ae28ebcf9e0a
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