Commit graph

43 commits

Author SHA1 Message Date
Pino Toscano b654434a0e add private helpers to properly transform the base coordinates of an annotation
svn path=/trunk/KDE/kdegraphics/okular/; revision=722451
2007-10-07 10:52:05 +00:00
Pino Toscano 2a29b247f7 save really few bytes
svn path=/trunk/KDE/kdegraphics/okular/; revision=709414
2007-09-07 13:13:50 +00:00
Pino Toscano a6c0f7d46d it makes no sense having a returned type for the base Annotation class (that can not be instanced directly)
svn path=/trunk/KDE/kdegraphics/okular/; revision=691107
2007-07-22 22:52:47 +00:00
Pino Toscano aa8155f8ed decouple the transformation applying and resetting methods, and reset the transformation when setting a new bonding rect or translating
svn path=/trunk/KDE/kdegraphics/okular/; revision=691056
2007-07-22 20:49:27 +00:00
Pino Toscano 857d423c46 Correctly (hopefully) translate the text annotations now.
svn path=/trunk/KDE/kdegraphics/okular/; revision=691048
2007-07-22 20:20:24 +00:00
Pino Toscano 536b632536 Correctly translate the ink annotations now.
svn path=/trunk/KDE/kdegraphics/okular/; revision=689204
2007-07-17 21:52:22 +00:00
Pino Toscano b41dcfeddc - store a pointer of the owning page in each annotation
- preliminary API for translating an annotation

svn path=/trunk/KDE/kdegraphics/okular/; revision=689133
2007-07-17 18:10:25 +00:00
Pino Toscano 94355bce65 move the transform() hierarchy within the private class; allow AnnotationObjectRect to use the trasform() stuff
svn path=/trunk/KDE/kdegraphics/okular/; revision=661202
2007-05-04 20:45:45 +00:00
Pino Toscano bfe21b46f8 refactor the Annotation hierarchy to use a common d_ptr like Qt; move the AnnotationPrivate definition in an own header (it will be useful later...)
svn path=/trunk/KDE/kdegraphics/okular/; revision=661195
2007-05-04 20:24:12 +00:00
Albert Astals Cid 0d47b62715 krazy include order issues
svn path=/trunk/KDE/kdegraphics/okular/; revision=655893
2007-04-19 18:30:20 +00:00
Dirk Mueller e24f08a75f remove misplaced ';'
svn path=/trunk/playground/graphics/okular/; revision=631926
2007-02-09 14:53:26 +00:00
Pino Toscano 48a772be4b move the ui-related utils functions for annotations in an own utils class
svn path=/trunk/playground/graphics/okular/; revision=617097
2006-12-27 23:56:38 +00:00
Tobias Koenig f83cb1c60a Finished API cleanup of Annotation by moving all private members
behind d-pointers

svn path=/trunk/playground/graphics/okular/; revision=614549
2006-12-18 07:28:02 +00:00
Tobias Koenig 6f9d0df5cd Further annotation API cleanup
svn path=/trunk/playground/graphics/okular/; revision=612395
2006-12-11 07:59:02 +00:00
Tobias Koenig a9f58440df First large commit for the Annotation API cleanup
* Moved all public member variables of Annotation to private
    and add accessors
  * Renamed RevScope and RevType to RevisionScope and RevisionType
  * Add API documentation (@pino, please review)

svn path=/trunk/playground/graphics/okular/; revision=610749
2006-12-05 11:05:50 +00:00
Tobias Koenig 1cea7cb777 Fix the bug that ink annotations are not visible on startup.
svn path=/trunk/playground/graphics/okular/; revision=608228
2006-11-27 08:01:27 +00:00
Pino Toscano 2f1aa08ac6 move the annotation boundary calculation to AnnotationUtils
svn path=/trunk/playground/graphics/okular/; revision=606811
2006-11-21 21:35:45 +00:00
Tobias Koenig a490cc0cd7 Add the following functionality:
* Bring QPixmap* back to make Albert happy ;)
 * Store only one QPixmap per page/size and rotate it directly
 * Rotate ObjectRects (boundary)
 * Rotate Annotations (point coordinates)
 * Don't reload pixmaps, ObjectRects and annotations on rotation

svn path=/trunk/playground/graphics/okular/; revision=606371
2006-11-20 07:53:32 +00:00
Pino Toscano abb20bfe6c black can be a valid color, so don't discard it when saving
svn path=/trunk/playground/graphics/okular/; revision=605980
2006-11-18 20:30:40 +00:00
Pino Toscano c2686ba1d1 show the annotation type in the review side tab, and a simple tooltip with its author
svn path=/trunk/playground/graphics/okular/; revision=593266
2006-10-07 11:00:39 +00:00
Tobias Koenig df7d144c10 Moved all classes in core/ into the 'Okular' namespace and removed
nearly all references to kpdf (knewstuff still missing).

svn path=/trunk/playground/graphics/okular/; revision=586993
2006-09-21 08:45:36 +00:00
Pino Toscano 726200f64a SVN_SILENT use the right default value for StampAnnotation
svn path=/trunk/playground/graphics/okular/; revision=583166
2006-09-11 15:44:13 +00:00
Pino Toscano b66b54a9c9 very small fixes about annotations
svn path=/trunk/playground/graphics/okular/; revision=582276
2006-09-08 21:08:51 +00:00
Chu Xiaodong a6516a74ef Fix annotation size difference when added in diff scales
svn path=/trunk/playground/graphics/okular/; revision=571739
2006-08-10 15:12:37 +00:00
Chu Xiaodong 88b724dbf1 Text annotation and Straight line annotation added
svn path=/trunk/playground/graphics/okular/; revision=559954
2006-07-08 17:52:42 +00:00
Albert Astals Cid eabbaeaead oKular is now okular
svn path=/branches/work/kde4/playground/graphics/okular/; revision=550782
2006-06-12 18:25:18 +00:00
Pino Toscano a9c6f32494 some kpdf -> okular for icons and a pair of gui messages
svn path=/branches/work/kde4/playground/graphics/okular/; revision=526898
2006-04-05 21:31:21 +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 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
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
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 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 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 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 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
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 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