Commit graph

637 commits

Author SHA1 Message Date
Pino Toscano
63c18ab06e Make the oKular part and its shell compile and link.
Created a oKularcore lib, so the generators ca link to it, and made the oKularpart link to it too, of course.
Adapted the sources of the Okularpart to the new location for the generated settings.h.

svn path=/branches/work/kde4/playground/graphics/okular/; revision=523729
2006-03-28 22:22:10 +00:00
Laurent Montel
3d0eefb6d4 Add support for cmake (not tested for the moment)
svn path=/branches/work/kde4/playground/graphics/okular/; revision=522661
2006-03-26 12:19:40 +00:00
Albert Astals Cid
c8a4e8e0b8 need to export that
svn path=/branches/work/kde4/playground/graphics/okular/; revision=522373
2006-03-25 11:05:39 +00:00
Albert Astals Cid
cbb8e80154 some more compile changes, now let's see basketball
svn path=/branches/work/kde4/playground/graphics/okular/; revision=521882
2006-03-23 19:02:55 +00:00
Albert Astals Cid
178bab06cb core builds
svn path=/branches/work/kde4/playground/graphics/okular/; revision=521179
2006-03-21 20:00:24 +00:00
Albert Astals Cid
c0a2772c9a more porting, area.h is begining to loose but i need sleep
svn path=/branches/work/kde4/playground/graphics/okular/; revision=520838
2006-03-20 23:14:05 +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
Albert Astals Cid
30c2f8067d oKular goes poppler
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=520367
2006-03-19 18:03:43 +00:00
Piotr Szymanski
c7da917e38 - add minor checks for validity of requests
- fix ghostscript backend (works now)

svn path=/trunk/playground/graphics/oKular/kpdf/; revision=509917
2006-02-15 21:02:13 +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
Albert Astals Cid
3084653fd4 Makefile fixing
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=486449
2005-12-07 21:32:58 +00:00
Stephan Binner
dd43125621 i18n style guide fixes
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=481809
2005-11-20 17:32:53 +00:00
Piotr Szymanski
fec81c9e07 - missed file
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=481786
2005-11-20 15:30:15 +00:00
Piotr Szymanski
75db44d843 - sync with hdd, refactored text page, ported backends to textpage,
- fixed crash in fax, chm builds and ghostview nearly ported to libqgs

svn path=/trunk/playground/graphics/oKular/kpdf/; revision=481340
2005-11-18 20:48:01 +00:00
Piotr Szymanski
7176dd8b86 - informatior thingie, actually just syncing my build checkkout with svn and will do a biggr clean up in a while
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=477589
2005-11-04 12:16:21 +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
d5c57158b5 - rename to oKular
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=471444
2005-10-17 18:34:58 +00:00
Piotr Szymanski
3c689f5b01 - dont crash when generator not initialised
svn path=/trunk/playground/graphics/oKular/kpdf/; revision=455529
2005-08-31 18:57:37 +00:00
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
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
9023b05e16 Document, Page:
Changed loadDocumentInfo/saveDocumentInfo semantics. Document settings
  are saved by Document, but page related stuff (bookmark state,
  annotations, ...) are loaded/saved by the KPDFPage itself.
Annotation:
  Better usage of dom entities (QDomElement(s) -> QDomNode(s)). Added const
  modifier to 'saveSettings' methods.
Part:
  Use setCheckedState for the show/hide left panel menu entry. Use icon
  too. Bumped .rc revision.

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=397236
2005-03-13 13:14:44 +00:00
Enrico Ros
c20faca61b PDF 1.6 Annotation Parser and DSs: annotations are loaded from PDF file.
AFAIK the kpdf team is once again the first opensource reader to get
support for a cool feature. All annotations in pdf file are read and
converted to our internal data structures. Then they'll be rendered on
screen and changed/saved to our xml file.

 Annotations completely supported and parsed from PDF:  [markup], popup,
text, freetext, line, polygon, polyline, highlight, underline, squiggly,
strikeout, stamp, ink. Partial support for: [base], geom.

Annotations:
  Added/Changed the passive annotation data structures to contain and
  generalize the attributes of annotation classes. Missing attributes
  (won't be handled by kpdf): base{P,AP,AS,A,AA,StructPar,OC}, geom{RD}.
  Little changes to the PDF1.6 summary in header.

PDFGenerator:
  Internal parser (discussed with Albert) directly in top of xpdf. Read
  object nodes of type 'Annot' and parse the whole set of attributes as
  defined in the PDF1.6 spec (for supported annotations).

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=396909
2005-03-12 08:30:47 +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
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
f5ed925287 Added kwallet support for passwords storage. Works smoothly: kwallet has a
really nice (and well documented) API! Passwords of protected files are
  stored in the 'KPdf' folder of the Network wallet.
Updated todo.

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=391251
2005-02-20 12:23:29 +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
Dirk Mueller
f8c1e832f0 fix compile
svn path=/trunk/kdegraphics/kpdf/; revision=388502
2005-02-11 22:29:22 +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
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
İsmail Dönmez
6fb7840575 CVS_SILENT Unused variable
svn path=/trunk/kdegraphics/kpdf/; revision=385111
2005-02-01 21:41:47 +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
Jakub Stachowski
46c06b887d Optimization by André Wöbbeking
svn path=/trunk/kdegraphics/kpdf/; revision=384867
2005-02-01 08:31:02 +00:00
Albert Astals Cid
48868bc89d Neither Enrico nor me know why that is here and it causes a bug where last page is not searched so it's probably a copy&paste bug. Remove
svn path=/trunk/kdegraphics/kpdf/; revision=384614
2005-01-31 17:23:27 +00:00
Jakub Stachowski
680f1e1d84 Fixed non-latin1 chars in TOC and document properties.
svn path=/trunk/kdegraphics/kpdf/; revision=384288
2005-01-30 19:39:08 +00:00
Enrico Ros
fd0606adb2 FIX: Delete allocation descriptors when dynamic observers are removed.
BUG:98091

svn path=/trunk/kdegraphics/kpdf/; revision=383357
2005-01-28 18:18:48 +00:00
Albert Astals Cid
1efaf05d25 Fix mem leaks
svn path=/trunk/kdegraphics/kpdf/; revision=383333
2005-01-28 17:31:34 +00:00
Enrico Ros
5f48094e08 History saving/restoring in addition to the current viewport.
svn path=/trunk/kdegraphics/kpdf/; revision=383327
2005-01-28 17:21:51 +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
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
02ddb10df0 CVS_SILENT disabled debug output on pixmap generation
svn path=/trunk/kdegraphics/kpdf/; revision=380495
2005-01-20 17:33:48 +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
c0029ac3f2 Fix small mem leaks
svn path=/trunk/kdegraphics/kpdf/; revision=379484
2005-01-17 18:27:31 +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
Jakub Stachowski
cc5f8bb689 Findahead - as in khtml.
svn path=/trunk/kdegraphics/kpdf/; revision=378583
2005-01-14 23:19:04 +00:00
Enrico Ros
4b868c2ef1 mini cleanup 1; starting to work seriously on memory management and contour
stuff.

svn path=/trunk/kdegraphics/kpdf/; revision=377973
2005-01-13 11:03:48 +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
162d1a9cf9 CVS_SILENT commented out debug stuff. it works.
svn path=/trunk/kdegraphics/kpdf/; revision=377070
2005-01-09 23:45:43 +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
Albert Astals Cid
59a06e7da7 KPDFLinkBrowse( QString url ) { m_url = url; } -> KPDFLinkBrowse( const QString &url ) { m_url = url; }
Comment a unused variable so we don't get the warning

svn path=/trunk/kdegraphics/kpdf/; revision=376907
2005-01-09 16:56:21 +00:00
Albert Astals Cid
9f39bfb756 Better search of non latin-1 characters (2)
svn path=/trunk/kdegraphics/kpdf/; revision=376534
2005-01-08 17:23:47 +00:00
Albert Astals Cid
b901d81bb5 Better search of non latin-1 characters
svn path=/trunk/kdegraphics/kpdf/; revision=376531
2005-01-08 17:13:36 +00:00
Jakub Stachowski
6589342bf5 Fix copying non-latin1 chars when xpdfrc does not exist.
svn path=/trunk/kdegraphics/kpdf/; revision=376506
2005-01-08 16:21:43 +00:00
Enrico Ros
61eaf43b54 Implemented all missing PDF 1.4 transitions. Added: blinds(2), box(2),
wipe(4), dissolve(1), glitter(4). Between parenthesis the number of
variants. Try it on (Tobias Koenig's testcase):
http://robotics.dei.unipd.it/~koral/KDE/transition_test.pdf
Fixuifiles script on configuration dialogs, icons in Performance Dialog,
fixed spacing on dialogs to look the same way.

svn path=/trunk/kdegraphics/kpdf/; revision=376348
2005-01-08 00:12:08 +00:00
Enrico Ros
1051d4b909 FixCrash 3/3: More decoupling between PDFGenerator and KPDFOutputDevice
classes (moved code between classes). Threading stuff fixed. Add console
debug output if something threading related goes wrong.
BUG: 96274

svn path=/trunk/kdegraphics/kpdf/; revision=376087
2005-01-07 13:13:58 +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
4b86155caf FixCrash 1/3: comments/notes.
svn path=/trunk/kdegraphics/kpdf/; revision=376081
2005-01-07 13:03:10 +00:00
Stephan Kulow
4fd3493a03 non-recursive makes need special dependencies
svn path=/trunk/kdegraphics/kpdf/; revision=375674
2005-01-05 14:08:31 +00:00
Tobias Koenig
98000ff903 Add some nice features for presentation mode:
- cursor modes: visible, hidden, hidden with delay
  - automatic advance
  - loop on last page
  - default transition

I know it's quite late in the release cycle, but the code is stable and kpdf rocks!

svn path=/trunk/kdegraphics/kpdf/; revision=375353
2005-01-03 23:31:40 +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
90b663b7ca Fix typos, correct orderig a bit
svn path=/trunk/kdegraphics/kpdf/; revision=375091
2005-01-03 00:45:47 +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
Enrico Ros
ad1cc07ccd This is the correct order of deleting things now that a generator thread
may be running.

svn path=/trunk/kdegraphics/kpdf/; revision=375082
2005-01-03 00:24:59 +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
Tobias Koenig
833ae4800f The compiler needs the PageTransition definition here... (gcc 3.4 complains about it)
svn path=/trunk/kdegraphics/kpdf/; revision=375061
2005-01-02 22:33:28 +00:00
Enrico Ros
87050538e5 fix: don't create a PageTransition object if there is no transition
specified or the transition is 'replace'.

svn path=/trunk/kdegraphics/kpdf/; revision=375057
2005-01-02 22:25:49 +00:00
Enrico Ros
1550cedccd Updated TODO (added items in progress) and README.
svn path=/trunk/kdegraphics/kpdf/; revision=375053
2005-01-02 21:49:27 +00:00
Enrico Ros
148efda52f I love transitions.
svn path=/trunk/kdegraphics/kpdf/; revision=375036
2005-01-02 20:39:41 +00:00
Tobias Koenig
f0d84a181f KPDF reads the transition effects from the PDF document now.
svn path=/trunk/kdegraphics/kpdf/; revision=375033
2005-01-02 20:32:58 +00:00
Enrico Ros
a658b7ac28 Fix --enable-final compilation.
svn path=/trunk/kdegraphics/kpdf/; revision=374984
2005-01-02 17:16:29 +00:00
Stephan Binner
5193d9ab3c Compile with srcdir!=builddir
svn path=/trunk/kdegraphics/kpdf/; revision=374977
2005-01-02 16:53:59 +00:00
Enrico Ros
3a8b826bf9 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
Compile fixes.

svn path=/trunk/kdegraphics/kpdf/; revision=374944
2005-01-02 15:33:18 +00:00
Enrico Ros
d0b406ad99 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
Fix compilation (include observer, not document for IDs)

svn path=/trunk/kdegraphics/kpdf/; revision=374933
2005-01-02 15:05:56 +00:00
Albert Astals Cid
fdaa03e90b 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
Build a bit :-D

svn path=/trunk/kdegraphics/kpdf/; revision=374929
2005-01-02 14:57:40 +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
eee2673370 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
File namings change.

svn path=/trunk/kdegraphics/kpdf/; revision=374924
2005-01-02 14:37:49 +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