05-14-2016, 02:05 AM | #1 |
Junior Member
Posts: 2
Karma: 10
Join Date: May 2016
Device: Android, PC
|
EbookViewer.pos
Hello, everyone.
I am attempting to add a feature into the Calibre viewer that will allow users to see their position in a chapter. To do this, I need to know where the EbookViewer.pos attribute is assigned, or the class it represents. Thanks in advance. PS - To the Calibre developers: thank you for making _the_ best PC eBook utility out there. - X |
05-14-2016, 07:13 AM | #2 |
creator of calibre
Posts: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
pos is juts a simple frac between 0 and 1. The difficulty in getting progress in the chapter is that you have to first know the chapter start and end limits (in the general case a chapter does not necessarily have to be in a self contained html file). You can get the limits the same way the ToC code in the viewer knows which entry to highlight.
However, before you go any further, you should know that the viewer is in maintenance mode. The library it is based on (Qt WebKit) has been discontinued so it is going to be be replaced by a new codebase -- the new codebase is currently being developed for the in-browser viewer for calibre 3.0. When that is completed, it will be used to switch the desktop viewer over to use Qt WebEngine instead of Qt WebKit. |
05-15-2016, 06:08 AM | #3 |
Junior Member
Posts: 2
Karma: 10
Join Date: May 2016
Device: Android, PC
|
Thanks, Kovid!
Is this new codebase being developed in the current git repository? - X |
05-15-2016, 12:04 PM | #4 |
creator of calibre
Posts: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
yes it is.
|
05-15-2016, 12:09 PM | #5 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
You can see the current progress if you are running from source, by starting the server with the command
Code:
calibre-debug --new-server |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ebook viewer: open book @ last pos - without calibre | Stepe | Calibre | 2 | 03-21-2016 10:37 AM |
Issues Changing PDF to MOBI via Calibre & Transferring to Kindle Fire See latest pos | Warren_Harding | Devices | 11 | 12-20-2013 11:58 AM |
Ebook store that takes School POs(NET terms) | nlandas | Astak EZReader | 11 | 01-27-2010 10:38 AM |
Ended Buy Ebookviewer in UK | madmandegge | Flea Market | 6 | 09-12-2008 04:35 AM |