Commit graph

77 commits

Author SHA1 Message Date
Enrico Ros c93d339c57 Adapted to PagePainter changes.
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=400311
2005-03-24 19:59:50 +00:00
Enrico Ros e5eb63ec71 Redesigned graphic pipeline on PagePainter and hand scaling (10x gain on
typical usage).

PagePainter:
  Added 2 convenience methods for performing fast cropping and scaling
  from qpixmaps to qimages. Split buffered graphic flow from the unbuffered
  one reducing buffers conversions to the minimum. Avoid odd cases in
  rescaling. Detection of annotations boundaries to check for enabling
  buffered painting.
  Sample quick dirty and broken (but not so much..) implementation for
  painting AStamp annotations.
Misc:
  PresentationWidged and ThumbnailWidget: adapted to PagePainter changes.
  (PageView mod has already been committed).

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=400310
2005-03-24 19:59:11 +00:00
Enrico Ros 4d0a1ed6e1 Added a new experimental 'Reviews' widget to the toolbox. This shows
all the reviews on the document (pretty unuseful now, but that will
change ;-). Another step to good kpdf annotations.

Part:
  Added Reviews toolbox pane. Added (commented out while doing it right)
  searchline for toc; just works.
Misc:
  Observer: added id for Reviews pane (as document observer it monitors
  document/annotations changes). Page: added 2 temporary accessors for
  annotations (will change soon). Makefile: added side_reviews.cpp to
  compilation. Searchwidget: slight better spacing to look consistant with
  the review panel.

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=400307
2005-03-24 19:50:28 +00:00
Enrico Ros a7c62b4a98 Feature: Added vertical mouse wrapping over screen for panning the document
and when dynzooming by holding the mid mouse button.
Fix:  mouselock bug due to unproper dynzooming handling. Also don't
request pixmaps continuely during the operation -> speeds up DZ.

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=400293
2005-03-24 19:10:41 +00:00
Enrico Ros b7cbbe8bc5 Minor cosmetic change.
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=400290
2005-03-24 18:54:13 +00:00
Enrico Ros 1e9f0e590a Another milestone has been reached: complete saving/restoring of
annotations in the 'document tie file'. Every attribute of kpdf dss
can be dumped to disk. Only rendering prevents HEAD merging now! :-)

Annotations:
  Storage: full annotations saving/loding on the tied XML is implemented.
    every annotation put on a page (either loaded from a pdf or created
    internally is loaded and saved when opening/closing a document).
    Attributes are dumped to XML and reloaded from it via qdom
  DataStructures: internal changes, better naming, some attributes fused.
    PopupAnnotation has become WindowAnnotation
  PDF16Parser: 100% completeness for the types we support

PDFGenerator:
  adapted to annotation ds changes. better parsing on a couple of attrs.
  correctly handle 'F'.

Misc:
  Document: remove/cleanup debugs, Page: performance testing stuff added,
  PagePainter: setPen( annot->color ), PageV..or: typo,
  TODO: many changes

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=398789
2005-03-18 18:49:45 +00:00
Enrico Ros 0de54211f1 Annotations: Author name request. Configure::generalDialog: changes.
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=397322
2005-03-13 17:23:12 +00:00
Enrico Ros 3c6049f415 Adapted to changes in Annotation and children strcuts.
PagePainter:
  Only draw annotation extents (the rect property).
PageViewAnnotator:
  Changed AnnotatorEngine(s) to deal with new attribs in structures. In
  particular they use the NormalizedRect attribute of annotation instead
  of the annotation as a rect itself.
Todo:
  Updated.

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=396911
2005-03-12 08:35:22 +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 c6191c4836 Annotations -Part2- PDF1.6 DSs are summarized and ready4impl in ann*.h
Annotation: the class has been passivized. It's only a data container now,
  no more active manipulation of events/paints.
PageViewAnnotator: this class has been created to handle creating annots.
  PageView creates its 'Annotator on demand. The annotator parses tool
  definition from the 'tool.xml' file.
  The Annotator internally uses AnnotatorEngine(s) to react to mouse events
  and the annotation is created when the job is really finished.
Page: added a (maybe temporary) NormalizedPoint to complement Norm..Rect.
PageViewUtils: removed PageViewEditTools and cleaned up header.
conf/: added a debug option for showing annotation boundary while creating
  one and added a temporary 'debug' toolbox in the config dialogs.

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=394959
2005-03-04 23:06:24 +00:00
Enrico Ros 09d75891eb Synced TODO with BKO's kpdf whishes up to 100341.
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=393517
2005-02-27 14:27:25 +00:00
Enrico Ros a12cc5e5a8 Getting ready for HEAD merge of parts of the stuff.
pageviewtoolbox.cpp/.h: Removed.
PageViewToolBar (was PageViewToolbox): Moved def/impl inside the
  pageviewutils.c/.h files. Uses eventfilter to get notified when the
  anchorWidget changes in size. Cleaned up code.
Annotations: added empty code.
PageView: removed some code. fixed rmb popup menu hidden if no document
  was opened.
Updated TODO.

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=393302
2005-02-26 18:05:01 +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
Enrico Ros 451a3091cc Opening kdpf_annotations branch. Code changes:
User Interface: added a toolbox for selecting an annotation tool without
   polluting the toolbar (pageviewtoolbox animated widget). Icons of that
   toolbar are gimped version of ones in nuvola icontheme.
 Core: added annotation class. this will support all features (except for
   silly ones (really there are some!)) from pdf 1.6 specs but abstracted
   in the kdpf way. (api changes in progress...)

About annotations: only some incomplete interfaces are in plasefor now.
Every type of pdf annotations has tens of parameters. I think we'll render
correctly everything but provide only simple and useful tools for making
annotations over the pages, otherwise a 'Qt designer like' property view
will be required to do fine adjustment over the crappy thousands of
settings. (and we're aiming at a quick and simple viewer with lots of
coolness, not chaos).

Note: the code has been wrongly committed to HEAD before,but soon reverted.
Have fun!

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=388768
2005-02-12 17:42:54 +00:00
Enrico Ros d576e28a32 More naming changes. KPDFPage is perfectly in shape now.
I'm working on Annotations stuff now, expect good news after the freeze!

svn path=/trunk/kdegraphics/kpdf/; revision=387781
2005-02-09 17:51:58 +00:00
Enrico Ros 5b0c32e43f Misc fixes and cleanups and tidy up the code (KPDFPageRect -> ObjectRect).
svn path=/trunk/kdegraphics/kpdf/; revision=387779
2005-02-09 17:45:16 +00:00
Enrico Ros 2a3f35acb9 Fixed broken link following (if not in external document).
Normalized [0..1] every object attached to page.
Fixed find-ahead (didn't loop after last page).

svn path=/trunk/kdegraphics/kpdf/; revision=387447
2005-02-08 15:24:23 +00:00
Albert Astals Cid bcf32aaf7b Build on KDE 3.3
svn path=/trunk/kdegraphics/kpdf/; revision=386560
2005-02-05 22:27:16 +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
Albert Astals Cid d9dcb3e1ac Be consistent with Konqi and Kate
svn path=/trunk/kdegraphics/kpdf/; revision=385593
2005-02-02 22:40:38 +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 3e1834c261 smoothscroll
svn path=/trunk/kdegraphics/kpdf/; revision=385041
2005-02-01 18:24:16 +00:00
Enrico Ros d1e074058b cleanups and scroll api
svn path=/trunk/kdegraphics/kpdf/; revision=385040
2005-02-01 18:23:55 +00:00
Albert Astals Cid aa5cdd7c8a Better use of kttsd, thanks Gary for the patch
BUG: 98316

svn path=/trunk/kdegraphics/kpdf/; revision=385022
2005-02-01 17:20:33 +00:00
Enrico Ros 6f6664c24f ThumbnailList: show graphical 'clip' on thumbnails.
PageView: avoid update() on bookmark change (since rendering is bookmark
 independant).

svn path=/trunk/kdegraphics/kpdf/; revision=383987
2005-01-30 00:58:16 +00:00
Enrico Ros c4c09c7c04 Added KTTSD support (only for selections). This is done via pure dcop and
without including any 3.4 header (like kspeech.h) to keep compatibility
 with 3.3 and older releases (reported to work on these).
Cleanups in PageView's mouse handling. Supports selections of different
 colors now.

svn path=/trunk/kdegraphics/kpdf/; revision=383651
2005-01-29 12:32:59 +00:00
Enrico Ros f644f4e8c4 Switch to seleciton mode when pressing RMB while in normal (drag) mode.
svn path=/trunk/kdegraphics/kpdf/; revision=383326
2005-01-28 17:21:28 +00:00
Tobias Koenig 0124e8a4ac Let the PresentationWidget make use of the viewport. Now the presentation is
shown at the same page like before when a watched PDF file has changed.

svn path=/trunk/kdegraphics/kpdf/; revision=383193
2005-01-28 11:28:18 +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 e65c7058c3 Added the MiniBar class, a layouted widget that displays current page
number, the total number of pages and a little grahical 'progress'
 indicator. Moved 'next page' and 'prev page' buttons from the main toolbar
 to the MiniBar. Minibar lets you edit the page number, click or wheel on
 progress, go to next/prev page, show the gotoPage dialog.
Added rmb popup when clicking on thumbnails. When clicking, the
 ThumbnailList only emits the same signal emitted by PageView so the same
 context menu is displayed.
Misc fixes: [MEM] enabled allocated pages raising in queue when displayed
 again, [ThumbnailList] enabled PageUp/PageDown.

svn path=/trunk/kdegraphics/kpdf/; revision=382597
2005-01-26 10:42:07 +00:00
Albert Astals Cid bbfb530155 Fix presentation placement on xinerama
BUG: 97347

svn path=/trunk/kdegraphics/kpdf/; revision=381994
2005-01-24 17:23:35 +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
Andrew Coles c277d16b9b CVS_SILENT
Corrected typos.

svn path=/trunk/kdegraphics/kpdf/; revision=379421
2005-01-17 14:57:18 +00:00
Lukáš Tinkl 2c3351c59a hmm, no idea why I created the extra string
svn path=/trunk/kdegraphics/kpdf/; revision=378995
2005-01-16 10:40:00 +00:00
Lukáš Tinkl 0ce6f886ae plural
svn path=/trunk/kdegraphics/kpdf/; revision=378993
2005-01-16 10:32:52 +00:00
Albert Astals Cid 97847d8081 Make options be "Enable foo" instead of "Disable foo"
BUG: 97053

svn path=/trunk/kdegraphics/kpdf/; revision=378736
2005-01-15 13:58:08 +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
Albert Astals Cid dd81c7d7e8 Fix "OSD" rendering, i can now see lower parts or g, j, etc which i could not see previously
svn path=/trunk/kdegraphics/kpdf/; revision=378597
2005-01-14 23:58:41 +00:00
Jakub Stachowski cc5f8bb689 Findahead - as in khtml.
svn path=/trunk/kdegraphics/kpdf/; revision=378583
2005-01-14 23:19:04 +00:00
Albert Astals Cid 0ff32c4da9 Add a slotRequestVisiblePixmaps() that fixes the problem of pixmap not updating when going/returning from full screen mode with fit to page and non continuos mode. Enrico please check is not a VERY BAD THING to do it there
Add some accelerators
Plug the actions that change the mouse behaviour into a menu as everything should be menu accesible
Put the F9 in the KACtion creator

svn path=/trunk/kdegraphics/kpdf/; revision=377533
2005-01-11 17:35:07 +00:00
Dirk Mueller 7a5adb9907 fix compilation
svn path=/trunk/kdegraphics/kpdf/; revision=377446
2005-01-11 12:42:06 +00:00
Enrico Ros d4fd6d62c3 Typo fix on Direct Viewport links. DOM is cool and attribute names must match.
svn path=/trunk/kdegraphics/kpdf/; revision=377246
2005-01-10 18:28:32 +00:00
Scott Wheeler 31d1b50511 roundf is C99
svn path=/trunk/kdegraphics/kpdf/; revision=377202
2005-01-10 16:17:00 +00:00
Enrico Ros 10af2d6caa Added option to unlink thumbnailslist from pageview (oneliner). Fixuifiles.
Use palette->active->hilight color for wheel in presentation mode, since
black over black was hard to recognize. Fixes.

svn path=/trunk/kdegraphics/kpdf/; revision=377198
2005-01-10 15:58:01 +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