-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127366/
-----------------------------------------------------------

(Updated April 27, 2016, 5:26 nachm.)


Review request for Okular.


Changes
-------

Fixed: Mouse cursor keeps correct shape during resize action.
Fixed: Don't perform move/resize action immediately on click for select, but 
only upon first mouse move.
Changed: Class MouseAnnotation cares about starting 
AMovie/AScreen/AFileAttachment actions (e.g., start playback of embedded video 
annotation).
Changed: Class MouseAnnotation cares about annotation tooltip events.
Changed: Remember the resize/move handle, once an command is started.
Changed: Mouse cursor changes to arrow or pointing hand shape once the mouse is 
over an annotation (indicates the thing is selectable, or action can be 
triggered).
Changed: AnnotationDescription is kept as data member and passed by reference 
now.


Repository: okular


Description (updated)
-------

This diff adds an annotation resize feature to okular (see Bug 177778).

Usage:
If you left-click at an annotation, it gets selected and 8 resize handles 
appear on the corners/edges of the selection rectangle. When cursor is moved 
over one of the handles, the cursor shape indicates resize mode (everywhere 
else on the annotation means "move", just as it was before resize feature was 
added). Press ESC, or click an area outside the annotation to cancel selection. 
Feature is only applicable for annotation types AText, AStamp and AGeom.

Notable changes:
It works by eventually changing AnnotationPrivate::m_boundary and notifying 
generator (i.e. poppler) about that change, similar to the existing move 
functionality.
-Separated annotation state handling out of PageView into a new class 
MouseAnnotation (ui/pageviewmouseannotation.cpp)
-Added method Document::adjustPageAnnotation, backed by a QUndoCommand class 
Okular::AdjustAnnotationCommand
-Added method Annotation::adjust
-Draw resize handles and selection boundary in MouseAnnotation::routePaint
-Draw only a bounding rectangle during resize, if annotation is rendered 
externally
Some functionality unrelated to the resize feature is also shifted to class 
MouseAnnotation, to establish a single place of responsibility for annotation 
interactions.

Known Bugs:
-For geometric annotations, only the the shape of the annotation is sensitive 
for move/resize, but not the selection rectangle.

TODO:
-Consider z-Order for overlapping annotations? (currently, selection rectangle 
is always drawn on top, while the related annotation may be in background).
-Provide a PDF document with suitable content, where supported annotation types 
and and possible regressions can be tested.
-Add test cases once requirements are fixed.


Diffs (updated)
-----

  CMakeLists.txt 97e8db6e4a704fd34331fad7b7628ca2248b62d8 
  core/annotations.h 4f107440dc824fd9049a30082befd18642e63895 
  core/annotations.cpp e02994688414bdf485b308d6ef122ee2eff3fbaf 
  core/annotations_p.h 07b124a4fae40b7a983aa382ae824125e6d25746 
  core/document.h 63f58741bd6680a673945a7b7c05a10130968beb 
  core/document.cpp 6953b1fb0dc29a375be7ff331a2a2bccce975366 
  core/document_p.h fda23275033645ea67f5ad9d27341fc4635ede34 
  core/documentcommands.cpp 95aded51d73a3d3b98ff26284c9c46fc5c9cf0ca 
  core/documentcommands_p.h 17394f2a25b187cf4aff66b3a7f891b81be5acdd 
  generators/poppler/annots.cpp 8cde64833831ec833b3be552608cff99d38f8e63 
  tests/translateannotationtest.cpp 184b9474e6072a991a5ee5f1116bf7a9ef10cadc 
  ui/pagepainter.h 68b241658162d9bd6eb187efc594ef17ea99d899 
  ui/pagepainter.cpp 3bcd8bc4cfe7471bc3c21cfcd3cff50b8a8d49ee 
  ui/pageview.cpp 3ebf7dcb04aa1942e02f49133d98081e2bbb565c 
  ui/pageviewmouseannotation.h PRE-CREATION 
  ui/pageviewmouseannotation.cpp PRE-CREATION 

Diff: https://git.reviewboard.kde.org/r/127366/diff/


Testing (updated)
-------

Resize and move work
-for types AText, AStamp and AGeom
-on all pages of document
-when viewport position changes
-when zoom level changes
-for all page rotations (0°, 90°, 180°, 270°)

Selection is canceled
-when currently selected annotation is deleted
-on mouse click outside of currently selected annotation
-ESC is pressed

Viewport is shifted when mouse cursor during move/resize comes close to 
viewport border.
Resize to negative is prevented.
Tiny annotations are still selectable.
If mouse is moved over an annotation type that we can focus, and the annotation 
is not yet focused, mouse cursor shape changes to arrow.
If mouse cursor rests over an annotation A, while annotation B is focused, a 
tooltip for annotation A is shown.

Test for regressions:
-Annotation interaction (focus, move, resize, start playback, ...) are only 
done in mode EnumMouseMode::Browse.
-If mouse is moved over an annotation type where we can start an action, mouse 
cursor shape changes to pointing hand.
-If mouse is moved over an annotation type that we can't interact with, mouse 
cursor shape stays a open hand.
-If mouse cursor rests over an annotation of any type, a tooltip for that 
annotation is shown.
-Grab/move scroll area (on left click + mouse move) is prevented, if mouse is 
over focused annotation, or over AMovie/AScreen/AFileAttachment annotation.
-A double click on a annotation starts the "annotator".


Thanks,

Tobias Deiminger

_______________________________________________
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel

Reply via email to