Commit graph

37 commits

Author SHA1 Message Date
Pino Toscano
2db51ef56b Read information like 'title', 'author', 'editor', 'publisher', 'year' and 'volume' from DjVu documents, and make them visible in the Information dialog.
A big Thanks! to liquidat for pointing me in the right place to look for :)
CCMAIL: liquidat <liquidat@gmail.com>

svn path=/trunk/playground/graphics/okular/; revision=627217
2007-01-26 00:28:59 +00:00
Tobias Koenig
d227a94e79 First part of the porting to a threaded api for generators
- made comicbook, tiff and kimgio a threaded generator

svn path=/trunk/playground/graphics/okular/; revision=626761
2007-01-24 15:06:45 +00:00
Pino Toscano
a1b0e157c8 release the pointer of a done request
svn path=/trunk/playground/graphics/okular/; revision=624662
2007-01-17 16:39:01 +00:00
Pino Toscano
3a4e56015e no need to recalculate the links for every pixmap request
isolate the link+objectrect and annotation conversions into own functions 

svn path=/trunk/playground/graphics/okular/; revision=624659
2007-01-17 16:24:46 +00:00
Pino Toscano
2de89d6eb8 don't leak the format mask and the (empty) kdjvu
svn path=/trunk/playground/graphics/okular/; revision=620781
2007-01-07 10:46:50 +00:00
Pino Toscano
4b922367e2 Use a proper enum to deal with orientation/rotation all around okular.
svn path=/trunk/playground/graphics/okular/; revision=620312
2007-01-05 17:09:47 +00:00
Tobias Koenig
ea51ee18f5 Do a lot of include cleanups... we install all important
header files now

svn path=/trunk/playground/graphics/okular/; revision=619492
2007-01-03 14:30:48 +00:00
Tobias Koenig
6f9d0df5cd Further annotation API cleanup
svn path=/trunk/playground/graphics/okular/; revision=612395
2006-12-11 07:59:02 +00:00
Tobias Koenig
a9f58440df First large commit for the Annotation API cleanup
* Moved all public member variables of Annotation to private
    and add accessors
  * Renamed RevScope and RevType to RevisionScope and RevisionType
  * Add API documentation (@pino, please review)

svn path=/trunk/playground/graphics/okular/; revision=610749
2006-12-05 11:05:50 +00:00
Pino Toscano
5c0de8b638 Add printing support for DjVu files. (It is also PostScript exporting, as you can print to file to get a PS document.)
svn path=/trunk/playground/graphics/okular/; revision=606585
2006-11-20 22:48:44 +00:00
Tobias Koenig
a490cc0cd7 Add the following functionality:
* Bring QPixmap* back to make Albert happy ;)
 * Store only one QPixmap per page/size and rotate it directly
 * Rotate ObjectRects (boundary)
 * Rotate Annotations (point coordinates)
 * Don't reload pixmaps, ObjectRects and annotations on rotation

svn path=/trunk/playground/graphics/okular/; revision=606371
2006-11-20 07:53:32 +00:00
Pino Toscano
4f305424bc read the annotations only once, ie when loading the pages
svn path=/trunk/playground/graphics/okular/; revision=605455
2006-11-16 19:52:04 +00:00
Pino Toscano
673fe63610 generate an uid for the djvu annotations
svn path=/trunk/playground/graphics/okular/; revision=604290
2006-11-12 12:43:42 +00:00
Pino Toscano
5731b36fe5 the text is needed in this field, too, for the moment
svn path=/trunk/playground/graphics/okular/; revision=604209
2006-11-12 00:48:59 +00:00
Pino Toscano
cb414fbf1d remember, pino, remember: djvu coordinates refer to the lower-left corner of a page.
fix the coordinate loading for the annotations

svn path=/trunk/playground/graphics/okular/; revision=604204
2006-11-11 23:52:12 +00:00
Pino Toscano
825c725eaf change the internal KDjVu data storage to an hash of variants
svn path=/trunk/playground/graphics/okular/; revision=604173
2006-11-11 20:34:07 +00:00
Pino Toscano
0c4a081174 Add preliminary support for DjVu Text and Line annotations.
This means we can read them almost correctly, but there are some problems with placements and colors.

svn path=/trunk/playground/graphics/okular/; revision=604165
2006-11-11 19:15:58 +00:00
Pino Toscano
eb83fc5d27 adapt the djvu generator (and kdjvu) to handle images instead of pixmaps
add a basic TODO

svn path=/trunk/playground/graphics/okular/; revision=599108
2006-10-25 19:42:30 +00:00
Tobias Koenig
d22b2f1892 A rather big change:
* Hide as much private API as possible in Generator, PixmapRequest and ExportEntry/Format
 * Renamed ExportEntry to ExportFormat and made it value based
 * Removed canExportToText() and exportToText() from Generator API and implemented this
   functionality in exportFormats()/exportTo() in the generators
 * Removed the orientation parameter from PixmapRequest and let the Document handle the rotation
   of the page (pixmap) instead

CCMAIL:okular-devel@kde.org

svn path=/trunk/playground/graphics/okular/; revision=599058
2006-10-25 15:35:53 +00:00
Pino Toscano
18028a8a2c API change in the Generator: use an empty construct, and set the document for the generator right after its construction.
Add a protected method to get the document, and hide the real document pointer as private, so the generators can't redefine it.

svn path=/trunk/playground/graphics/okular/; revision=598025
2006-10-22 11:25:08 +00:00
Tobias Koenig
fccd412d69 * Added documentation to Generator API
* Moved all implementations to generator.cpp
 * Added 'const' where it make sense
 * Adapted all generators (except gs)

svn path=/trunk/playground/graphics/okular/; revision=597525
2006-10-20 16:51:46 +00:00
Pino Toscano
c52a0e622b Change the way we rotate the pages.
Instead of telling the generators to do the work themselves (that was usually destraoying the ld pages and creating the new ones), now we just rotate the page objects deleting only their "mutable" contents.
This way, generators can just return true in their supportRotation() to make okular rotate the pages for them for free. Of course they still have to generate the page pixmaps according to the given page rotation.
Now, there's a new rotationChanged() function in the Generator API so generator that needs it can be norified about the document rotation changing.

CCMAIL: developers@okular.org

svn path=/trunk/playground/graphics/okular/; revision=593632
2006-10-08 15:07:23 +00:00
Tobias Koenig
df7d144c10 Moved all classes in core/ into the 'Okular' namespace and removed
nearly all references to kpdf (knewstuff still missing).

svn path=/trunk/playground/graphics/okular/; revision=586993
2006-09-21 08:45:36 +00:00
Pino Toscano
e147f53ab7 make sure to really close the djvu document
svn path=/trunk/playground/graphics/okular/; revision=564677
2006-07-20 20:02:02 +00:00
Pino Toscano
b6d7a36eda Small addition to the Ganarator API: bool closeDocument().
Now every generator has to implement this one and put (if necessary) all the code for cleaning up all the stuff related to the currently open document.
For now the return value it is not read, but generators as strongly suggested to return tru o false, whether all the operations in there went fine.

svn path=/trunk/playground/graphics/okular/; revision=562210
2006-07-14 10:54:29 +00:00
Pino Toscano
38593f718c delete a Link if an ObjectRect is not created; less deferences
svn path=/trunk/playground/graphics/okular/; revision=561949
2006-07-13 17:27:34 +00:00
Pino Toscano
2d64d446d7 Read correctly the 'poly' links for DjVu documents.
svn path=/trunk/playground/graphics/okular/; revision=561918
2006-07-13 16:08:50 +00:00
Pino Toscano
67fabc7659 - adapted the DjVu generators to the new ObjectRect API
- read also the links with an elliptic shape
- some code less

svn path=/trunk/playground/graphics/okular/; revision=561892
2006-07-13 15:06:47 +00:00
Pino Toscano
a324781264 adapt the djvu generator to make use of the okularUtils namespace
svn path=/trunk/playground/graphics/okular/; revision=556609
2006-06-30 21:43:40 +00:00
Pino Toscano
ca85816c4c take correctly into account the rotation of the document, and rotate the link rects accordingly
svn path=/trunk/playground/graphics/okular/; revision=556019
2006-06-28 22:57:01 +00:00
Pino Toscano
c39fdf8f5c Improve the hyperlink support, and make it less error-prone. Micro suppport for URL hyperlinks.
svn path=/trunk/playground/graphics/okular/; revision=555968
2006-06-28 20:44:12 +00:00
Pino Toscano
39e73f95f6 Read correctly the DjVu area maps (aka links) referring to local pages.
svn path=/trunk/playground/graphics/okular/; revision=555915
2006-06-28 17:52:00 +00:00
Pino Toscano
a5795e2726 Now the DjVu generator is able to extract the list of bookmarks (aka Table of Contents) from the DjVy document, if it has any.
svn path=/trunk/playground/graphics/okular/; revision=555320
2006-06-27 00:08:42 +00:00
Pino Toscano
066beaa1dd small changes in the Generator API:
- no need for a private empty constructor
- move the signalRequestDone 'signal' to a protected visibility, as it's not meant to be called from outside a generator
- KPDF_EXPORT_PLUGIN -> OKULAR_EXPORT_PLUGIN

svn path=/trunk/playground/graphics/okular/; revision=553077
2006-06-19 22:15:07 +00:00
Pino Toscano
49a5be93da isolate the code for creating pages in an own method, should work correctly for pages with an initial rotation different than 0
svn path=/trunk/playground/graphics/okular/; revision=552594
2006-06-18 13:04:42 +00:00
Pino Toscano
dc0168a8f4 add the info about the number of components of the current document
svn path=/branches/work/kde4/playground/graphics/okular/; revision=550300
2006-06-11 13:48:39 +00:00
Pino Toscano
d0ac95dafd A new backend for oKular: DjVu:
* uses the DjVuLibre for loading the DjVu files
* can rotate the pages
* has a cache (with few elements) with the most recently used generated pixmaps,
  to reduce a bit the number of pixmap generation
There could be some issues, but mainly it works nicely.

svn path=/branches/work/kde4/playground/graphics/cmake/; revision=549184
2006-06-07 17:41:04 +00:00