[Marble-devel] Review Request 119783: Introduced the concept of 'Focus Item' and some more code polishing

Cruceru Calin-Cristian crucerucalincristian at gmail.com
Sun Aug 17 13:05:18 UTC 2014


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

(Updated Aug. 17, 2014, 4:05 p.m.)


Review request for Marble.


Changes
-------

Updated patch to apply to master.


Repository: marble


Description (updated)
-------

This patch introduces the concept of Focus Item to Annotate Plugin which means that in order to execute some actions (or to simply modify an item) the user has to first mark the item as 'selected'. Torsten mentioned in Randa this feature and I thought it would be really nice to have something like this.

I also reordered the actions within the View menu (or within the Toolbar in marble-qt) to the same order they will be when we will move them to a separate dockwidget or something similar. So there are first the buttons for saving/loading annotation files. Then there are the actions which, when triggered, lead to adding the specified graphic item (notice that I modified a little bit the way polygons are being added, so that it is consistent with paths and placemarks - now the dialog pops-up immediately when pressing 'Add Polygon'). Then, there are the actions which get activated when an item has the focus, depending on the item's type (for example, when a polygon has the focus, all four - Add Polygon Hole, Merge Nodes, Add Nodes, Remove Item get enabled while when a placemark has the focus, only Remove Item is enabled). Notice that I changed the significance of 'Remove Item' action: it used to enter a state on which every clicked item was being removed; now, it has the significance of removing the focus item, which I find more intuitive and useful.

Also, when the edit dialog of a graphic item is being shown, all actions are disabled to avoid opening multiple dialogs and things like that. Also, in the same situation, right clicking an item won't work - otherwise, one could remove the item while the dialog is being shown and the dialog won't get destroyed which would lead to crashes.

One problem (in fact it is not a problem, but a feature which is missing) is that currently we don't have some visual effect when a placemark (text annotation) has the focus (you can only see that the 'Remove Item' within the toolbar gets enabled at the moment); for polygons/polylines - we show the nodes when the item has the focus. So I'm waiting suggestions on what should happen when a placemark has the focus.

Next I will work on optimizations, solving some issues (like the icons for placemarks, saving osm files, deep-copying geometries, etc) and writing documentation.


Diffs (updated)
-----

  src/plugins/render/annotate/AnnotatePlugin.h 771f8aa 
  src/plugins/render/annotate/AnnotatePlugin.cpp 2bfbc8d 
  src/plugins/render/annotate/AreaAnnotation.h 8a33881 
  src/plugins/render/annotate/AreaAnnotation.cpp 386ac8d 
  src/plugins/render/annotate/EditPolygonDialog.h 0df843a 
  src/plugins/render/annotate/EditPolygonDialog.cpp 522a71c 
  src/plugins/render/annotate/EditPolygonDialog.ui 3cd9f3d 
  src/plugins/render/annotate/EditPolylineDialog.h 1e894a7 
  src/plugins/render/annotate/EditPolylineDialog.cpp 7a78e57 
  src/plugins/render/annotate/EditTextAnnotationDialog.cpp 02c8014 
  src/plugins/render/annotate/PlacemarkTextAnnotation.cpp 3c6a183 
  src/plugins/render/annotate/PolylineAnnotation.h f80c11d 
  src/plugins/render/annotate/PolylineAnnotation.cpp 9b4db5a 
  src/plugins/render/annotate/SceneGraphicsItem.h 9e5b827 
  src/plugins/render/annotate/SceneGraphicsItem.cpp 6a7dec5 

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


Testing
-------


Thanks,

Cruceru Calin-Cristian

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20140817/949beaf5/attachment-0001.html>


More information about the Marble-devel mailing list