Commit graph

245 commits

Author SHA1 Message Date
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 bb59c02642 nuke Document::continueLastSearch(), continueSearch(id) is enough
svn path=/trunk/KDE/kdegraphics/okular/; revision=712500
2007-09-14 15:40: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 aaed55f037 extract the DocumentPrivate class in an own file
svn path=/trunk/KDE/kdegraphics/okular/; revision=712493
2007-09-14 15:17:36 +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 f72692799e look for the old kpdf stuff only if the "new okular" stuff is not found
svn path=/trunk/KDE/kdegraphics/okular/; revision=710703
2007-09-10 17:20:58 +00:00
Pino Toscano b56ad8c3ae Change the DocumentObserver::notifySetup() to allow a better tuning of the different setup options (different layout for the pages, or different document).
svn path=/trunk/KDE/kdegraphics/okular/; revision=710227
2007-09-09 10:50:36 +00:00
Pino Toscano 2a29b247f7 save really few bytes
svn path=/trunk/KDE/kdegraphics/okular/; revision=709414
2007-09-07 13:13:50 +00:00
Pino Toscano bf9af4433d move deleteTextSelections() to the private class
svn path=/trunk/KDE/kdegraphics/okular/; revision=708155
2007-09-03 23:47:12 +00:00
Pino Toscano 0d7db7513b save the url of the document to its xml metadata file
svn path=/trunk/KDE/kdegraphics/okular/; revision=708039
2007-09-03 17:53:45 +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
Pino Toscano 0ecdc5b3c6 add the searchId to the searchFinished() signal of the Document, so each search line edit can ignore any search not started by itself
svn path=/trunk/KDE/kdegraphics/okular/; revision=704015
2007-08-23 22:16:37 +00:00
Pino Toscano cd0dd24193 i18n fixes
rename 'freetext' to 'inline note'

svn path=/trunk/KDE/kdegraphics/okular/; revision=701876
2007-08-19 16:15:55 +00:00
Pino Toscano 96bb344e61 cache the free memory on Windows as well
svn path=/trunk/KDE/kdegraphics/okular/; revision=699973
2007-08-14 13:03:38 +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
Pino Toscano 5150419e81 adapt the debug stuff to the new kdebug way:
- 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
2007-07-31 10:19:48 +00:00
Pino Toscano 6254f609d8 really return an int where we are going to return an int, not a bool
svn path=/trunk/KDE/kdegraphics/okular/; revision=694515
2007-07-30 22:29:41 +00:00
Pino Toscano 23337e1c71 move the number of maximum and saved history step into a single location for both
svn path=/trunk/KDE/kdegraphics/okular/; revision=691448
2007-07-23 17:12:20 +00:00
Pino Toscano 0e7aeb2ba8 no need to set a new rotation if it's equal to the currently set
svn path=/trunk/KDE/kdegraphics/okular/; revision=689135
2007-07-17 18:13:50 +00:00
Pino Toscano b41dcfeddc - store a pointer of the owning page in each annotation
- preliminary API for translating an annotation

svn path=/trunk/KDE/kdegraphics/okular/; revision=689133
2007-07-17 18:10:25 +00:00
Pino Toscano 3c009773ca __linux__ -> Q_OS_LINUX
svn path=/trunk/KDE/kdegraphics/okular/; revision=688273
2007-07-15 16:51:23 +00:00
Christian Ehrlicher eff4ffe995 win32 compile++
svn path=/trunk/KDE/kdegraphics/okular/; revision=688272
2007-07-15 16:47:55 +00:00
Pino Toscano b73555b7f3 Windows functions to get the amount of total and free memory.
Patch by Huhn Put, thanks!

CCMAIL: nhuh.put@web.de

svn path=/trunk/KDE/kdegraphics/okular/; revision=688271
2007-07-15 16:43:24 +00:00
Pino Toscano 905f6c0946 int -> qulongqlong for the memory sizes
svn path=/trunk/KDE/kdegraphics/okular/; revision=688263
2007-07-15 16:10:48 +00:00
Pino Toscano fea03a9bbd appName -> catalogName, even for the information we get from the about data
svn path=/trunk/KDE/kdegraphics/okular/; revision=687836
2007-07-14 13:47:11 +00:00
Pino Toscano 5387c50960 Make the Configure backends dialog working, of course if the generators have the proper support for "mutable" configuration.
svn path=/trunk/KDE/kdegraphics/okular/; revision=687065
2007-07-12 20:04:56 +00:00
Pino Toscano 43f83cb967 move the calculation of the number of configurable generators to the Document, and start to store the information about the configurability of a generator
svn path=/trunk/KDE/kdegraphics/okular/; revision=687014
2007-07-12 17:52:14 +00:00
Pino Toscano f76f15470a Add the file size to the document information that the generator may provide.
Avoid crashing if the generators provides no information.

(Implements part (a) of KPDF #140109.)

svn path=/trunk/KDE/kdegraphics/okular/; revision=686290
2007-07-10 23:49:37 +00:00
Pino Toscano ffd5ed0280 the dialog for choosing backend is private, so let its header be _p.h
svn path=/trunk/KDE/kdegraphics/okular/; revision=686276
2007-07-10 22:52:25 +00:00
Pino Toscano f5c216b19c extract the private class of AudioPlayer out of the implementation, so the Document can store the url of the current document;
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
2007-07-10 18:24:18 +00:00
Pino Toscano 964424d62f stop gracefully the font extraction thread when closing a document or the properties dialog; make the thread deleting itself when finished
svn path=/trunk/KDE/kdegraphics/okular/; revision=685437
2007-07-08 21:22:37 +00:00
Pino Toscano 8a31e6f3f0 Allow the user to change the visible part(s) of the document by dragging the visible areas in the thumbnails, and to change the zoom of the document by Ctrl+wheel on them.
Patch by Diego R. Brogna, thanks a lot!

BUG: 135521

svn path=/trunk/KDE/kdegraphics/okular/; revision=685273
2007-07-08 14:25:08 +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 e9b9d78faa acutally save the document information *before* closing the document, otherwise we run into troubles if we access to anything the generator provided
svn path=/trunk/KDE/kdegraphics/okular/; revision=683143
2007-07-04 09:28:31 +00:00
Chusslove Illich 968760cb6c Auto-conversion to new KCmdLineArgs/KAboutData/KComponentData API (trunk/KDE). Watch for the few remaining QString to QByteArray assignments that will not compile without extra specification (typically needs .toLocal8Bit() or .toUtf8()).
svn path=/trunk/KDE/kdegraphics/okular/; revision=682260
2007-07-02 08:52:55 +00:00
Pino Toscano 3addf5ec7d const& for removePageAnnotations()
svn path=/trunk/KDE/kdegraphics/okular/; revision=668564
2007-05-26 19:25:18 +00:00
Pino Toscano 5cbdaa6dc7 some checks more, and small fixes
svn path=/trunk/KDE/kdegraphics/okular/; revision=668054
2007-05-24 22:52:29 +00:00
Laurent Montel 1a6db045cd Don't crash when we don't load file
(generator is null)
(It will better to disable action until we load generator I think)

svn path=/trunk/KDE/kdegraphics/okular/; revision=667872
2007-05-24 09:05:34 +00:00
Pino Toscano 95912893f0 remove compatibility with kpdf pre-kde 3.4
svn path=/trunk/KDE/kdegraphics/okular/; revision=667126
2007-05-21 22:07:28 +00:00
Pino Toscano 92204b4bb7 fix giveAbsolutePath() to properly recognize absolute paths
svn path=/trunk/KDE/kdegraphics/okular/; revision=667073
2007-05-21 19:51:30 +00:00
Pino Toscano 0d320f0b78 SVN_SILENT
use the kde debug system in a kde library

svn path=/trunk/KDE/kdegraphics/okular/; revision=665724
2007-05-17 18:27:25 +00:00
Pino Toscano c4ea50c99b Forwardport SVN commit 665684 by pino:
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
2007-05-17 16:52:44 +00:00
Tobias Koenig 06e831a3c9 Add a new method DocumentInfo::set( enum, QString ) to get more
consistency in the documentation info.

svn path=/trunk/KDE/kdegraphics/okular/; revision=664233
2007-05-13 12:54:46 +00:00
Pino Toscano 8f03f0d0d7 try to lock the pixmap requests queue with a mutex, hoping to solve some of our problems
svn path=/trunk/KDE/kdegraphics/okular/; revision=663991
2007-05-12 21:40:38 +00:00
Pino Toscano 325b8711ea move the setTextSelections, setHighlight and deleteHighlights to the private class of Page, as they are private for now
svn path=/trunk/KDE/kdegraphics/okular/; revision=661486
2007-05-05 18:07:34 +00:00
Dirk Mueller 43a23a2de6 the usual "daily unbreak compilation"
svn path=/trunk/KDE/kdegraphics/okular/; revision=661101
2007-05-04 15:41:04 +00:00
Pino Toscano 6aaefb7f68 "pdf"/"pdf file" -> "document"
svn path=/trunk/KDE/kdegraphics/okular/; revision=660526
2007-05-02 23:06:38 +00:00
Pino Toscano b53ba3cd24 make widget() slightly safier, and pass it as parameter when running an url (closing a TODO item)
svn path=/trunk/KDE/kdegraphics/okular/; revision=660524
2007-05-02 22:56:51 +00:00
Pino Toscano 106e96240c rename (almost) every ActionFoo class to FooAction
exception to this is the ActionDocumentAction, renamed to DocumentAction and whose id is DocAction

svn path=/trunk/KDE/kdegraphics/okular/; revision=660523
2007-05-02 22:50:27 +00:00
Pino Toscano 892df34b19 any negative page number represents an invalid viewport
svn path=/trunk/KDE/kdegraphics/okular/; revision=660436
2007-05-02 18:21:15 +00:00