The class mitkOverlayController already has a method UpdateOverlayData( overlay ) that offers the possibility to update a specific overlay manually.
However this method is protected and cannot be used from the outside. Should be public.
The class mitkOverlayController already has a method UpdateOverlayData( overlay ) that offers the possibility to update a specific overlay manually.
However this method is protected and cannot be used from the outside. Should be public.
Furthermore, there should be a possibility to adjust the position of a specific overlay. Currently you can only use AdjustOverlayPosition() which will re-calculate and set the geometries of all overlayContainers. This is totally unnecessary and makes the overlays slow.
There should be a method AdjustOverlayPosition( overlay ) that only re-calculates the geometry of a single overlayContainer. This would speed the overlays up significantly.
I modified the method UpdateOverlayData(overlay) to be a public slot.
Furthermore I added the new method AdjustOverlayPosition(overlay) that recalculates the position of the OverlayContainer for a specific overlay only.
The QmitkTextOverlay and QmitkScalarBarOverlay have been improved in their performance as the Callback is no longer reset every time the text has changed. Now this is only done when necessary.
I removed the queued connection I build in as it sometimes causes crashes.
Instead, I set the minimum size of the container-widgets manually after calculating the minimal size of the contained overlays.
[675418]: Merge branch 'bug-12700-overlayController-improvements'
2012-12-20 11:05:33 Markus Engel [84a4d9]
explicitly setting size, added better method to remove all overlays
2012-12-20 11:04:57 Markus Engel [a1516c]
removed queuedConnection that causes crash sometimes
2012-12-20 11:00:34 Markus Engel [4872a0]
added new method to get size that is needed by overlay
2012-12-17 12:04:05 Markus Engel [5021d5]
only updating callback on property if necessary
2012-12-17 12:03:47 Markus Engel [943655]
added possibility to re-calculate position of specific overlay, made method public