Added edit dialog for placemarks
Review Request #119537 - Created July 29, 2014 and submitted
I removed the bubble which popped up when clicking placemarks and I added a new way to customize placemarks - an edit dialog. This has customizing options for the following:
- link to the icon;
- placemark's coordinates;
- label color/scale;
- icon color/scale.
The way it works is the following: just click the 'Add Placemark' action in the View menu (or in the toolbar if you are running marble-qt) and a placemark will automatically be added on the focus point on the map and the dialog will show up. Then, if the 'Close' button is clicked, the placemark which has just been added gets removed (it most probably means that the 'Add placemark' button has been pressed by mistake). If the 'Ok' button is pressed, the placemark gets saved. What is more, any change on dialog's fields gets reflected on placemark's style/position immediately. I found this behaviour nicer than the 'Apply' method which has been used on Polygon's edit dialog and I'm planning to change that to be consistent with this one. If you are ok with this, of course.
There are, still, a couple of problems, which will take some time to deal with, but are not very imperious. These are:
- the 'scale' field on both icon and label does not work at the moment. idis told me that most probably the scale is not considered when rendering the placemarks. I found a way to make it 'change something' (for label so far), but I'm not sure if this is what should happen, it label becomes very low-quality. See the attached patch. Please apply it after applying the main patch and tell me what you think about it. What else should be modified so that the label's text would become larger, not just zoomed (how it looks with this patch).
- the color selector field for icon does nothing for the moment, simply because I'm using GeoDataColorStyle::setColor() which when being called from a GeoDataIconStyle instance does not actually affect the icon (the image) - which in fact is obvious. There are a couple of options here. One would be to create a couple of placemark icons, save them as .svg and implement a mechanism to change their color (using QGraphicsSvgItem for example).
I'm waiting feedback on the feature this patch adds as well as suggestions on the issues I listed above.