resolve binding loo in `SyncState`
move `updateCostPerMeter` function to root of `MaterialView` such that it is available of all sub components
Cura 8687
Forgot to update Readonly `SpinBox`es to Qt 2 when implementing Cura
8684. As the spinbox is used in various places with the same
functionality it made sense to create a reusable component.
There is still a feature gap in the implementation; The `SpinBox`es
from QtControls 2.x value is defined as an integer. For some use-cases
we do require a fractional value in the `SpinBox`. The only two places
where this is required are the `material_diameter` and
`material_density` fields in the material prefference page.
Cura 8684
- When both branches added Controls1 as OldControls, it's not marked as a merge conflict. But the merge removed the need for OldControls, so the import can be removed.
- There was one instance where I had removed the OldControls for a checkbox but there it should remain since the checkboxes are updated in a separate ticket.
Contributes to issue CURA-8684.
Conflicts:
plugins/ImageReader/ConfigUI.qml
plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml
plugins/PerObjectSettingsTool/SettingPickDialog.qml
resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml
resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml
resources/qml/Preferences/GeneralPage.qml
resources/qml/Preferences/Materials/MaterialsPage.qml
resources/qml/Preferences/Materials/MaterialsView.qml
resources/qml/Preferences/ProfilesPage.qml
These conflicts are all arising from headers/includes being updated at the same time, or from the two branches marking the other one's components as needing OldControls.
This introduced more OldControls markers which don't get marked as merge conflicts by Git. This happens when an element could just be left as the original name but from the new import (e.g. a Button stays a Button in Controls 2, but should be marked as from OldControls on the branch that doesn't update the Button).
The contents of the page is done with a simple page that becomes visible or not. The easiest solution I could think of. No StackLayout necessary here.
Contributes to issue CURA-8686.
This was a bit of a doozy. One was really simple but the other one had me stumped for a while: The Controls2 version doesn't have the viewport property any more, so just use the width.
Contributes to issue CURA-8686.
It was not being displayed with Qt 5.15 due to the following error:
MaterialsView.qml:34:5: Unable to assign QStringList to QString
This is correct. And it should not just concatenate all of these material names; it should add a comma between them for human-readable display in the text label above the button.
Fixes#10235.
Just like MaterialManager used to be. There can be only one instance of the page then.
This prevents a crash when Qt deletes the QObject because it's no longer used in the page when you close the preferences screen. But when you open it again it doesn't construct a new one. Now there is always one instance so that's not a problem any more. Also it allows other pages to access this item.
Contributes to issue CURA-6600.
correctly selected when there is more than one brand (stupid mistake).
Also fix problems when the user changes some material information.
Contributes to CURA-5682.