[Okular-devel] Adding an annotation selection mode

Albert Astals Cid aacid at kde.org
Mon Nov 25 19:05:07 UTC 2013


El Diumenge, 24 de novembre de 2013, a les 20:23:40, Jon Mease va escriure:
> Greetings,

Hi

>      After some time away I'm ready to work a bit more on enhancing
> Okular's annotation support.
> 
>      I am interested in working towards adding an "Annotation Selection
> Tool" that would live under the "Tools" menu.  I would like this tool to
> provide functionality that is similar to the "Shape handling" mode in
> Calligra Words. Below I've sketched out the 6 main features that I would
> like to see provided by this tool.
> 
> 1) Selection: Left click on an annotation to select it. Hold control while
> left clicking an annotation to add it to the current set of selected
> annotations. Left click and drag to select all of the annotations in a
> rectangular region.  A selection rectangle is drawn around the set of
> selected annotations.
> 
> 2) Delete selected annotations:  The current set of selected annotations
> may be deleted by hitting the delete key or by right clicking and selecting
> 'Delete' from a context menu.
> 
> 3) Move selected annotations: The current set of selected annotations may
> be moved together by left click dragging the selection rectangle.
> 
> 4) Resize selected annotations: The selection rectangle may be resized by
> dragging resize handles. This scales all selected annotations accordingly.
> 
> 5) Edit selected annotation properties:  It should be possible to edit
> certain properties on all selected annotations (such as color).
> 
> 6) Edit geometry of selected annotations:  Selected annotations may display
> drag handles used to alter their geometry.  For example, these drag handles
> could be used to alter the start and end points of a line or the vertices
> of a polygon.
> 
>      Since this is a large undertaking (at least for me as a part-time
> hobby project) I wanted to get some feedback from the community before
> getting started.  Do you like the overall idea?  Any questions or concerns
> at this 10,000 foot level?

Looks good, I'm not sure we need/want a new tool for this, ideally we should 
be collapsing the tools into a single one (it's not the first time people open 
a bug because they are in text selection tool and not in browse tool and links 
don't work), so ideally i'd like you to implement it as part of the browse 
tool and only split it out if absolutely necessary.

Besides that, everything else makes sense to me :-)

Cheers,
  Albert

> 
>      If the overall idea sounds good to everyone, I think I'll first work
> on implementing items 1-3 above and submit that for review before looking
> at 4, 5, and 6. Based on my experience last year implementing undo/redo
> support for annotations, I'm pretty confident that 1-3 will be fairly
> straightforward to implement and won't require a lot of refactoring of the
> core annotation code in Okular.  Items 4, 5, and 6 on the other hand I do
> expect to require a fair amount of refactoring.
> 
> Thoughts?
> 
> -Jon



More information about the Okular-devel mailing list