Commit graph

65 commits

Author SHA1 Message Date
Pino Toscano
88006a575b extract the messages of each generator into an own pot: this way it's easier to translate a single backend (or provide the translation for a custom one), but as drawback some strings are repeated in more than one pot
svn path=/trunk/playground/graphics/okular/; revision=641620
2007-03-12 00:26:41 +00:00
Pino Toscano
ed3b44ad38 missing #include
svn path=/trunk/playground/graphics/okular/; revision=632935
2007-02-12 18:13:44 +00:00
Pino Toscano
6068c76df6 Merge the new functions of ThreadedGenerator into the base Generator: this means that there's again only a single base Generator that can provide the multithreading for the generation of contents, just pixmaps for now.
svn path=/trunk/playground/graphics/okular/; revision=628853
2007-01-31 18:31:19 +00:00
Tobias Koenig
baf1fb2870 Several changes:
- renamed signalRequestDone to signalPixmapRequestDone to allow a future signalTextPageRequestDone
  - added error/warning/notice signals to TextDocumentConverter and add meaningful error messages
    to ooo and fictionbook generator
  - code cleanup in chm generator
  - print improvements and error notification in kimgio generator

svn path=/trunk/playground/graphics/okular/; revision=628124
2007-01-29 08:17:45 +00:00
Pino Toscano
59f8fa67e5 ok i was wrong with this...
svn path=/trunk/playground/graphics/okular/; revision=627424
2007-01-26 14:58:34 +00:00
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
2479bb7cb5 one more check, and try opening the file as first action
svn path=/trunk/playground/graphics/okular/; revision=625705
2007-01-20 21:20:58 +00:00
Pino Toscano
3d989381f9 don't look twice in the hash
svn path=/trunk/playground/graphics/okular/; revision=625703
2007-01-20 21:12:56 +00:00
Pino Toscano
d0744fa204 use a feature from v18 only if we have it
svn path=/trunk/playground/graphics/okular/; revision=625656
2007-01-20 18:05:04 +00:00
Pino Toscano
f0a80b14fc Take a bit less time to load a DjVu document: instead of decoding all the pages during the loading to get their info, just decode their status, doing the real page loading when needed (usually when generating their pixmaps).
svn path=/trunk/playground/graphics/okular/; revision=625636
2007-01-20 16:34:26 +00:00
Pino Toscano
169b752433 make it compile properly
svn path=/trunk/playground/graphics/okular/; revision=624689
2007-01-17 18:05:06 +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
86a1fd3b69 Big cleanup of Document API and documentation:
* add full API docs
 * renamed getMetaData -> metaData
 * removed supportsRotation in Document and Generator
 * moved Permission and SearchDirection enums into separated header core/global.h

svn path=/trunk/playground/graphics/okular/; revision=619183
2007-01-02 22:37:55 +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
9a232e9d88 SVN_SILENT typo
svn path=/trunk/playground/graphics/okular/; revision=604211
2006-11-12 00:53:48 +00:00
Pino Toscano
de6d8eaf1d update
svn path=/trunk/playground/graphics/okular/; revision=604210
2006-11-12 00:52:31 +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
28c63b44e8 read the 'width' info for lines
svn path=/trunk/playground/graphics/okular/; revision=604196
2006-11-11 23:23:07 +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
132daba86a update with some annotation stuff
svn path=/trunk/playground/graphics/okular/; revision=604168
2006-11-11 19:25:09 +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
a29cbda39e The DjVu backend can now read hyperlinks whose url is decoded as "(url href target)".
svn path=/trunk/playground/graphics/okular/; revision=604073
2006-11-11 14:22:41 +00:00
Pino Toscano
5adbe4c66f there's no more need for libtool files
svn path=/trunk/playground/graphics/okular/; revision=603923
2006-11-10 20:03:50 +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
Laurent Montel
acb44a49d5 Apply Alex patch (now we can use enable-final argument
some module compiles with enable-final now)
As discussed with Alex it's not necessary to have program name
into automoc macro

svn path=/trunk/playground/graphics/okular/; revision=598341
2006-10-23 09:29:10 +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
Laurent Montel
9f317e53ca Port to new kde4_automoc macro
Necessary to change KDE4_AUTOMOC macro to support
enable-final argument

(there was not a dependancy between <name>_final.cpp file and
moc generated files => moc files were never created)

Not necessary to rebuild all kdelibs just cp kdelibs/cmake/modules/KDE4Macros.cmake <path_kde4>/share/apps/cmake/modules

I ported and tested all kde module (without enable-final argument, it compiles fines (test and program))
Don't try to use enable-final argument for the moment it doesn't compile (but dependancy works)

Regards

svn path=/trunk/playground/graphics/okular/; revision=595060
2006-10-13 08:13:52 +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
Albert Astals Cid
8beff183b9 add desktop files indicating libokular provides a part for those mimetypes
svn path=/trunk/playground/graphics/okular/; revision=586466
2006-09-19 17:42:02 +00:00
Laurent Montel
3d62f697b2 Clean up
svn path=/trunk/playground/graphics/okular/; revision=566117
2006-07-25 13:08:23 +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
0211c662e9 now that KDjVu works nicely, reduce the debug
svn path=/trunk/playground/graphics/okular/; revision=559952
2006-07-08 17:51:25 +00:00