mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Add dedicate functions for exportedSettingModelItems
and exportedSettingModelRowCount
This commit is contained in:
parent
a58cd69b39
commit
4dd0113a78
2 changed files with 9 additions and 9 deletions
|
@ -362,6 +362,13 @@ class WorkspaceDialog(QObject):
|
||||||
def exportedSettingModel(self):
|
def exportedSettingModel(self):
|
||||||
return self._exported_settings_model
|
return self._exported_settings_model
|
||||||
|
|
||||||
|
@pyqtProperty("QVariantList", notify=exportedSettingModelChanged)
|
||||||
|
def exportedSettingModelItems(self):
|
||||||
|
return self._exported_settings_model.items
|
||||||
|
|
||||||
|
@pyqtProperty(int, notify=exportedSettingModelChanged)
|
||||||
|
def exportedSettingModelRowCount(self):
|
||||||
|
return self._exported_settings_model.rowCount()
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def closeBackend(self) -> None:
|
def closeBackend(self) -> None:
|
||||||
"""Close the backend: otherwise one could end up with "Slicing..."""
|
"""Close the backend: otherwise one could end up with "Slicing..."""
|
||||||
|
|
|
@ -173,7 +173,7 @@ UM.Dialog
|
||||||
{
|
{
|
||||||
id: numberOfOverrides
|
id: numberOfOverrides
|
||||||
leftLabelText: catalog.i18nc("@action:label", "Settings Loaded from UCP file")
|
leftLabelText: catalog.i18nc("@action:label", "Settings Loaded from UCP file")
|
||||||
rightLabelText: catalog.i18ncp("@action:label", "%1 override", "%1 overrides", manager.exportedSettingModel.rowCount()).arg(manager.exportedSettingModel.rowCount())
|
rightLabelText: catalog.i18ncp("@action:label", "%1 override", "%1 overrides", manager.exportedSettingModelRowCount).arg(manager.exportedSettingModelRowCount)
|
||||||
buttonText: tableViewSpecificSettings.shouldBeVisible ? catalog.i18nc("@action:button", "Hide settings") : catalog.i18nc("@action:button", "Show settings")
|
buttonText: tableViewSpecificSettings.shouldBeVisible ? catalog.i18nc("@action:button", "Hide settings") : catalog.i18nc("@action:button", "Show settings")
|
||||||
onButtonClicked: tableViewSpecificSettings.shouldBeVisible = !tableViewSpecificSettings.shouldBeVisible
|
onButtonClicked: tableViewSpecificSettings.shouldBeVisible = !tableViewSpecificSettings.shouldBeVisible
|
||||||
}
|
}
|
||||||
|
@ -196,16 +196,9 @@ UM.Dialog
|
||||||
{
|
{
|
||||||
id: tableModel
|
id: tableModel
|
||||||
headers: ["category", "label", "value"]
|
headers: ["category", "label", "value"]
|
||||||
rows: manager.exportedSettingModel.items
|
rows: manager.exportedSettingModelItems
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
property var modelRows: manager.exportedSettingModel.items
|
|
||||||
onModelRowsChanged:
|
|
||||||
{
|
|
||||||
tableModel.clear()
|
|
||||||
tableModel.rows = modelRows
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
comboboxVisible: manager.qualityChangesConflict
|
comboboxVisible: manager.qualityChangesConflict
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue