mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-10 16:27:51 -06:00
CURA-5035 Add compatibility chart
This commit is contained in:
parent
0c51173bed
commit
0872d499f8
7 changed files with 169 additions and 74 deletions
37
plugins/Toolbox/src/ConfigsModel.py
Normal file
37
plugins/Toolbox/src/ConfigsModel.py
Normal file
|
@ -0,0 +1,37 @@
|
|||
# Copyright (c) 2018 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import re
|
||||
from typing import Dict
|
||||
from PyQt5.QtCore import Qt, pyqtProperty
|
||||
from UM.Qt.ListModel import ListModel
|
||||
|
||||
## Model that holds supported configurations (for material/quality packages).
|
||||
class ConfigsModel(ListModel):
|
||||
def __init__(self, parent = None):
|
||||
super().__init__(parent)
|
||||
|
||||
self._configs = None
|
||||
|
||||
self.addRoleName(Qt.UserRole + 1, "machine")
|
||||
self.addRoleName(Qt.UserRole + 2, "print_core")
|
||||
self.addRoleName(Qt.UserRole + 3, "build_plate")
|
||||
self.addRoleName(Qt.UserRole + 4, "support_material")
|
||||
self.addRoleName(Qt.UserRole + 5, "quality")
|
||||
|
||||
def setConfigs(self, configs):
|
||||
self._configs = configs
|
||||
self._update()
|
||||
|
||||
def _update(self):
|
||||
items = []
|
||||
for item in self._configs:
|
||||
items.append({
|
||||
"machine": item["machine"],
|
||||
"print_core": item["print_core"],
|
||||
"build_plate": item["build_plate"],
|
||||
"support_material": item["support_material"],
|
||||
"quality": item["quality"]
|
||||
})
|
||||
|
||||
self.setItems(items)
|
Loading…
Add table
Add a link
Reference in a new issue