CURA-12660
This required a refactoring of the management of the active view. The previous behavior was that anyone could set the active view, depending on certain conditions. But now we also have a view that is set by a tool, so sometimes the actually set view would be incorrect. Now each Stage requests an active view, and each tool CAN also request an active view. Then the Controller decides which view should actually be active depending on the active stage and tool.
For some reason, the prepare menu is still one pixel too small. I think it's got to do with that one being a layout rather than a normal row.
Contributes to issue CURA-8202.
We want to keep it this way so people can still make plugins work for older versions of Cura, like 3.6, where the 'api' field with just a single major version, instead of the 'supported_sdk_versions', which can be either a version-string like '7.6.0' or a list of version strings.
The Cura 4.9 release will have expanded functionality. If you have a plug-in that uses this functionality, marking it as using SDK 7.5.0 will notify older Cura releases that they can't use that plug-in.
Previously, panelTop had to be defined externally whenever
SimulationViewMainComponent was used. I renamed it and set a default
so the binding by a parent is optional.
CURA-6853
In theory it should be possible to add stages, but there is no possiblity to add any other stage in between. Therefore I moved the weights by 10+n*10. So we can add 10 before prepare and 9 stages between those 3 known stages.
It is probably possible to set the same weight to multiple stages, but I'm not sure how Cura decides, which stage to take first then. By the moment the plugin's init is called? Or by alphabet?
Therefore putting some space in between the weights should give some clearity.
This way it's more dynamic: You don't need to hardcode the plug-in name in the widget to see whether or not it's visible.
Contributes to issue CURA-6086.
They can then decide if it needs to be there. For instance, the monitor stage doesn't want to have this panel. Also each stage can position it where they like, and in the near future I'll make a feature to let it decide whether or not to show the preview button.
Contributes to issue CURA-6086.
This way the expandable components can have rounded corners only on one side,
thus preventing the need to do add backgrounds to the rows that they are in.
CURA-5785