Commit graph

186 commits

Author SHA1 Message Date
Albert Astals Cid 5365f79d6d fordwardport r648173 kpdf/branches/KDE/3.5/kdegraphics/kpdf/ (4 files in 3 dirs):
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
2007-03-30 17:46:50 +00:00
Pino Toscano f55c401b20 Refactor the document search interfaces, as discussed on the mailing list.
Merge the search in normal mode and the type-ahead in a search bar that appears on the bottom of the page view. This should work nicely.
In presentation mode, add a small floating search toolbar that takes care of searching during the presentation mode, on document request. This is not working yet, but basically most of the work is done.

Please test and report any problems you find.

CCMAIL: okular-devel@kde.org

svn path=/trunk/playground/graphics/okular/; revision=643607
2007-03-17 22:58:41 +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 bc8036dc62 they are constant methods, so let them be 'const'
svn path=/trunk/playground/graphics/okular/; revision=641248
2007-03-10 17:25:14 +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
Pino Toscano ca2a0e194d SVN_SILENT spell check
svn path=/trunk/playground/graphics/okular/; revision=630468
2007-02-05 13:50:36 +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 10a6e3943e SVN_SILENT small #include cleanup
svn path=/trunk/playground/graphics/okular/; revision=627931
2007-01-28 16:47:13 +00:00
Pino Toscano d6e7010942 Refactor a bit the way we load the generator libraries: hide the hash with the Generator completely into the Document, so the Document have the complete control over them.
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
2007-01-28 15:46:10 +00:00
Tobias Koenig 5069b62a80 Make PixmapRequest::swap() public but mark it for internal usage.
svn path=/trunk/playground/graphics/okular/; revision=624665
2007-01-17 16:50:54 +00:00
Pino Toscano e0e8803092 A bit ugly hack to make it compile better.
BUG: 140189

Tobias, any better solution than the previous situation?
CCMAIL: tokoe@kde.org

svn path=/trunk/playground/graphics/okular/; revision=624631
2007-01-17 14:20:00 +00:00
Pino Toscano c1dc76485a DOX: slightly improve apidox generation
SVN_SILENT


svn path=/trunk/playground/graphics/okular/; revision=623061
2007-01-13 22:55:00 +00:00
Pino Toscano afc18f9d97 Re-add the possibility to toggle a page bookmark quickly (ie with the popup menu).
svn path=/trunk/playground/graphics/okular/; revision=622945
2007-01-13 14:45:51 +00:00
Pino Toscano 91b7675c14 configurationWidget() is too generic -> rename to printConfigurationWidget()
svn path=/trunk/playground/graphics/okular/; revision=622782
2007-01-12 23:48:29 +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 ac792e5c9c Fixed krazy issues
svn path=/trunk/playground/graphics/okular/; revision=619843
2007-01-04 15:22:28 +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 77efd7dcb1 Cleaned up the Document API, moved all private members/methods/slots into
the d class.

svn path=/trunk/playground/graphics/okular/; revision=619100
2007-01-02 19:05:49 +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 b6fdedc810 spell checking
svn path=/trunk/playground/graphics/okular/; revision=617287
2006-12-28 16:58:56 +00:00
Pino Toscano 017c98a5a9 improve EmbeddedFile apidox
svn path=/trunk/playground/graphics/okular/; revision=617282
2006-12-28 16:28:28 +00:00
Pino Toscano 539921bdf6 Improving the bookmark capabilities of okular.
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
2006-12-27 16:04:49 +00:00
Pino Toscano b7328d7234 add an handy DocumentViewport::isValid() and use it where possible instead of doing checks manually
svn path=/trunk/playground/graphics/okular/; revision=616667
2006-12-26 12:26:49 +00:00
Tobias Koenig 9969547b0c * observer API cleanup
* removed NotifyRequest, that looked more like a hack than a solution
  (see comment in ghostscript generator)

svn path=/trunk/playground/graphics/okular/; revision=608235
2006-11-27 08:12:39 +00:00
Tobias Koenig 14d6515b16 Changed the enum SearchDir to SearchDirection and use less strange
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
2006-11-23 16:54:28 +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 274469dae8 Almost complete support for inverse search within okular.
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
2006-11-17 22:15:15 +00:00
Pino Toscano 1285f20c21 be able to remove more than one annotation at once (and notify the observers only one)
svn path=/trunk/playground/graphics/okular/; revision=600979
2006-11-01 15:17:22 +00:00
Pino Toscano 2bd05e79d5 a generator can not block the gui events of the main page view, otherwise bad things will happen - it's also not really logic to allow such a thing, better think about something else if a generator wants to interact with the gui somehow
svn path=/trunk/playground/graphics/okular/; revision=600225
2006-10-29 22:33:24 +00:00
Pino Toscano 8def2109ec change the metaData() function of the Generator to use QVariant as type for the returned value and for the 'option' parameter, this gives more flexibility
svn path=/trunk/playground/graphics/okular/; revision=599847
2006-10-28 19:18:36 +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 2fdca9ed0e old stuff
svn path=/trunk/playground/graphics/okular/; revision=597610
2006-10-20 23:25:07 +00:00
Albert Astals Cid 5143cd2512 Report page size
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
2006-10-15 19:37:14 +00:00
Pino Toscano 42310e184c Restructuring a bit how the text-editor-like selection works:
* 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
2006-09-26 22:22:01 +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
Tobias Koenig 4cb4c1c86b Add convenience ctor
svn path=/trunk/playground/graphics/okular/; revision=586703
2006-09-20 11:44:58 +00:00
Albert Astals Cid 4e04b301f1 Almost foget to fordwardport r582561
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
2006-09-15 21:08:48 +00:00
Tobias Koenig 5bfa5435a8 URL -> url renaming to reimplement the correct KPart::openUrl()...
svn path=/trunk/playground/graphics/okular/; revision=578859
2006-08-30 13:02:48 +00:00
Chu Xiaodong e207d0d6f4 Note&TextBox annotation remove operation enabled
svn path=/trunk/playground/graphics/okular/; revision=571630
2006-08-10 06:32:03 +00:00
Chu Xiaodong 3f81e3788f Free TextAnnotation,pop-up window and annotation properties dialog added.
svn path=/trunk/playground/graphics/okular/; revision=571124
2006-08-08 15:31:13 +00:00
Pino Toscano e3825a2870 Forward port SVN commit 561026 by aacid:
finally commit patch by Mary Ellen Foster to implement wish 109078
Incidentally also implements wish 127382
Sorry for having taken so long.

svn path=/trunk/playground/graphics/okular/; revision=561300
2006-07-11 19:57:17 +00:00
Pino Toscano b3a4b27956 New skeleton for giving the generators the possibility to export the document they open in some format they support.
The text exporting option is detached from that other options and always visible (disabled if not supported), so it could be easier for the user to find it out.

svn path=/trunk/playground/graphics/okular/; revision=556922
2006-07-01 22:17:53 +00:00
Pino Toscano cd81b54d63 Show the current viewport in the thumbnail view, with a read contour.
svn path=/trunk/playground/graphics/okular/; revision=554363
2006-06-23 21:11:52 +00:00
Pino Toscano 60eab90248 small API changes to Generator:
- more const'ness in signals
- no need to redeclare the signals in the generators, as they are already in Generator

svn path=/branches/work/kde4/playground/graphics/okular/; revision=549941
2006-06-10 12:59:09 +00:00
Albert Astals Cid cb7ca95e94 pages have orientation
document has a rotation to apply over the page's own orientation
text search really works now when rotating (at least all my tests here worked)

svn path=/branches/work/kde4/playground/graphics/okular/; revision=547644
2006-06-02 20:42:57 +00:00
Albert Astals Cid 13dde4096f use the nice code brad wrote for poppler that allows you to extract embedded files from a pdf document.
svn path=/branches/work/kde4/playground/graphics/okular/; revision=545966
2006-05-28 16:54:54 +00:00
Pino Toscano 91dc3ef06c move the searchIDs in document.h, like it's done for the observerIDs
svn path=/branches/work/kde4/playground/graphics/okular/; revision=545944
2006-05-28 15:54:48 +00:00
Pino Toscano aca01f331f Support for visibility in oKular; oKular compiles and links, but it seems no plugins are found.
At the moment, the exported classes are only the one needed to make oKular and its actual plugins link, nothing more. Probably some other classes could be made visibile, but I'm not an expert about that.

svn path=/branches/work/kde4/playground/graphics/okular/; revision=538771
2006-05-08 20:12:04 +00:00
Albert Astals Cid b412aba1f1 more proting, area.h still resists me
svn path=/branches/work/kde4/playground/graphics/okular/; revision=520833
2006-03-20 22:51:56 +00:00
Albert Astals Cid 6987b83b6a a bit of porting area.h is giving me lots of problems
svn path=/branches/work/kde4/playground/graphics/okular/; revision=520829
2006-03-20 22:40:11 +00:00
Piotr Szymanski 4387e1489e - GIGANTIC 2700 line diff with LOTS OF FEATURES!
- 1. editor-like text selection, and I do mean it, its not pseudo-editor 
  (like the ones acroread and kviewshell have) it doesnt intersect the 
  selection area with words under it, no, it does a lot more, including 
  work on cursors and searching for the text area closest to the given
  cursor
- 2. rotation support, change the orientation of the documents if 
  you need too :)
- 3. the kfaxview backend works beautifully, porting kviewshell backends
  is damn easy ! djvu and dvi will be next!
- 4. Hardware Blending of selection rectangles! We now use XRender 
  instead of KImageEffect, makes a damn faster blend!
- 5. Overview mode - as seen in Kviewshell, but quite a bit extended, 
  the kviewshell is only one state, while we support it in both 
  continous and non-continous form
- BTW. I coded all those features myself, (apart from kfaxview backend library)
  it is an impressive bit right? but oKular cant be run by only one person, 
  join in on the fun! i can introduce you into the code just mail niedakh@gmail.com


svn path=/trunk/playground/graphics/oKular/kpdf/; revision=509871
2006-02-15 18:54:49 +00:00
Piotr Szymanski d09fd28b89 - MERGE KPDF 3.5 CHANGES
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=477586
2005-11-04 11:59:51 +00:00
Piotr Szymanski 3cbcb2fb7f - update openDocument and freegui stuff
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=455516
2005-08-31 18:13:59 +00:00
Piotr Szymanski 34b8e28322 - Page/Link: tooltips for links backported
- Page: rotation does not switch height and width
- Document/Part/Generator:
  1. Add API for attaching stuff to the interface: ActionCollection and the Navigation Panel
     also add possibility to merge an XML .rc file with menu layout. Relevant functions are:

     QString Generator::getXMLFile(), returns a QString with your .rc file name.
     void  Generator::setupGUI (KActionCollection* , QToolbox* ), add your components to the user interface

  2. Supporting backend settings:
     If during startup, backends which provide a configuration ([X-KDE-oKularHasInternalSettings]
     set to true) are found, a menu item: configure backends is created, clicking on it results in
     loading all the generators that have settings, but not those that dont. the Generator::addPages(KConfigDialog *dlg)
     function should be overloaded by a generator and dlg->addPage should be used to add pages.

     If a user opens a file that needs an already loaded generator, the already loaded one is used instead of loading another.

  3. Error/Warning/Notice sending support, to send a notice/error/warning, add a relevant notice/error/warning(QString& txt ,int duration)
     to the generator class, and sending a message to the user is as simple as emitting a signal!

  4. Intercepting of events generated by the PageView is done by Generator::handleEvent(QEvent*), subclass it, do a switch on QEvent::type(), handle your
     event and return true if pageview is to proceed with its handling or false if not.

  5. Support configuring the KPrinter on the generator side, use Generator::canConfigurePrinter(), return true there, and you get a nonconfigured KPrinter in your
     Generator::print()

  6. PixmapRequest handling update:
     a.) Generator::canGeneratePixmap is now Generator::canGeneratePixmap(bool async)
     b.) Document::sendGeneratorRequests is a slot now
     c.) Old way of sending pixmaps (Document::requestPixmaps(QValueList<PixmapRequest*> checking if we can generate pixmap if not, waiting for receiving)
         is replaced with: requestPixmaps only queues the pixmap all checking if w can generate is done in sendGeneratorReqest, the sendGeneratorRequest is
         run in three places:
         1.  in requestPixmaps when we receive a request
         2.  in requestDone if pixmapStack is not empty
         3.  sendGeneratorRequest, apart from removing invalid requests, takes the current request and if generator canGeratePixmap(request->async)
        it removes the pixmap from stack and sends to generator if not, QTimer::singleshots to itself after 20ms, it ends when stack has no valid pixmap request

  7. Added a commented out zoom field to PixmapGenerator, mightcome in handy sometime

- TextPage: add instructions that handle simplyfing the RegularAreaRect, no more double painted borders in selection rectangles, this rocks.


svn path=/trunk/playground/graphics/oKular/kpdf/; revision=445196
2005-08-10 16:14:39 +00:00
Piotr Szymanski 81bb03b454 - added suport for changing rotation of the current document, looked at ghostview code, on how to do it
still i implemented all of this myself, damn ghostview is making me lose all the joy i had in working
  on okular, working with such a badlyu document API like libgs has i just killing me...

svn path=/trunk/playground/graphics/oKular/kpdf/; revision=437094
2005-07-20 22:28:23 +00:00
Piotr Szymanski 36ab5c8965 - make generators plugins by:
* moving all xpdf stuff from core and part to inside generator_pdf
   * adding abstract KPDFText class and KPDFTextEntity to hold either
     glyph, or word or textline
- support for importing PS files as pdf like on annots branch
- synced with annots branch
- abstract text layer with search for words in different lines
- added RegularArea<NormalizedShape,Shape> template class
  which inherits QValueList<NormalizedShape*> and is used
  to hold regular areas of given shape (finite collections of the shape)
- loading of relevant generators via ktrader for given mimetype
- the deliverables 1 and 2 of my SoC proposition are delivered
  next: 1. fix one spotted regression and 2. code ghostview backend


svn path=/trunk/playground/graphics/oKular/kpdf/; revision=434883
2005-07-15 18:20:57 +00:00
Enrico Ros bd81ccaed7 merged patch_064,065,066,068,075,091,092 (tinyurl.com/8t5ec)
svn path=/branches/kpdf/annotations/kdegraphics/kpdf/; revision=428594
2005-06-24 16:45:25 +00:00
Enrico Ros 5fa94e1643 merging patch_080,085
svn path=/branches/kpdf/annotations/kdegraphics/kpdf/; revision=425031
2005-06-13 17:39:58 +00:00
Enrico Ros 8f4104a99a merge (refactored) patch_050,051,060
svn path=/branches/kpdf/annotations/kdegraphics/kpdf/; revision=424991
2005-06-13 15:46:23 +00:00
Enrico Ros 2f3f5cca36 merged patch042,043
svn path=/branches/kpdf/annotations/kdegraphics/kpdf/; revision=424893
2005-06-13 11:53:47 +00:00
Enrico Ros e5ed6251a6 Implemented PDF:FullScreen and Close action to KPDF 'Presentation' and
'EndPresentation' actions. Based on testcase by Mikolaj.

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=403726
2005-04-07 09:53:15 +00:00
Albert Astals Cid 99a10e1841 All fixes done in HEAD come to annotations branch
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=395067
2005-03-05 15:59:15 +00:00
Enrico Ros b2ed18c67b Added google-like searches on thumbnailslist (in fact the controller is the
SearchWidget). Splitted SearchType::GoogleLike in GoogleAll and GoogleAny
  to mark pages if all words are present or at least one is present resp.
--TODOs;

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=391354
2005-02-20 16:04:40 +00:00
Enrico Ros fbc7d45083 Adding support for annotations in framework. Only need to add and
implement annotations now (and create the save/load procedure).

Annotations: converging to a stable Annotation definition. Changed a bit
  the paint functions. Added a first 'template' annotation, a simple
  pen-like segments recorder for framework testing purposes only. This
  has events filters in place and the rough paint function implemented.

PageView: removed the MouseEdit mode and using that button for toggling
  the editToolBox instead. Added Annotation support. When the Annotation
  is created, all pageView events flow through that new object. Repaint
  of damaged/old areas is done internally and is based on the geometry
  of the annotation we're creating. When an Annotation is complete, it
  is reparented to the Page that adds it to its internal list.
  From that point on the annotation will be rendered by pagePainter
  using the pixmap-based paint function provided by the annotation
  itself.

PagePainter: draws annotations stored in pages when rendering (using the
  'rought paint function' till the good pixmap based one will be in
  place.

Page: added preliminary support for adding Annotation(s) to the page
  and deleting them all.

Document: added the pass-through call to add an Annotation to the Page
  and notify observers.

PageViewToolbox: can be draged and attached to any side. Position is
  remembered between runs (choose your side and that the toolbox will
  always be there). Available on Right and Bottom sides too. Emits -1
  when the current tool is deselected.

Misc: added Annotations to both the 'observers changed flags' and the
  'pagepainter' ones and updated ui classes accordingly.

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=390638
2005-02-18 18:24:45 +00:00
Albert Astals Cid bc1806e218 - Do not reattach the dcop client
- Keep the original url on the document so we can open relative file names
 - Add Enrico and my copyright

svn path=/trunk/kdegraphics/kpdf/; revision=386244
2005-02-04 22:35:44 +00:00
Enrico Ros 519892521f Fix the last CRASH (on search) and fix a memleak before BETA2 tagging.
Removed old code, reworked bad code.
I have no more reported crashes now.
No plans for additions or code changes till 3.4 release.
Thank you all kpdf users, Have Fun!

svn path=/trunk/kdegraphics/kpdf/; revision=385897
2005-02-03 17:09:33 +00:00
Enrico Ros 9e73b4235e Fixed type-ahead searches. Reworked search code. Found alternative way to
setRasterOp. Cleaned up RenningSearch class. Performance fix on actions.

svn path=/trunk/kdegraphics/kpdf/; revision=385447
2005-02-02 18:18:26 +00:00
Enrico Ros f4b94c016d SEARCH CHANGES: absolutely want to get in those fixes before freeze.
fixed multiple selections on page bugs.
next commits will come tomorrow.

svn path=/trunk/kdegraphics/kpdf/; revision=385045
2005-02-01 18:26:56 +00:00
Enrico Ros d1e074058b cleanups and scroll api
svn path=/trunk/kdegraphics/kpdf/; revision=385040
2005-02-01 18:23:55 +00:00
Enrico Ros 93c1d3845d Implemented history (implementation is inside Document. actions (2) are in
Part). Implemented 'history (xpdf's LinkAction) links'. History depth is
 100 steps by default (this is enough for sure, clicking 100 times on a
 button is not an easy task :-).

Minor issues (removed half TODOs in code, all FIXMEs are already removed):
Invoke mailer on 'mailto:' links inst instead of konqueror.
Actions cleanup: disable actions like 'print', 'preview', 'save to..', etc
 when there isn't an active document. Added history actions to the toolbar
 in place of the 'prev_page' and 'next_page' ones. Fixed open+open_recent
 action tooltip and behavior.
Move definition and implementation of PagePainter class to ui/pagepainter
 from core/page.
Valgrinded and leakchecked (2 memory leaks spotted and fixed (missing
 contents deletion in KPDFGeneratorThread and missing deletion of
 PixmapRequests on cancel in Document::requestPixmaps())).

svn path=/trunk/kdegraphics/kpdf/; revision=382960
2005-01-27 17:31:07 +00:00
Enrico Ros 156dfb22f9 PageView: Fixed crash in preloading within single page mode. Lowered number
of wasted PixmapRequests (regressions introduced by DocumentViewport).
  Optimizations.
Document: Fixed oscillations in memory deallocator. Merged 'cleanupMemory'
  and 'freeMemory' -> 'cleanupPixmapMemory'.
  Delayed initialization of QTimers.
GeneratorPDF: Added a comment on threading and asyncronous pixmap loading.
TODO: updated adding items by Mikolaj Machowski and Grzegorz Ja?kiewicz

svn path=/trunk/kdegraphics/kpdf/; revision=380913
2005-01-21 20:05:36 +00:00
Enrico Ros 3ba7c53676 Fix preloading. It does real good now.
Fix cache deallocator. Hard avoids swapping memory or filling it up to the
limit (allocated pages are referenced in an internal add/remove FIFO).
Merged open and open_recent buttons as many users requested.
Using viewmag icon for find-as-you-type popup.
Disabled debug output. Updated todo with the roadmap to release.
- Need to audit the memory code and choose good default policies now.

svn path=/trunk/kdegraphics/kpdf/; revision=380494
2005-01-20 17:33:05 +00:00
Enrico Ros 962f891b80 For Users:
Display contents faster, waste less memory. Added preloading to forward-
generate pages (if threading enabled and memory profile >= normal). Main
pages are always generated first, then thumbnails come, then preload ones,
etc.. Btw memory and cpu will be happier now.
(1 bug in memory and 1 in preloading still remains.. will be spotted soon)

For Developers:
Generator: dropped moc, api changes, better functions naming.
PDFGenerator and Document: moved requests queue to the Document.
   The generator performs only a single request a time. A flag can be
   queried to know if the generator is ready for starting another pixmap
   generation or not (in case it's generating a pixmap in background).
PixmapRequest: added priority and backgound (async) attributes.
Document: queuing requests by priority in requestPixmaps.
Observer: added defines for priorities used in doc->requestpixmaps.
PageView: delayed find-ahead timer creation (not created if not needed).
   Added preload PixmapRequests to the pixmap requests list.
ThumbnailsList: adapted to pixmapRequest changes and changed naming for
   delayed thumbanils request.

svn path=/trunk/kdegraphics/kpdf/; revision=379820
2005-01-18 16:43:36 +00:00
Albert Astals Cid 2b8427a55b Add bool KPDFDocument::isOpened() const and use it so that the user can not begin a find-ahead search if no document is loaded
svn path=/trunk/kdegraphics/kpdf/; revision=378613
2005-01-15 01:08:35 +00:00
Jakub Stachowski cc5f8bb689 Findahead - as in khtml.
svn path=/trunk/kdegraphics/kpdf/; revision=378583
2005-01-14 23:19:04 +00:00
Enrico Ros 3bf154b57d Viewport: fixes, setViewport( vp, id ) excludes id from the notified
bodies. Optimized fit width and a saved a couple of pixmap requests. Busy
cursor on load and searches.

svn path=/trunk/kdegraphics/kpdf/; revision=377152
2005-01-10 13:43:44 +00:00
Enrico Ros 6dd95c9e06 Viewport MOD 1. Implemented the DocumentViewport class, owned by Document.
A const reference may be asked. When set all DocumentObservers will be
notified so they can update their gfx if needed. Converted TOC, Links
to the new usage. DocumentViewport can be saved/restored to/from QString
so it can be asked as metadata and saved on document's XML. When loading
a document the viewport is restored exactly where it was when the document
was closed. More fixes with Viewport class. Swapped groupboxes in Perform
dialog. Changed members naming in DocumentObservers and inherited classes.
PageView and ThumbnailsList now linked.

Still regressions / TODOs about the Viewport thing.

svn path=/trunk/kdegraphics/kpdf/; revision=377066
2005-01-09 23:37:07 +00:00
Enrico Ros e06c3f4c18 FixCrash 2/3: getMetaData modified. mutex locks. performance fix for TOC
generation (was 50 times slower after the all-in-one generation patch)

svn path=/trunk/kdegraphics/kpdf/; revision=376083
2005-01-07 13:07:29 +00:00
Enrico Ros 208b6a5cf3 Added a bottom toolbar to the thumbnailsList to enable/disable thumbnails
filtering and similar options (toolbar is not created now). Changed
Document::openDocument(..) functions order. Restore last active page when
opening an already viewed pdf. Fix margins around pages in all modes.
Presentation: page change by clicking on the round 'wheel' indicator too.
Updated TODO.

svn path=/trunk/kdegraphics/kpdf/; revision=375229
2005-01-03 15:51:05 +00:00
Albert Astals Cid fb6e540547 Save and read the bookmarks to/from a file when opening/closing a document
svn path=/trunk/kdegraphics/kpdf/; revision=375083
2005-01-03 00:28:46 +00:00
Tobias Koenig b10d10a2bd Convert 'struct DocumentInfo' into a QDomDocument for more flexible information
passing.

svn path=/trunk/kdegraphics/kpdf/; revision=375065
2005-01-02 22:37:52 +00:00
Enrico Ros d983cfdd76 Copying kpdf_experiments into branch and reordering directories. Look there
for the file naming map and file  versioning. Please wait until the commit
storm ends to report any bug. Albert and Enrico
Moved KPDFDocumentObserver in its own include file. Updated dependancies.

svn path=/trunk/kdegraphics/kpdf/; revision=374928
2005-01-02 14:55:14 +00:00
Enrico Ros ffe8ddaf9d Copying kpdf_experiments into branch and reordering directories. Look there
for the file naming map and file  versioning. Please wait until the commit
storm ends to report any bug. Albert and Enrico

svn path=/trunk/kdegraphics/kpdf/; revision=374920
2005-01-02 14:19:33 +00:00