From 2d8c19203e9f5a02045ba5fbed7b2c8a26459981 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 5 Jun 2019 09:57:42 +0200 Subject: [PATCH] Expose intent model to QML CURA-6534 --- cura/CuraApplication.py | 2 ++ cura/Machines/Models/IntentModel.py | 2 +- resources/intent/smooth.inst.cfg | 1 + resources/intent/strong.inst.cfg | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 2f0568693f..bec5d7975b 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -61,6 +61,7 @@ from cura.Arranging.Arrange import Arrange from cura.Arranging.ArrangeObjectsJob import ArrangeObjectsJob from cura.Arranging.ArrangeObjectsAllBuildPlatesJob import ArrangeObjectsAllBuildPlatesJob from cura.Arranging.ShapeArray import ShapeArray +from cura.Machines.Models.IntentModel import IntentModel from cura.Operations.SetParentOperation import SetParentOperation @@ -1069,6 +1070,7 @@ class CuraApplication(QtApplication): qmlRegisterSingletonType(CustomQualityProfilesDropDownMenuModel, "Cura", 1, 0, "CustomQualityProfilesDropDownMenuModel", self.getCustomQualityProfilesDropDownMenuModel) qmlRegisterType(NozzleModel, "Cura", 1, 0, "NozzleModel") + qmlRegisterType(IntentModel, "Cura", 1, 6, "IntentModel") qmlRegisterType(MaterialSettingsVisibilityHandler, "Cura", 1, 0, "MaterialSettingsVisibilityHandler") qmlRegisterType(SettingVisibilityPresetsModel, "Cura", 1, 0, "SettingVisibilityPresetsModel") diff --git a/cura/Machines/Models/IntentModel.py b/cura/Machines/Models/IntentModel.py index 47657a48e6..4a67ae3c87 100644 --- a/cura/Machines/Models/IntentModel.py +++ b/cura/Machines/Models/IntentModel.py @@ -2,7 +2,7 @@ # Cura is released under the terms of the LGPLv3 or higher. from typing import Optional -from PyQt5.QtCore.QObject import QObject +from PyQt5.QtCore import QObject from UM.Qt.ListModel import ListModel from PyQt5.QtCore import Qt diff --git a/resources/intent/smooth.inst.cfg b/resources/intent/smooth.inst.cfg index df5d171719..e0ec3713ea 100644 --- a/resources/intent/smooth.inst.cfg +++ b/resources/intent/smooth.inst.cfg @@ -1,6 +1,7 @@ [general] version = 4 name = Smooth (TEST INTENT) +definition = fdmprinter [metadata] setting_version = 7 diff --git a/resources/intent/strong.inst.cfg b/resources/intent/strong.inst.cfg index 10f78dff1c..4758841bf7 100644 --- a/resources/intent/strong.inst.cfg +++ b/resources/intent/strong.inst.cfg @@ -1,6 +1,7 @@ [general] version = 4 name = Strong (TEST INTENT) +definition = fdmprinter [metadata] setting_version = 7