eBook reader proposal

Bogdan Cristea cristeab at gmail.com
Thu Apr 5 13:55:44 UTC 2012


On Thursday 05 April 2012 15:17:15 Aaron J. Seigo wrote:
> On Wednesday, April 4, 2012 18:24:43 Marco Martin wrote:
> > from a technical point of view, a good way to proceed i think would be 
this:
> 100% agreed. (no surprise :)
> 
> good news is that the viewer area is already nicely separated from the rest
> of the application. in fact, it is a QWidget that basically just paints
> pixmaps delivered from the renderers.

   That QWidget (SlidingStackedWidget) is slightly more complicated than that 
because it allows to animate the pages on switch (horizontal flicks). So 
actually the pixmaps are put on QWigets (QLabels) contained in 
SlidingStackedWidget. 
    Using pixmaps for rendering pages has some limitations: for chm documents 
following links is impossible, same for pdf files (not sure how poppler 
handles this).

> 
> so what may make sense is to take advantage of QML being able to show
> pixmaps natively and expose just some QObject based classes which provide
> the interface for fetching those pixmaps. this is what the current QWidget
> basically does already, so the work to make this happen should not be very
> big at all.

Actually I think that we need to find a way to animate pages using QML, 
something similar already exists for viewing images.

> 
> while having this as a separately loadable QML component should be the end
> goal, i think that to make that more achievable it would make sense to make
> the current app work in the manner described above and then once it is
> working within the app to make it a separate, externally-loaded QML
> component.

This reminds me that the file browser used to open files is not very well 
designed, so it might be an ideea to load an external QML component which 
already allows to browse files (it would be great to be able to install some 
filters into that component in order to see only supported formats)

> 
> .. and that will be VERY cool as it will open up viewer capabilities to any
> other app as long as this one is installed.

To resume, I would see the application structure like this:
1. main window: in QML (partially implemented)
2. document loader (separate thread alowing to manage document types and a 
buffer with several pages) in C++ (already implemented)
3. okular core library in C++ (to be adapted)

-- 
Bogdan 


More information about the Active mailing list