mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-10 00:07:51 -06:00
Add some extrudare information fetching.
CURA-9278
This commit is contained in:
parent
9c1e624b43
commit
ea596bdd90
1 changed files with 6 additions and 4 deletions
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
# TODO?: documentation
|
# TODO?: documentation
|
||||||
|
|
||||||
from typing import Optional, Dict
|
from typing import Optional, Dict, cast
|
||||||
|
|
||||||
from PyQt6.QtCore import Qt, QObject, pyqtSlot, pyqtProperty, pyqtSignal
|
from PyQt6.QtCore import Qt, QObject, pyqtSlot, pyqtProperty, pyqtSignal
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@ from UM.i18n import i18nCatalog
|
||||||
from UM.Util import parseBool
|
from UM.Util import parseBool
|
||||||
|
|
||||||
from cura.Settings.CuraContainerRegistry import CuraContainerRegistry
|
from cura.Settings.CuraContainerRegistry import CuraContainerRegistry
|
||||||
|
from cura.Settings.ExtruderStack import ExtruderStack
|
||||||
|
|
||||||
|
|
||||||
class CompatibleMachineModel(ListModel):
|
class CompatibleMachineModel(ListModel):
|
||||||
|
@ -68,13 +69,14 @@ class CompatibleMachineModel(ListModel):
|
||||||
self.appendItem({
|
self.appendItem({
|
||||||
"name": container_stack.getName(),
|
"name": container_stack.getName(),
|
||||||
"id": container_stack.getId(),
|
"id": container_stack.getId(),
|
||||||
"extruders": [self.getExtruderModel(extruder) for extruder in extruders]
|
"extruders": [self.getExtruderModel(cast(ExtruderStack, extruder)) for extruder in extruders]
|
||||||
})
|
})
|
||||||
|
|
||||||
def getExtruderModel(self, extruders: ContainerStack) -> Dict:
|
def getExtruderModel(self, extruder: ExtruderStack) -> Dict:
|
||||||
# Temp Dummy Data
|
# Temp Dummy Data
|
||||||
|
# ExtruderConfigrationModel does what we want here
|
||||||
extruder_model = {
|
extruder_model = {
|
||||||
"core": "AA 0.4",
|
"core": extruder.quality.getMetaDataEntry("variant", ""),
|
||||||
"materials": [{"name": "Ultimaker Blue", "color": "blue"}, {"name": "Ultimaker Red", "color": "red"}, {"name": "Ultimaker Orange", "color": "orange"}]
|
"materials": [{"name": "Ultimaker Blue", "color": "blue"}, {"name": "Ultimaker Red", "color": "red"}, {"name": "Ultimaker Orange", "color": "orange"}]
|
||||||
}
|
}
|
||||||
return extruder_model
|
return extruder_model
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue