You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
69 lines
2.8 KiB
69 lines
2.8 KiB
Here are some notes about the inner structure of kpdf for who wants to take |
|
a look at the project. |
|
|
|
|
|
*** About the 'kpdf_experiments' branch: |
|
---- |
|
The kpdf_experiments branch has just been created. Architectural changes will |
|
be described here. |
|
|
|
Here are some misc thougths (cut&paste from a mail to Albert): |
|
- I want to clean up some code. I think that some features are just not |
|
implementable in present state. For example multiple pages per sheet or |
|
continous scrolling. |
|
- I think something can be faster if the structure gets cleaned (caching the |
|
TextOuputDev pages when searching for example..) or using directly the |
|
QOutputDevPixmap in cache since thay implement the search too (and you know |
|
it well :-). |
|
- The only feature I want to add is the one I was telling you before. |
|
---- |
|
|
|
|
|
*** Rendering: |
|
|
|
- The rendering is done by xpdf/splash. xpdf defines 'OutputDev' class that has |
|
been implemented by renderers. Kpdf imported Splash sources; Splash implements |
|
all virtuals from the interface and draws text/image into an inner pixmap. |
|
|
|
- Kpdf reimplements the 'SplashOutputDev' iface to basically get notified when |
|
the rendering of a page is finished (and some other features such as collection |
|
of per-page text that permits to implement search). |
|
|
|
- Kpdf's QOutputDev returns a image containing a single redered page. |
|
|
|
|
|
*** Architecture: |
|
|
|
Almost all of the whole kpdf is a KParts::ReadOnlyPart. Plus there is a main |
|
window that embeds the part when used stand alone (see kpdf_shell.cpp/.h and |
|
main.cpp). |
|
The 'Shell' only adds fullscreen capability to the part, a standard |
|
open dialog, a quit button and minor bits of code. |
|
|
|
Architecture::Part: (kpdf_part.cpp/.h) |
|
|
|
The part owns a centralWidget (with thumbnails in a left column and the view |
|
area on the right), some XMLgui functionalities (zoom actions, search actions, |
|
more...) and some background logic (thumbnail generation, page changes, |
|
loading/saving settings and more). |
|
|
|
Architecture::Part:CentralWidget:PageWidget (kpdf_pagewidget.cc/.h) |
|
|
|
Displays current page pixmap (holds a QOutputDevPixmap inside). Handles mouse, |
|
keys, scrolling and scrollbars as well. This widget is a qscrollview. |
|
|
|
Architecture::Part:CentralWidget:ThumbnailList (kpdf_pagewidget.cc/.h) |
|
|
|
This widget is a vertical single column table where cells are thumbnails. This |
|
supports thumbnail scaling and emits a signal when a page is selected between |
|
the list of thumbnails. That widget also generates the thumbnails of the |
|
document using the ThumbnailCreator class. |
|
|
|
|
|
*** Last Revisions to this document: |
|
2004-09-08 : 0.3 - Albert Astals Cid <tsdgeos@terra.es> |
|
- Bye bye part.cpp/.h |
|
2004-09-04 : 0.2 - Albert Astals Cid <tsdgeos@terra.es> |
|
- ThumbnailList creates the thumbnails itself |
|
2004-09-04 : 0.1 - Enrico Ros <eros.kde@email.it> |
|
- just read the code and created this file
|
|
|