Commit graph

73 commits

Author SHA1 Message Date
Pino Toscano a2ff1d85fd disable the "construct again the same annotation", it seems too confusing
svn path=/trunk/KDE/kdegraphics/okular/; revision=730290
2007-10-28 11:14:41 +00:00
Pino Toscano 5df1895ec0 don't use deprecated api of KUser
svn path=/trunk/KDE/kdegraphics/okular/; revision=720663
2007-10-03 12:43:44 +00:00
Pino Toscano 746074cfcb Make use of the Esc key in the content area:
- when the document is auto-scrolling, stop the scrolling
- when building an annotation, stop its construction

svn path=/trunk/KDE/kdegraphics/okular/; revision=716000
2007-09-23 17:45:36 +00:00
Pino Toscano 4415a36e3e rename the AnnotationItem to AnnotationToolItem, otherwise there's a plain conflict with the private class of the AnnotationModel
svn path=/trunk/KDE/kdegraphics/okular/; revision=710030
2007-09-08 23:15:03 +00:00
Pino Toscano cd0dd24193 i18n fixes
rename 'freetext' to 'inline note'

svn path=/trunk/KDE/kdegraphics/okular/; revision=701876
2007-08-19 16:15:55 +00:00
Pino Toscano 5150419e81 adapt the debug stuff to the new kdebug way:
- make the output looking more or less like before (using nospace() or removing the spaces)
- remove endl and '\n' at the end of debug outputs
- fixing the QDebug operator<<'s around
- isolate the debug area number of the core into a separate header, and apply it instead of the numbers found in textpage.cpp

svn path=/trunk/KDE/kdegraphics/okular/; revision=694667
2007-07-31 10:19:48 +00:00
Pino Toscano b4b3ebdded Okular::Settings::writeConfig() -> Okular::Settings::self()->writeConfig()
svn path=/trunk/KDE/kdegraphics/okular/; revision=667772
2007-05-23 21:59:12 +00:00
Pino Toscano 2c1d5aa44e Refactor a bit the annotating toolbar, so it can handle better its items and cha
nges to its status. This brings us:
- less item reloading (previously done every time the toolbar is shown, now only when needed)
- the toolbar is redrawn correctly if it's shown and a new document is open
- as Albert pointed me yesterday, no need to show the annotating tools that act on text if the document does not support the extraction of text

svn path=/trunk/KDE/kdegraphics/okular/; revision=659722
2007-04-30 17:40:53 +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
Albert Astals Cid b0339a4e40 fix some easy krazy issues
svn path=/trunk/KDE/kdegraphics/okular/; revision=654317
2007-04-15 19:11:10 +00:00
Pino Toscano 82389f9efa after constructing the text annotation, delete the selection as it's no more useful (and it isn't leaked)
svn path=/trunk/playground/graphics/okular/; revision=646514
2007-03-26 00:01:22 +00:00
Pino Toscano 213b25284f make the annotation tool tooltip text translatable
svn path=/trunk/playground/graphics/okular/; revision=646205
2007-03-24 22:56:32 +00:00
Pino Toscano abd42c14cd the PickPoint annotator engine can draw a dashed frame around the selected zone if a tool wants it; applied to the free text annotation for now [and improved its description while I was there]
svn path=/trunk/playground/graphics/okular/; revision=646200
2007-03-24 22:45:14 +00:00
Pino Toscano 426e21ba6f just read the annotation tools _once_
svn path=/trunk/playground/graphics/okular/; revision=643295
2007-03-16 20:19:22 +00:00
Pino Toscano 8add3d7863 really disable the active tool when hiding the annotating toolbar, thanks Bart for pointing that out
svn path=/trunk/playground/graphics/okular/; revision=617023
2006-12-27 19:22:22 +00:00
Pino Toscano 846dbf7cb9 don't shadow a class member
svn path=/trunk/playground/graphics/okular/; revision=616996
2006-12-27 17:25:26 +00:00
Pino Toscano bbb55280d5 Simplify the auxiliary functions used within RegularArea<>, patch by André Wöbbeking.
Make the return value of RegularArea::geometry a simple list instead of a pointer, as suggested by André.

CCMAIL: Woebbeking@kde.org

svn path=/trunk/playground/graphics/okular/; revision=616994
2006-12-27 17:10:06 +00:00
Pino Toscano dff36b98f8 simplify RegularAreaRect by avoiding the usage of pointers, as they don't give benefits anyway.
Fixing also the text extraction when using the rectangular selection across two or more pages.

svn path=/trunk/playground/graphics/okular/; revision=616264
2006-12-24 18:19:18 +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
Pino Toscano 44a69612ef Make okular able to construct and display Geometric (Rectangle/Ellipse) Annotations.
Extended the annotation properties dialog to choose the type (rect/ellipse) or the color for the inner part.
Added a button in the review toolbar to construct a cyan ellipse.

svn path=/trunk/playground/graphics/okular/; revision=606023
2006-11-19 00:46:01 +00:00
Pino Toscano d3e6ffe673 fix error did in the previous commit
svn path=/trunk/playground/graphics/okular/; revision=606016
2006-11-18 23:51:20 +00:00
Pino Toscano e955192030 make the pixmap optional in the PickPointEngine
svn path=/trunk/playground/graphics/okular/; revision=605990
2006-11-18 21:24:25 +00:00
Pino Toscano 5a03c11e0a better check that we've selected something
svn path=/trunk/playground/graphics/okular/; revision=605908
2006-11-18 15:22:16 +00:00
Pino Toscano 5862ea6dc8 create an Identity settings section and move the author field there
svn path=/trunk/playground/graphics/okular/; revision=601335
2006-11-02 22:19:32 +00:00
Pino Toscano fdbd0101a4 move the AnnotatorEngine base class and the SmoothPath engine out of the private use of the page view annotator
svn path=/trunk/playground/graphics/okular/; revision=600980
2006-11-01 15:23:11 +00:00
Pino Toscano 03e01b97f6 it's not a real composition effect, but this should help a bit...
svn path=/trunk/playground/graphics/okular/; revision=598542
2006-10-23 21:35:58 +00:00
Pino Toscano ab1fe9f8cc initialize a pointer is always a good idea
svn path=/trunk/playground/graphics/okular/; revision=598206
2006-10-22 21:20:08 +00:00
Pino Toscano 23b3a7f6a1 ooops forgot to remove some debug
svn path=/trunk/playground/graphics/okular/; revision=598204
2006-10-22 21:07:41 +00:00
Pino Toscano 339bfc6907 Create a new AnnotationEngine to select some text from the current page, and make it able to distill Highlight annotations. Now you can hightlight th text in your document, wooo :)
svn path=/trunk/playground/graphics/okular/; revision=598201
2006-10-22 20:53:56 +00:00
Pino Toscano d010d05e6e make the AnnotatorEngine able to return a list of annotations (this will be useful later...)
svn path=/trunk/playground/graphics/okular/; revision=598151
2006-10-22 16:43:55 +00:00
Albert Astals Cid e6dae78ac3 Port Q3ScrollView to QScrollArea, probably still has some small issues but seems to work quite well
svn path=/trunk/playground/graphics/okular/; revision=593332
2006-10-07 14:40:32 +00:00
Albert Astals Cid a9a27a9894 remove qt3 support calls
svn path=/trunk/playground/graphics/okular/; revision=588888
2006-09-27 10:04:17 +00:00
Pino Toscano 42310e184c Restructuring a bit how the text-editor-like selection works:
* putting it in an own view mode
* associating the selection to every page
* using a better algorithm to calculate the selection, even in a page range
* moving its drawing from the page view to the page painter, so it's possibile to draw it just like it's done with eg annotations

Other changes (more or less related):
* moved the annotation popup to a better place, so it won't interfere with annotation drawing
* commented some debug code in TextPage

svn path=/trunk/playground/graphics/okular/; revision=588795
2006-09-26 22:22:01 +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 f2ecb5fb91 use the right icon when showing annotation-related messages
svn path=/trunk/playground/graphics/okular/; revision=586560
2006-09-19 23:14:12 +00:00
Pino Toscano 45615e5289 Reworked a bit the ObjectRect API, by allowing subclassing for easiness wrt Annotation's. The brand new AnnotationObjectRect is responsible for providing the annotation bounding rect (that may vary for the various annotation types).
Adapted also to receive the X and Y scale, so the bounding rect for every kind of ObjectRect can depend on a specific page size.
As a consequence, we can add also the annotations among the rects of a Page, and use the standard getObjectRect to find them.

svn path=/trunk/playground/graphics/okular/; revision=586457
2006-09-19 17:17:29 +00:00
Pino Toscano 3b2420e7c0 SVN_SILENT {x|y}scale -> page{width|height}
svn path=/trunk/playground/graphics/okular/; revision=585461
2006-09-17 09:08:03 +00:00
Pino Toscano a5ee705911 Annotations:
reverting back the drawing of InPlace Text annotations to the unbuffered ones, but with a more clever behaviout than before:
- the text is drawn wrt the size of the page, and thenscaled to the real annotation boundary size. this makes the drawing of the annotation more similar to the page layout
- the bounding rectangle is drawn to be max 1pixel wide: if the drawn page is smaller than the page, then the rect is scaled along with the text, otherwise it's drawn after the scaling, so it won't appear huge at high levels of zoom
The AnnotationEngine's had to be modified by adding a page pointer parameter to the event() function, necessary to compute correctly the bounding rect of an inline text annotation.

svn path=/trunk/playground/graphics/okular/; revision=585289
2006-09-16 21:16:58 +00:00
Pino Toscano c178ed6392 if we're constructing a polygon (closed), then really set that it is closed instead of closign manually adding the first point to the path
svn path=/trunk/playground/graphics/okular/; revision=583633
2006-09-12 20:47:36 +00:00
Pino Toscano 05d97ede77 Annotations:
- make the PagePainter draw all the points specified in a LineAnnotation, as it can represent also a Polygon or Polyline annotation
- automatically read the annotation dom element in the base AnnotatorEngine class, so every engine won't need to read it on its own
- properly reset some vars in the engines
- when constructing a Stamp annotation, use the right 'icon' attribute of the annotation element (and not the icon of the engine)
- renamed the TwoPointsEngine into PolyLineEngine, and abstracted to construct a polygon/polyline with a specified number of sides
- added a polygon button on the annotation toolbar
- check better if the annotator has to paint something

svn path=/trunk/playground/graphics/okular/; revision=583102
2006-09-11 11:51:10 +00:00
Pino Toscano 3578b4b9e8 Annotations:
- improve the calculation of the bounding rect for freetext annotations
- fix the drawing of the pixmap associated with the PickPointEngine
- implement the creation of stamp annotations

svn path=/trunk/playground/graphics/okular/; revision=582808
2006-09-10 16:10:40 +00:00
Pino Toscano 53fa802939 now the PickPointEngine can draw the pixmap either in the center or in the bottom-right part of the cursor
svn path=/trunk/playground/graphics/okular/; revision=582293
2006-09-08 23:06:22 +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
Tobias Koenig 90140c1479 warnings--
svn path=/trunk/playground/graphics/okular/; revision=578892
2006-08-30 14:17:22 +00:00
Chu Xiaodong 9c575a91d3 replace embedded annotation dialog with annot window, child of PageView
svn path=/trunk/playground/graphics/okular/; revision=572243
2006-08-11 23:53:48 +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 e6078e98c3 call Annotation context menu any time(implemented in pageview.cpp)
svn path=/trunk/playground/graphics/okular/; revision=571653
2006-08-10 08:59:58 +00:00
Chu Xiaodong e207d0d6f4 Note&TextBox annotation remove operation enabled
svn path=/trunk/playground/graphics/okular/; revision=571630
2006-08-10 06:32:03 +00:00
Pino Toscano 6e53be7386 fix crash when the TwoPointsEngine successfully creates an annotation
CCMAIL: Chu Xiaodong <xiaodongchu@gmail.com>

svn path=/trunk/playground/graphics/okular/; revision=571434
2006-08-09 15:28:29 +00:00