Commit graph

67 commits

Author SHA1 Message Date
Pino Toscano 66376cf31f make swap() private
svn path=/trunk/KDE/kdegraphics/okular/; revision=744918
2007-12-04 21:36:32 +00:00
Pino Toscano 5b01430bb0 remove internal aboutdata+componentdata of the generator, now it's handled by the plugin system
svn path=/trunk/KDE/kdegraphics/okular/; revision=744197
2007-12-02 22:55:12 +00:00
Pino Toscano 6aa123656a Port the plugin system to the standard KDE factory and loader, getting rid of the custom system okular had so far.
This requires a generator to have a
  MyGenerator(QObject *parent, const QVariantList &args)
constructor in order to be successfully loaded.
The OKULAR_EXPORT_PLUGIN macro was adapted, and the generators to provide it the about data; the protected Generator::setAboutData() is no more needed.

Remove the 'lib' prefix from plugins, unneeded now.

CCMAIL: okular-devel@kde.org

svn path=/trunk/KDE/kdegraphics/okular/; revision=744169
2007-12-02 20:57:24 +00:00
Pino Toscano d3f4460d38 add icon for the pdf export format
svn path=/trunk/KDE/kdegraphics/okular/; revision=741369
2007-11-25 14:48:54 +00:00
Pino Toscano 6e37c43c8d don't print the debug stuff between " and "
svn path=/trunk/KDE/kdegraphics/okular/; revision=732875
2007-11-04 23:33:05 +00:00
John Layt 070285e039 Port from KPrinter to QPrinter, remove dependency on KDE4_KDEPRINT_LIBS.
*** Note this is not a complete port, most of the generators use the 
printFiles method which Qt 4.3 does not support, these have simply
been commented out until we find a solution.  At least it removes
the dependency so we can remove from kdelibs.

svn path=/trunk/KDE/kdegraphics/okular/; revision=725660
2007-10-15 23:01:27 +00:00
Pino Toscano 4060ef669e Make the document closing a bit more safe wrt internal threading - the closing waits for the background threads, to avoid aving them running with stale stuff.
This affects all the generators that use the internal generator threading, own threading models have to be fixed properly.

svn path=/trunk/KDE/kdegraphics/okular/; revision=723161
2007-10-08 21:49:27 +00:00
Pino Toscano 15155d8824 Rename the virtual closeDocument() to doCloseDocument(), and make it protected.
Added a non-virtual closeDocument() in the base Generator class: this way, particular closing routines can be implemented in the "low level" of a generator.
Apart the renaming, the logic of doCloseDocument() remains the same.

CCMAIL: okular-devel@kde.org

svn path=/trunk/KDE/kdegraphics/okular/; revision=723046
2007-10-08 16:46:51 +00:00
Pino Toscano d51e9fa4d8 remove the private methods of PixmapRequest, and make the Document work with its private class
svn path=/trunk/KDE/kdegraphics/okular/; revision=719319
2007-09-30 21:44:31 +00:00
Pino Toscano 684b146867 SVN_SILENT explicitely initialize the base class
svn path=/trunk/KDE/kdegraphics/okular/; revision=715948
2007-09-23 15:09:27 +00:00
Pino Toscano 4dcadf5544 Add a mutex in the base generator class, so any generator that wants a mutex can use it.
Adapt the poppler and the chm generator to use it instead of the own.

svn path=/trunk/KDE/kdegraphics/okular/; revision=712821
2007-09-15 11:35:53 +00:00
Pino Toscano 78e2377a87 Add a method for generators to know some metadata of the document
adapted the poppler and the chm generators to use that, instead of fiddling with the settings class

svn path=/trunk/KDE/kdegraphics/okular/; revision=712614
2007-09-14 22:16:00 +00:00
Pino Toscano f8ed5302ec - move the Document::requestDone() to the private class, as it's something internal to the generator work
- make the Generator internally keep an pointer to the private class Document, so we can access easily to the Document' stuff

svn path=/trunk/KDE/kdegraphics/okular/; revision=712498
2007-09-14 15:29:16 +00:00
Pino Toscano 006111382b common d_ptr+q_ptr structure for Generator/TextDocumentGenerator, and their private classes
svn path=/trunk/KDE/kdegraphics/okular/; revision=712465
2007-09-14 13:31:55 +00:00
Pino Toscano a8d747745f Cleanup a bit the GuiInterface, and making it work.
Instead of manually requestion actions and other stuff, we just make the interface as gui client, requesting and integrating it in the part gui.
Also, rename the Generator's componentData() to ownComponentData() to avoid clashing with KXMLGUIClient.

svn path=/trunk/KDE/kdegraphics/okular/; revision=705933
2007-08-28 23:17:00 +00:00
Albert Astals Cid 41c25cb208 Back from holiday, let's do some comitting :-)
* Update some copyright years and mail addresses
 * Search does not block the GUI anymore YUHUUUUU
   Well, it it does but it's almost unperceptible, that means the searching methods of Document no longer return a bool but a void and the Document::searchFinished signal is used to know if something was found, nothing was found or the user pressed the cancel button !YES! one can cancel search now :-)
 * TextPage no longer holds the area and the current transformed area, it took TOO MUCH memory, now we transform the area each time, it's much more CPU intensive but i could not measure a time loss while searching big documents and i could measure HUNDREDS of MB of usage less.
 * MICRO optimization: Change some code to not detach some containers
 * I still don't have ADSL so this is something like a "blind" commit, Pino will check it compiles against current KDE, not against what's on my computers

svn path=/trunk/KDE/kdegraphics/okular/; revision=699701
2007-08-13 22:25:27 +00:00
Thiago Macieira 000dc825e3 Use QDebug instead of kdbgstream
svn path=/trunk/KDE/kdegraphics/okular/; revision=694533
2007-07-30 23:58:04 +00:00
Pino Toscano e5037f45b1 Refator a bit the way Document and the generators use to read the font information from a document.
Instead of having a synchronous function that extracts all the information at once, use a function to read the fonts of a single page.
This way, we can get all the result step by step (aka page by page), and possibly in an asynchronous way.
The resuls of the font "scanning" are sent via signals, as well the end of the work.
So, instead of block waiting for the results of all the document at once, the Fonts tab in the properties dialog can have a progress bar with the progress, and the results (the fonts) that are added incrementally to the list.

Only two minor things are left:
- the process is always asynchronous at the moment, as the only generator that can provide this kind of information is the Poppler one (safe)
- there is no check for duplicate fonts
But they should be easy to solve.

svn path=/trunk/KDE/kdegraphics/okular/; revision=685002
2007-07-07 20:35:01 +00:00
Pino Toscano 2e024d6d96 generalize a bit more the way for constructing "standard" ExportFormat's
svn path=/trunk/KDE/kdegraphics/okular/; revision=656426
2007-04-21 11:09:41 +00:00
Pino Toscano fc97f3b23b on demand creation of the auxiliary threads
svn path=/trunk/KDE/kdegraphics/okular/; revision=656230
2007-04-20 17:59:12 +00:00
Pino Toscano 9134ad4669 make the Document access to the private class of Generator, so we can get rid of the public setDocument
svn path=/trunk/KDE/kdegraphics/okular/; revision=656222
2007-04-20 17:26:04 +00:00
Pino Toscano 166ba5b87a move the Generator::Private to a GeneratorPrivate, and move the implementations of the provate threads to a cpp
svn path=/trunk/KDE/kdegraphics/okular/; revision=656221
2007-04-20 17:17:44 +00:00
Albert Astals Cid 0d47b62715 krazy include order issues
svn path=/trunk/KDE/kdegraphics/okular/; revision=655893
2007-04-19 18:30:20 +00:00
Pino Toscano df5b2c3329 make ExportFormat implicitely shared, especially because it's mostly a "read-only" class
svn path=/trunk/KDE/kdegraphics/okular/; revision=653196
2007-04-12 20:43:37 +00:00
Pino Toscano 1117200950 constness for document()
svn path=/trunk/playground/graphics/okular/; revision=643431
2007-03-17 12:11:41 +00:00
Pino Toscano 6ea5badeab don't try to start a text extraction thread if the generator does not extract text
svn path=/trunk/playground/graphics/okular/; revision=641458
2007-03-11 12:05:48 +00:00
Pino Toscano 1bfc805a3e it does not make much sense to check for a serie of permissions at the same time, so just check one permission at a time
svn path=/trunk/playground/graphics/okular/; revision=641341
2007-03-10 23:59:11 +00:00
Pino Toscano 2ef46f8d90 simplify a bit the export action creation code
svn path=/trunk/playground/graphics/okular/; revision=641313
2007-03-10 21:32:09 +00:00
Pino Toscano 1316811082 Cache the export formats, so we can know better if the text/plain formst is supported by the backend (and act accordingly).
svn path=/trunk/playground/graphics/okular/; revision=641302
2007-03-10 20:51:50 +00:00
Pino Toscano fd7434c95a Add support for custom generator about data (and potentially for custom configuration).
svn path=/trunk/playground/graphics/okular/; revision=640348
2007-03-07 18:15:00 +00:00
Tobias Koenig 0847edc4b7 Add a second parameter to requestTextPage/generateTextPage where you can
specify whether the request should be synchronous or asynchronous

svn path=/trunk/playground/graphics/okular/; revision=628893
2007-01-31 21:10:00 +00:00
Pino Toscano ef55f74682 lazy creation of the generation threads within Generator, so generators that don't make use of the builtin thread don't create a pair of unused threads
svn path=/trunk/playground/graphics/okular/; revision=628860
2007-01-31 18:50:31 +00:00
Pino Toscano 92ea1bba69 Last step of the ThreadedGenerator -> Generator merge: remove the old files and rename the used file.
svn path=/trunk/playground/graphics/okular/; revision=628856
2007-01-31 18:41:21 +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 55dfb87f3f simplify a bit the Feature system: move it to the base Generator class, and add a protected method to switch a feature on and off easily - no more need to copy&paste hasFeature() anymore
svn path=/trunk/playground/graphics/okular/; revision=627450
2007-01-26 16:35:30 +00:00
Tobias Koenig d94f0e507e Add support for threaded extraction of text pages, now we just have to
adapt the generators and the document class, which is 95% of the work ;)

svn path=/trunk/playground/graphics/okular/; revision=626843
2007-01-24 18:27:54 +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 4f6666d509 also the page size is a feature, so thread it as such (and remove supportsPageSizes())
svn path=/trunk/playground/graphics/okular/; revision=624686
2007-01-17 18:02:53 +00:00
Pino Toscano 135a18b407 get rid of supportsSearching() by using a proper feature
svn path=/trunk/playground/graphics/okular/; revision=624587
2007-01-17 11:58:20 +00:00
Pino Toscano 468a0da775 bye bye canGenerateTextPage(), unused nowadays
svn path=/trunk/playground/graphics/okular/; revision=624579
2007-01-17 11:34:47 +00:00
Pino Toscano 24ec1e37c5 Add the ability to read from standard input, eg
$ command_that_produce_a_document | okular -
Expand a but the Generator API so a generator can directly read from the raw data read from stdin. Generators that can not read from raw data will open the temporary file with the saved data.

svn path=/trunk/playground/graphics/okular/; revision=622774
2007-01-12 22:49:14 +00:00
Pino Toscano 18fab3d130 Improve the way we deal with generators that give the possibility to change the size of the pages: instead of let them destroy and recreate the pages (bad), ask them the sizes they support, then do the work ourselves and notify the generator when the work is done.
While I was at it, I changed from "paper size" to "page size", it should be better.

svn path=/trunk/playground/graphics/okular/; revision=620411
2007-01-05 23:12:06 +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 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 2aa8a4c31b Moved SourceReference into its own file
svn path=/trunk/playground/graphics/okular/; revision=619076
2007-01-02 17:45:32 +00:00
Pino Toscano 915a48eb4d move the Generator configuration stuff into a new ConfigInterface
svn path=/trunk/playground/graphics/okular/; revision=619061
2007-01-02 17:14:37 +00:00
Pino Toscano d9a844d67c move the GUI stuff out of Generator in an own GuiInterface, and adapt the ghostscript generator to its usage; renamed also some methods to more Qt4-ish names.
svn path=/trunk/playground/graphics/okular/; revision=619044
2007-01-02 16:40:22 +00:00
Pino Toscano 475d000763 Improve the way a Generator can configure a printer: add an interface with the advanced printing stuff.
The print() method remains in Generator, as it's too basic to be moved in an interface.

svn path=/trunk/playground/graphics/okular/; revision=619033
2007-01-02 16:11:40 +00:00
Pino Toscano 94c9ffa3d7 do not explicitely include document.h in generator.h
svn path=/trunk/playground/graphics/okular/; revision=617283
2006-12-28 16:45:50 +00:00