Commit graph

118 commits

Author SHA1 Message Date
Piotr Szymanski
6f4ead4d5f - dont shadow the true classes variable
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=455521
2005-08-31 18:27:16 +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
402ec73285 - add one moreconstructor for objectrect
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=455042
2005-08-30 13:24:29 +00:00
Piotr Szymanski
c3620ca295 - forgotten file
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=445205
2005-08-10 16:39:30 +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
1c7662dec2 - makefile changes for reorganisation
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=437102
2005-07-20 22:47:35 +00:00
Piotr Szymanski
b9d106bb6f - move to generators
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=437097
2005-07-20 22:38:29 +00:00
Piotr Szymanski
fc6b0ad1f0 - reorganisation part 1, moving pdf generator to genrators/xpdf
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=437095
2005-07-20 22:33:27 +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
210a0d44a0 - backport links in presentations
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=435938
2005-07-18 17:51:27 +00:00
Piotr Szymanski
931271f968 - generate kpdftextpage while loading document, makes search speedy again, and man do i mean speedy
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=434974
2005-07-15 21:50:35 +00:00
Piotr Szymanski
011516bd90 - one more
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=434948
2005-07-15 20:32:40 +00:00
Piotr Szymanski
17cb9645fb - add the frigging desktop!
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=434947
2005-07-15 20:32:11 +00:00
Piotr Szymanski
7b5063c6e1 - more build fixes
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=434935
2005-07-15 20:08:39 +00:00
Piotr Szymanski
8aef215fb5 - bah make it build
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=434930
2005-07-15 19:58:47 +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
Piotr Szymanski
369803e65b - forwardport the support for external linkage in toc
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=434864
2005-07-15 17:32:46 +00:00
Piotr Szymanski
6e8a08f692 - make the Page column in TOC configurable with secret config option instead of compile time switch
- mark one function to remove later
- add one more category to desktop file to be more vfolders compliant

svn path=/trunk/playground/graphics/oKular/kpdf/; revision=431970
2005-07-05 19:10:48 +00:00
Enrico Ros
d3d8999aea don't crash if the generator doesn't support searching text
svn path=/branches/kpdf/annotations/kdegraphics/kpdf/; revision=428596
2005-06-24 16:47:47 +00:00
Enrico Ros
789e799ba7 generate smooth scaled image of the requested size (looks/caches/works
a lot better this way)

svn path=/branches/kpdf/annotations/kdegraphics/kpdf/; revision=428595
2005-06-24 16:47:16 +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
027d040c6c applying patch_040,041 (of: tinyurl.com/8t5ec)
svn path=/branches/kpdf/annotations/kdegraphics/kpdf/; revision=428587
2005-06-24 16:39:57 +00:00
Enrico Ros
c313465ce3 applying patch_083
svn path=/branches/kpdf/annotations/kdegraphics/kpdf/; revision=425038
2005-06-13 17:44:33 +00:00
Enrico Ros
5e8dc4992e applying patch_082
svn path=/branches/kpdf/annotations/kdegraphics/kpdf/; revision=425036
2005-06-13 17:43:17 +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
bc71e24b8a applying patch_096
svn path=/branches/kpdf/annotations/kdegraphics/kpdf/; revision=425005
2005-06-13 16:30:01 +00:00
Enrico Ros
c885e75be1 SVN_SILENT remove debug message (introduced merging patch_050)
svn path=/branches/kpdf/annotations/kdegraphics/kpdf/; revision=424995
2005-06-13 16:02:14 +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
0beedebe01 Added icons for Text annotations (ake the 'page sybols'). Changed naming to
existing ones, updated 'tools.xml' with new names and made generator_pdf
parse pdf icon names as lowercase. Added SVG sources too for the icons.

- note that I suck as icon maker, so plz make good looking icons and don't
complain about these - :-))

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=405395
2005-04-13 18:21:18 +00:00
Enrico Ros
96a28d59ac CVS_SILENT removed overlay debug ~art~
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=405339
2005-04-13 14:56:41 +00:00
Enrico Ros
25d25604d4 CVS_SILENT Page: disabled debug save timing, Annots: typos
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=405144
2005-04-12 20:27:40 +00:00
Enrico Ros
f75b4247d0 CVS_SILENT some primitives to test
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=404924
2005-04-11 21:43:43 +00:00
Enrico Ros
db4e2246e1 Added a hack because real pdf's HL-QuadPoint structure differs from the
one in specs! (how can it be possible!?)

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=404553
2005-04-10 12:11:49 +00:00
Enrico Ros
6195accba0 CVS_SILENT cosmetic change.
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=404086
2005-04-08 15:35:54 +00:00
Enrico Ros
da5e6b8b74 Annotations: removed the opened attribute from TextAnnotation. Fixed
a bug in Annotation::Window.
PDFGenerator: added postprocessing for handle the special pdf cases on
  TextAnnotations (where window geometry is embedded in annotation, not
  in popup and the annotation should be represented as an icon).

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=404023
2005-04-08 11:15:23 +00:00
Enrico Ros
eeff7763d2 Page: don't append parent containers if there are no children.
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=404012
2005-04-08 10:33:20 +00:00
Enrico Ros
850b7b7f53 Added 3 custom attributes to the Highlight annotation. Adapted pdf parser
and xml storage stuff.

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=403983
2005-04-08 08:58:49 +00:00
Enrico Ros
57f0453b73 Document:
Warning before running out of memory and stop pixmap request.
  CCMAIL: 103435@bugs.kde.org
PagePainter:
  Not related to the bug: avoid scaling up slow pixmaps.

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=403884
2005-04-07 20:26:49 +00:00
Enrico Ros
bcc2542e24 Big update to annotations. DataStructures passed the recursive saving
and retrieval xml test. This second rewrite seems better than the
previous one. Maybe it's not perfect bug finally it's good enought
to move ahead now.

Annotations:
  Restored and verified XML loading/saving with recursive storing and
  retrieval of referenced objects. 100% verified and tested. Finally
  all is working as expected. The structure is clean and it's simple
  to choose the way to go now: rendering. Updated AnnotationUtils, More
  comments, removed leak.
Page:
  Adapted to changes to AnnotationUtils and Annotation, changed context
  saving.
Misc updates on TODO and PDFGenerator (fixed Ext flag).

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=403863
2005-04-07 19:27:54 +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
Enrico Ros
2b2a634064 PDFGenerator:
Better flow in annotations parser.
Annotation:
  Cleanups in header.
PageView:
  Adjusted a squelch.. I think a neural network it's the least we can do
  to choose that float number between 0.6 and 0.7.

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=403319
2005-04-05 15:05:54 +00:00
Enrico Ros
b2b74d91c8 Adapted to annotations.h changes.
annotations.cpp is all commented out, need to work on that now.

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=403222
2005-04-04 23:55:40 +00:00
Enrico Ros
eabe001f46 The revolution starts here.
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=403221
2005-04-04 23:53:45 +00:00
Enrico Ros
372299cc5e Internal changes, broken stuff, heavy headache.
PDFGenerator:
  Changed parser to deal with the new data structures:
  1) Popups are not inserted anymore as annotations, but parsed and
  scheduled for later merging with other annotations. Shared popups are
  permitted (the pdf reference doesn't clarify on this, so we better
  support them).
  2) Annotations can have an internal hieracy. When an IRT annotation is
  found, it's parsed and scheduled for later merging in the parent's
  tree.
  The merges take place at the end of the annotation retrieval. At that
  point all cross-objects are in memory and we can resolve/reparent
  stuff.

README.Annotations:
  Note on internal parser.

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=403219
2005-04-04 23:52:53 +00:00
Enrico Ros
18feebc838 Moved the PDF annotations status here from annotations.h (that is going
through a deep transformation).

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=403113
2005-04-04 12:36:10 +00:00
Enrico Ros
7ad04b788c CVS_SILENT add x-pdf as mimetype
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=402353
2005-04-01 09:56:32 +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
952f500248 Intersect is true even if not proper.
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=400289
2005-03-24 18:52:39 +00:00
Enrico Ros
861b4ed763 Cleaned up annotations structure. Packed header. Added some comments and
TODOs.

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=400288
2005-03-24 18:51:24 +00:00