Should have done this from the start.
Will move other relevant scattered functions to this type.
For now it checks if the restart banner needs to show.
Taking into account that a user can toggle between enable
and disable without an actual restart. Even with multiple
plugins.
Contributes to: CURA-8587
Otherwise this isn't saved, and the state of 'installed, but needs restart' (as shown in the package card) won't be known to the package card (buttons), resulting in an 'Install' button when tabs are switched.
part of CURA-8587
I considered rewriting the section title property to be QML-only and translate it from the QML, but this is a bit simpler in the end, even though there is data duplication now.
Contributes to issue CURA-8565.
The state and styling of this coupled with the available options.
Discussed with UX that primary state: Install, Enable, Update while
secondary states are: Uninstall, Disable
Each primary/secondary state also has a busy state, with the verb
and spinner.
Contributes to: CURA-8587
The union vs. intersection here is a guess. I'm guessing the online Marketplace displays compatibility if ANY materials/combinations are compatible, not requiring that ALL materials/combinations are compatible. We'll have to review that.
Contributes to issue CURA-8585.
This one is quite complex because the support material names are in their profiles, so we need to consult the profiles, if present.
Contributes to issue CURA-8585.
Rich Text is rendered a bit like HTML, where all of the whitespace gets changed into a single space. This is normally not so bad, but with newlines it's annoying. This preserves the newlines from the description.
Contributes to issue CURA-8565.
I considered rewriting the section title property to be QML-only and translate it from the QML, but this is a bit simpler in the end, even though there is data duplication now.
Contributes to issue CURA-8565.
We can't show rich text in the package list, because the we use the onLineLaidOut signal there, which doesn't work with Rich Text. So for the package list we should NOT use the formatted version of the description because that will contain ugly HTML tags that the user wouldn't want to see. Show the original description there. Use the formatted description only in the detail page where we don't use onLineLaidOut.
Contributes to issue CURA-8565.
It's the same, but it's a bit easier to read what it's doing. Placing the package type check first also helps to read what the two cases are here.
Contributes to issue CURA-8562.
Materials can be certified, while plugins can be verified.
Added packageType to the model such that the card knows which icon
to use.
Contributes to CURA-8562