Marble: Add circular Measure Tool
completed by: Ilya Kowalewski
mentors: Dennis Nienhüser, shentey, Sanjiban Bairagya, Torsten Rahn
This task is of medium difficulty.
It's about adding a circular measure mode to Marble's measure tool plugin.
- Add a combobox to the measure tool plugin configuration widget. It's label should be "Mode:". The values should be "Polygon" and "Circular". Polygon should be default and describes the current way the measure tool works.
- By choosing "Circular" the behavior of the Measure Tool changes: It should only be possible to set two measure points. As soon as two measure points are set all options to add further measure points should be grayed out.
- The distance between the two points marks the radius of the circular area that is supposed to be measured.
- The circular area should be painted the same way as currently the bearing change is visualized. However instead of just painting a "pie arc" a full 360 degree circle should be painted. And the radius of the circle should match the distance between the two points. You can achieve this by modifying the parameters inside the moveByBearing call accordingly.
- The text with the area value should be centered inside the circle. Again you can take the "bearing change" code for inspiration. The value that is displayed is derived via the formula
S = 2 * PI * R² (1 - cos(d/R))
which is discussed here: https://astrographer.wordpress.com/2014/03/02/geometry-for-geographers/