Implement bookmarks for comic view, Update TODO
This commit is contained in:
13
TODO
13
TODO
@@ -1,9 +1,8 @@
|
||||
TODO
|
||||
Options:
|
||||
Automatic library management
|
||||
✓ Automatic library management
|
||||
✓ Recursive file addition
|
||||
✓ Auto deletion
|
||||
Add only one file type if multiple are present
|
||||
✓ Remember files
|
||||
✓ Check files (hashes) upon restart
|
||||
✓ Draw shadows
|
||||
@@ -21,7 +20,6 @@ TODO
|
||||
✓ Memory management
|
||||
✓ Mass tagging
|
||||
✓ Add capability to sort by new
|
||||
? Create emblem per filetype
|
||||
Table view
|
||||
Ignore a / the / numbers for sorting purposes
|
||||
Information dialog widget
|
||||
@@ -64,19 +62,24 @@ TODO
|
||||
mobi, azw support
|
||||
Other:
|
||||
✓ Define every widget in code
|
||||
Include icons for filetype emblems
|
||||
Bugs:
|
||||
If there are files open and the database is deleted, TypeErrors result
|
||||
Closing a fullscreened contentView does not save settings
|
||||
|
||||
Secondary:
|
||||
Annotations
|
||||
Graphical themes
|
||||
Goodreads API: Ratings, Read, Recommendations
|
||||
Get ISBN using python-isbnlib
|
||||
Pagination
|
||||
Use embedded fonts
|
||||
Scrolling: Smooth / By Line
|
||||
? Add only one file type if multiple are present
|
||||
Shift to logging instead of print statements
|
||||
? Plugin system for parsers
|
||||
? pdf support
|
||||
txt, doc, chm, djvu, fb2 support
|
||||
? Create emblem per filetype
|
||||
txt, doc, chm, djvu, fb2 support
|
||||
Include icons for filetype emblems
|
||||
Drag and drop support for the library
|
||||
Leave comic images on disk in case tab isn't closed and files are remembered
|
16
widgets.py
16
widgets.py
@@ -295,10 +295,15 @@ class Tab(QtWidgets.QWidget):
|
||||
self.dockWidget.show()
|
||||
|
||||
def add_bookmark(self):
|
||||
chapter, scroll_position, visible_text = self.contentView.record_scroll_position(True)
|
||||
description = 'New bookmark'
|
||||
search_data = (scroll_position, visible_text)
|
||||
identifier = uuid.uuid4().hex[:10]
|
||||
description = 'New bookmark'
|
||||
|
||||
if self.are_we_doing_images_only:
|
||||
chapter = self.metadata['position']['current_chapter']
|
||||
search_data = (0, None)
|
||||
else:
|
||||
chapter, scroll_position, visible_text = self.contentView.record_scroll_position(True)
|
||||
search_data = (scroll_position, visible_text)
|
||||
|
||||
self.metadata['bookmarks'][identifier] = {
|
||||
'chapter': chapter,
|
||||
@@ -328,11 +333,12 @@ class Tab(QtWidgets.QWidget):
|
||||
search_data = self.proxy_model.data(index, QtCore.Qt.UserRole + 1)
|
||||
|
||||
self.window().bookToolBar.tocBox.setCurrentIndex(chapter - 1)
|
||||
self.set_scroll_value(False, search_data)
|
||||
if not self.are_we_doing_images_only:
|
||||
self.set_scroll_value(False, search_data)
|
||||
|
||||
def generate_bookmark_model(self):
|
||||
# TODO
|
||||
# Get the proxy model to sort this
|
||||
# Sorting is not working correctly
|
||||
|
||||
for i in self.metadata['bookmarks'].items():
|
||||
self.add_bookmark_to_model(
|
||||
|
Reference in New Issue
Block a user