and implement it in the pdf generator, others welcome to implement the function
for other generators
svn path=/trunk/KDE/kdegraphics/okular/; revision=1114944
Luigi's mail says
********
The attached patch changes a bit the handling of document informations
and the informations shown in the info page.
- document path is added to the information and a button allows you to
toggle between to file name (default) and the complete path;
- the number of the page is added to the information set by
documentInfo() and not by the properties dialog (so the latter will not
modify datas);
- the order of the information shown is the fixed now (see
orderedProperties).
*********
Then there are a few things of my own since some const here and there and adding three values to Key enum
Also it fixes wish 208999
BUGS: 208999
svn path=/trunk/KDE/kdegraphics/okular/; revision=1049872
This allows a resolution, if set, of that named destination when opening a document.
CCBUG: 192032
svn path=/trunk/KDE/kdegraphics/okular/; revision=967542
(fixes potential crash because of references to potentially non-existing pages in the next open document)
svn path=/trunk/KDE/kdegraphics/okular/; revision=923020
fix crash when activating some of the toc items in the testcase of #176513 (still it would be nice to know why they are "void" items"...)
svn path=/trunk/KDE/kdegraphics/okular/; revision=890803
Few missing to be done in it:
- more checks when saving
- make it use a proper mimetype
CCBUG: 151614
svn path=/trunk/KDE/kdegraphics/okular/; revision=884597
- when there are no backends for handling the document mimetype, try harder using the mimetype from the file content only
- when the backend fails loading, try again with the backend that handles the mimetype of the file content
BUG: 166034
svn path=/trunk/KDE/kdegraphics/okular/; revision=881991
Provide ways to register & unregister the view from a Document, and to get/set the view capabilities.
svn path=/trunk/KDE/kdegraphics/okular/; revision=801657
Trigger its execution at the document loading, if there are "top level" scripts,
and when a script action is activated.
svn path=/trunk/KDE/kdegraphics/okular/; revision=796637
Works pretty well -- the only problem left is that when changing the search direction, the first match is the current match.
svn path=/trunk/KDE/kdegraphics/okular/; revision=785629
On the Document/Generator side, introduce a proper interface for the purpouse.
On the GUI side, add a new "Save As" function that save the changed document to a location.
The action is enabled only if the current backend can provide the functionality.
svn path=/trunk/KDE/kdegraphics/okular/; revision=784661
This way we can tell to "merge" in a smart way the new pixmap request with the enqueued ones of the same ID.
Add a (private) slot to refresh all the pixmaps of a page.
svn path=/trunk/KDE/kdegraphics/okular/; revision=783259
[the compressed versions are not in the "generator" .desktop files because okular can deal natively with any gzip- or bzip2- compressed version of the supported document types]
svn path=/trunk/KDE/kdegraphics/okular/; revision=755661
- 0..n-1 are the page indexes again
- -1 is for the fonts not reall belonging to a single page (or when no selective page extraction can be done)
svn path=/trunk/KDE/kdegraphics/okular/; revision=753866
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
* Add FilePrinter class to enable printing via postscript files
* DJVU, PDF, and PS backends print FilePrinter
* All backends enable printing of bookmarked pages
* Print and Print Preview actions enabled/disabled depending on backends
printing ability
Note that FilePrinter only works on *NIX platforms with Cups, lpr, or lp.
svn path=/trunk/KDE/kdegraphics/okular/; revision=741990
This also fixed the problem of the lost rotation when reloading because of document change.
CCBUG: 151130
svn path=/trunk/KDE/kdegraphics/okular/; revision=731697
*** 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
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
- 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
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
* 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
- make the output looking more or less like before (using nospace() or removing the spaces)
- remove endl and '\n' at the end of debug outputs
- fixing the QDebug operator<<'s around
- isolate the debug area number of the core into a separate header, and apply it instead of the numbers found in textpage.cpp
svn path=/trunk/KDE/kdegraphics/okular/; revision=694667
Avoid crashing if the generators provides no information.
(Implements part (a) of KPDF #140109.)
svn path=/trunk/KDE/kdegraphics/okular/; revision=686290
disable the playing of external sounds for remote (non-local) documents;
simple compile fix in the embedded sound paying code
svn path=/trunk/KDE/kdegraphics/okular/; revision=686133
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
When getting the result of a pixmap request for an observer that went away in the meanwhile, don't create a memory entry for the pixmap, as we assume the allocated pixmaps fifo holds only descriptors for valid observers.
(fixed KPDF #143951)
svn path=/trunk/KDE/kdegraphics/okular/; revision=665685
exception to this is the ActionDocumentAction, renamed to DocumentAction and whose id is DocAction
svn path=/trunk/KDE/kdegraphics/okular/; revision=660523
Give KMessageBoxes a parent widget.
DVI plugin is missing 4 messageboxes, some work has to be done to get them know the document() so they can call widget()
svn path=/trunk/playground/graphics/okular/; revision=648175
This removes the needs for Page to be a QObject (it's the PageController that connects to the jobs and emits the right signals), so it again a "cheap" object.
svn path=/trunk/playground/graphics/okular/; revision=646010
At the moment is quite simple and works only for external sounds.
Activate the sound playing when processing links and when switching pages in presentation mode only.
svn path=/trunk/playground/graphics/okular/; revision=630315
- 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
Add fillConfigDialog() and supportedMimeTypes() to the Document, so the Part can get all the info it needs with no need to own the generator structure.
This also loads all the generators when asking for their config widget, but that can be improved easily now; furthermore, all the generators used to load documents are kept.
svn path=/trunk/playground/graphics/okular/; revision=627909
BUG: 140189
Tobias, any better solution than the previous situation?
CCMAIL: tokoe@kde.org
svn path=/trunk/playground/graphics/okular/; revision=624631
$ 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
Thus, if an observer requests eg pixmap for pages 2 and 3, now they are generated in the correct order the observer specified, and not in the reversed one.
Then, revert part of r619673, as the order is fixed now.
svn path=/trunk/playground/graphics/okular/; revision=619810
* 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
Adding a BookmarkManager class that takes care of handling them in a proper way.
Adding a new tab in the sidebar to manage them:
- shows all the bookmarks in all the documents, or just in the current document
- cliking on a bookmark will bring to that bookmark, loading the document if necessary
- editing a bookmark title is possible either using F2 or right click -> Rename
- right click -> Remove to remove a bookmark
The only way to add new bookmark for the moment is the "old" way, ie right click -> Add bookmark, and it's not possible add more than one bookmark per page (but the system does not limit that).
The whole system should not be too difficult to understand, I will check with our usability master Florian next days.
svn path=/trunk/playground/graphics/okular/; revision=616979
Fixing also the text extraction when using the rectangular selection across two or more pages.
svn path=/trunk/playground/graphics/okular/; revision=616264
* removed NotifyRequest, that looked more like a hack than a solution
(see comment in ghostscript generator)
svn path=/trunk/playground/graphics/okular/; revision=608235
* getAnnotations() -> annotations()
* setBookmark()/hasBookmark() -> setBookmarked()/isBookmarked()
* moved as much private API of Page as possible to private class
svn path=/trunk/playground/graphics/okular/; revision=607233
abbreviations for its items.
Replaced the 'bool strictCase' parameter of Page::findText
with 'Qt::CaseSensitivity caseSensitivity' for better readable code.
svn path=/trunk/playground/graphics/okular/; revision=607203
Page::setSearchPage( TextPage* );
Page::hasSearchPage();
with
Page::setTextPage( TextPage* );
Page::hasTextPage();
to make the API clearer. The TextPage is not only used for
searching but also for extracting selected text, so the term
'search' is confusing...
svn path=/trunk/playground/graphics/okular/; revision=607195
* 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
THe system generally works; what is missing is a good activating strategy (added in TODO - our usability expert is working on that), and a GUI to configure the editor.
The DVI backend was adapted to use this new feature.
(The PDF backend will use it soon.)
svn path=/trunk/playground/graphics/okular/; revision=605708
* 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
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
* 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
It's only reported in case it makes sense for the format
Only implemented for pdf atm
If all pages have the same size it's reported on document properties
else there's a label shown in the new bottom bar with the size of the current page
svn path=/trunk/playground/graphics/okular/; revision=595822
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
* putting it in an own view mode
* associating the selection to every page
* using a better algorithm to calculate the selection, even in a page range
* moving its drawing from the page view to the page painter, so it's possibile to draw it just like it's done with eg annotations
Other changes (more or less related):
* moved the annotation popup to a better place, so it won't interfere with annotation drawing
* commented some debug code in TextPage
svn path=/trunk/playground/graphics/okular/; revision=588795
Fix bug 133507 that prevented the correct restoring of the document viewport on session restore for remote documents
svn path=/trunk/playground/graphics/okular/; revision=584932