enh(viz): add current point selection to SLandmarks
Description
The sight::data::Landmarks handles a vector of points which are the landmarks. Graphicaly, the sight::ui::qt::metrics::SLandmarks is a visual handler for the Landmarcks. It allows to delete them, rename them, etc... and to select a specific point.
Up to now, when a service needs to work on the selected point in the landmarks, it takes the whole Landmark data as input, and listens the various Landmarks signal (add, point selected, etc...), while SLandmark service sends a signal when a specific point is selected with its world coordinates as parameters. However, this signal is send on landmark double click, and, for example, not on landmark creation.
This can be simplified to make it easier to work on the selected point.
Proposal
- add an optional inout to SLandmarck which is a sight::data::Point currentLandmark.
- update the currentLandmark with the world coordinates of the selected landmark.
- a landmark is made current when it is created or when there is a double click on it.
- notify the sendWorldCoord signal when the landmark is made current.
Technical specifications
- add an optional inout to SLandmarck which is a sight::data::Point currentLandmark.
- update the currentLandmark with the world coordinates of the selected landmark.
- a landmark is made current when it is created or when there is a double click on it.
- notify the sendWorldCoord signal when the landmark is made current.
Test plan
There is presently no ut on SLandmarks because of graphical issues. To test this, get the currentLandmark from a SLandmark, add it in an adaptor, and verify that it is well updated on Landmark creation or selection.