Commit graph

675 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 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 ed16042b4e Regrouped options (looks cleaner now, expecially in kcfgcreator). Added
3 entries for saving checked state of 'Annotations side pane' (see next
commits).

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=400285
2005-03-24 18:43:20 +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 a041d23ee2 CVS_SILENT sync with last commit
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=397323
2005-03-13 17:23:38 +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 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
Jakub Stachowski 664d441534 Added action for showing/hiding left panel and removed it from settings.
"Watch file" moved to settings dialog.
BUG: 99316

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=396976
2005-03-12 15:39:04 +00:00
Enrico Ros 65738852b8 CVS_SILENT A point that makes sense (thanks to Uga).
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=396947
2005-03-12 12:51:59 +00:00
Enrico Ros b7e621bb60 Expand scope of kdpf :-) (thanks to ktech)
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=396924
2005-03-12 11:18:16 +00:00
Enrico Ros 7feee78554 Sync that too. Updated to show current status.
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=396912
2005-03-12 08:40:44 +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
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
Enrico Ros de460a39c5 missing pieces for annotations support to be complete (90% missing)
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=395075
2005-03-05 16:46:29 +00:00
Albert Astals Cid aa62460776 and the file you always forget :-D
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=395069
2005-03-05 16:00:06 +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
nobody 8d960f1ed8 This commit was manufactured by cvs2svn to create branch
'kpdf_annotations'.

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=394413
2005-03-02 18:32:40 +00:00
Albert Astals Cid 0571097b26 Make what i really said yesterday.
--enable-force-kpdf-drm is a configure option, it defaults to NO, if YES DRM is ALLWAYS obeyed
skip_drm is a kiosk option, it defaults to YES, if NO, means the user is not authorized to skip DRM and DRM is ALLWAYS obeyed
if previous options are no and yes, the user sees a GUI option called Obey DRM limitations that defaults to YES but the user can set to NO from the GUI

svn path=/trunk/kdegraphics/kpdf/; revision=394412
2005-03-02 18:32:40 +00:00
Tom Albers 245bd035b1 Corrected two errors
BUGS: 99629,99630

svn path=/trunk/kdegraphics/doc/kpdf/; revision=394390
2005-03-02 17:19:43 +00:00
Albert Astals Cid e87148d238 Better wording
svn path=/trunk/kdegraphics/kpdf/; revision=394213
2005-03-01 22:12:39 +00:00
Albert Astals Cid 1eed94c3d6 More on the DRM issue.
How it is going to end:
 - Exists a configure option called --enable-kpdf-drm that is DISABLE by default and you can use to FORCE kpdf obeying DRM
 - Exists a kiosk option called skip_drm that is true by default and the admin can set to TRUE to FORCE kdpf obeying DRM
 - Exists a GUI option called Obey pdf limitations that is shown if skip_drm is true, that option is ON by default, that means DRM is obeyed but the user can disable it from the GUI
Hope that will please everyone
Please can somebody with better english than me check that the wording i used is actually correct english? Thanks

svn path=/trunk/kdegraphics/kpdf/; revision=394212
2005-03-01 22:10:32 +00:00
Jakub Stachowski 02b3ab70f1 Make popup menu work also when in selection mode.
BUG: 99315

svn path=/trunk/kdegraphics/kpdf/; revision=394172
2005-03-01 18:43:47 +00:00
Jakub Stachowski d23b268ecd Make font matching independent of current locale.
BUG: 98992

svn path=/trunk/kdegraphics/kpdf/; revision=394110
2005-03-01 15:11:27 +00:00
Albert Astals Cid 25d51b8bd3 Add a note on how page rotation can be implemented
svn path=/trunk/kdegraphics/kpdf/; revision=393886
2005-02-28 19:54:08 +00:00
Albert Astals Cid 5150b65199 Follow relative links
BUGS: 100366

svn path=/trunk/kdegraphics/kpdf/; revision=393861
2005-02-28 18:12:12 +00:00
Albert Astals Cid 34d104a5fb Print to the correct page size
Olaf can you check that fixes your wrong paper format complaining printer too?
CCMAIL: 98837@bugs.kde.org
BUGS: 100003

svn path=/trunk/kdegraphics/kpdf/; revision=393859
2005-02-28 18:01:32 +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 be7a7d7227 Synced. Preparing for merging bits from the branch.
svn path=/trunk/kdegraphics/kpdf/; revision=393204
2005-02-26 11:51:23 +00:00
Lauri Watts 24f60bc625 Patch from Brad Hards
BUG:99629

svn path=/trunk/kdegraphics/doc/kpdf/; revision=392876
2005-02-24 21:04:16 +00:00
Albert Astals Cid 27c1e8a078 Don't crash on ps renamed to pdf. Change requested by core-devel
svn path=/trunk/kdegraphics/kpdf/; revision=392849
2005-02-24 17:25:58 +00:00
Albert Astals Cid f6b9f9d17a Typo: continous -> continuous
BUGS: 99859

svn path=/trunk/kdegraphics/kpdf/; revision=391513
2005-02-20 21:24:25 +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
Albert Astals Cid 67f4c2b3e7 Please #kde-devel people making beign a pdf hacker more easy, if you don't want drm checking just do
./configure --enable-kpdf-drm=no

svn path=/trunk/kdegraphics/kpdf/; revision=390898
2005-02-19 13:41:34 +00:00
Enrico Ros f04b9739c8 Follow-up to Albert's commit. DRM handling 'the right way'. Forbids
printing and copying text from protected files (avoids legal issues).

svn path=/trunk/kdegraphics/kpdf/; revision=390880
2005-02-19 13:04:41 +00:00
Albert Astals Cid 9352ac5200 Implement isAllowed for the pdf generator, Enrico is implementing the use of it in pageview etc.
IMHO this is not a feaute but a bug-fix as if this is not implemented we let the user copy text and print from PDF that are protected against and wether we may like it or not is what the spec says and we could get in problems if someone copies text from a protected PDF using our tool.

svn path=/trunk/kdegraphics/kpdf/; revision=390866
2005-02-19 12:23:14 +00:00
Waldo Bastian e4a142347e * Use startServiceByDesktopName instead of startServiceByName, it's more
reliable
* No need to attach, all KDE applications register with DCOP by default already

svn path=/trunk/kdegraphics/kpdf/; revision=390754
2005-02-19 00:12:26 +00:00
Enrico Ros 08aeb0b73a Fixing the bug Albert told me about (generalizes the 'exit fullscreen' bug
that Albert fixed a while ago). Always ensure that pixmaps are requested
if a relayout has been performed, even if the viewport is not moved but
contents changed.
Removed a warning.

svn path=/trunk/kdegraphics/kpdf/; revision=390694
2005-02-18 21:14:01 +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 fa67d6676c Delay the calculation of m_width and m_height (and all its associated things) until first time the widget is shown (paintEvent), doing KGlobalSettings::desktopGeometry(this); in PresentationWidget::PresentationWidget always returns the geometry of the first screen, so it must be done in paintEvent (for example), where the widget has already been shown and KGlobalSettings::desktopGeometry(this); returns the geometry of the correct screen.
Thanks to Olaf Bonorden for the patch testing
BUGS: 97347

svn path=/trunk/kdegraphics/kpdf/; revision=389970
2005-02-16 17:19:36 +00:00
Albert Astals Cid 64bab00507 Drop LIBT1 in libxpdf_la_LIBADD as we don't use libt1 anymore
svn path=/trunk/kdegraphics/kpdf/; revision=389902
2005-02-16 11:48:00 +00:00
Albert Astals Cid 949fbe3372 Thanks for providing the URL to check against.
Don't look for the factory actions when there is no factory :-D
BUGS: 99229

svn path=/trunk/kdegraphics/kpdf/; revision=389779
2005-02-15 23:18:36 +00:00
Albert Astals Cid bbbde65779 Don't use t1lib to render Type 1 fonts (it is crashing), use freetype
Clarify configure option --enable-multithreaded-kpdf
If you have warnings about HAVE_T1LIB_H beign defined twice re-run ./configure
BUGS: 99344

svn path=/trunk/kdegraphics/kpdf/; revision=389391
2005-02-14 17:12:04 +00:00