Damien Elmes
a517accee3
update to latest black
2020-08-31 13:29:28 +10:00
Damien Elmes
61e8611b7b
fix lint issue in previewer, and drop unused code
...
No add-ons appear to be using the removed code, and Anki wasn't
using it either.
2020-07-24 12:18:37 +10:00
Damien Elmes
26426cb11e
fix preview not updating on edit
...
https://forums.ankiweb.net/t/modification-and-preview/1331
2020-07-24 11:57:22 +10:00
Damien Elmes
9876c30d89
tidy up Qt import
2020-05-20 13:38:55 +10:00
Damien Elmes
1d4fd50d8b
Merge pull request #626 from evandroforks/fix_previewer_button
...
Fixed previewer button not resetting the state when the preview
2020-05-20 12:48:17 +10:00
evandrocoan
3ea6f685b2
Added missing Anki icon to qt/aqt/previewer.py
2020-05-19 19:43:18 -03:00
evandrocoan
3dcfd57b07
Fixed previewer button not resetting the state when the preview
...
window is closed by its X button
2020-05-19 19:24:54 -03:00
Damien Elmes
351d8a309f
move autoplay() into card
2020-04-13 09:04:30 +10:00
Damien Elmes
10eb947402
fix replay audio again, and decouple the code from the reviewer
2020-04-13 08:59:36 +10:00
Damien Elmes
61793f92b8
fix preview closing
...
https://anki.tenderapp.com/discussions/beta-testing/1868-anki-2124-beta#comment_48228480
2020-04-08 16:21:20 +10:00
Damien Elmes
6cf3b0ca18
add type checking to previewer
2020-04-03 09:13:33 +10:00
Damien Elmes
6049e15dac
add missing license header
2020-04-03 09:05:32 +10:00
Damien Elmes
5f9c126caa
fix some errors in the previewing code
2020-04-03 09:00:08 +10:00
Damien Elmes
4790fec881
render() conflicts with Qt method
2020-04-03 08:29:35 +10:00
Damien Elmes
de79087620
be explicit that the method is a no-op
2020-04-03 08:27:56 +10:00
Damien Elmes
f5e0ad8fad
tweak wording
2020-04-03 08:27:26 +10:00
Arthur Milchior
cd1fd6f9a2
snake case
2020-04-02 17:44:06 +02:00
Arthur Milchior
00d04cd6c9
Previewer is a QDialog
...
As suggested by Glutanimate in https://github.com/ankitects/anki/pull/532#discussion_r401256921
2020-04-02 17:44:06 +02:00
Arthur Milchior
6564f00748
Previewer: parent become private
...
It seems parent is a method of QDialog, so it creates a typing problem
2020-04-02 17:44:06 +02:00
Arthur Milchior
31f2f60757
Methods used by browser are not public
...
As suggested by Glutanimate on https://github.com/ankitects/anki/pull/532#discussion_r401254100
2020-04-02 17:44:06 +02:00
Arthur Milchior
0e21978577
remove the word preview from previewer variable
...
As suggested by glutanimate https://github.com/ankitects/anki/pull/532#discussion_r401255290
2020-04-02 17:44:06 +02:00
Arthur Milchior
92cec5c327
removing PreviewDialog dataclass
...
It can be replaced by the previewer itself. As suggested by
Glutanimate https://github.com/ankitects/anki/pull/532#discussion_r401252970
2020-04-02 17:44:06 +02:00
Arthur Milchior
c722b5bd2c
PreviewerListCards can take cids and class
...
This allow to avoid recomputing a card if it is known, while allowing
to compute it until it's actually displayed
2020-04-02 17:44:06 +02:00
Arthur Milchior
b76ee6f8e5
ListCardsPreviewer
2020-04-02 17:44:06 +02:00
Arthur Milchior
c4a38c5e36
Split PreviewerBrowser into a hierarchy
...
A part in common to see multiple cards. And a part specific for the browser
2020-04-02 17:44:06 +02:00
Arthur Milchior
727b7fb6e5
split onPreview Prev/Next
2020-04-02 17:44:06 +02:00
Arthur Milchior
79dece3124
split _updatePreviewButtons
...
This will allow to create a hierarchy in this class
2020-04-02 17:44:06 +02:00
Arthur Milchior
f42c164999
add a class to preview a single card
2020-04-02 17:44:06 +02:00
Arthur Milchior
944e82211f
Class PreviewerBrowser
...
This let a previewer class which can be used to display a single card,
and a previewer for the browser
2020-04-02 17:44:06 +02:00
Arthur Milchior
0a3d68a565
split = None
2020-04-02 17:44:06 +02:00
Arthur Milchior
6d98063ac3
vbox and bbox are attribute
2020-04-02 17:44:06 +02:00
Arthur Milchior
95e020f743
use card method
2020-04-02 17:44:06 +02:00
Arthur Milchior
179ba87ce4
previewer: create gui in a distinct function
2020-04-02 17:44:06 +02:00
Arthur Milchior
45ccd4aa3c
move previewer to a different class.
...
This uses exactly the same code, with one exception. In the previewer
`self` became `self.parent` in order to have action on the
browser. And in the browser, some `self` become `self.previewer` to
access the previewer. (Some function having an action on the previewer
starting from the browser now are separated in two. One version in the
previewer doing the same thing. One version in the browser, calling
the version in the previewer if it exists.)
Preview dialog now takes a QWidget in general, not necesarrily a
Browser. The parameter is called parent
2020-04-02 17:44:06 +02:00