mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-16 18:59:39 +08:00
25 lines
684 B
Python
25 lines
684 B
Python
# Copyright (c) 2019 Ultimaker B.V.
|
|
# Cura is released under the terms of the LGPLv3 or higher.
|
|
|
|
from PyQt6.QtCore import Qt
|
|
from UM.Logger import Logger
|
|
from UM.Qt.ListModel import ListModel
|
|
|
|
|
|
class BuildPlateModel(ListModel):
|
|
NameRole = Qt.UserRole + 1
|
|
ContainerNodeRole = Qt.UserRole + 2
|
|
|
|
def __init__(self, parent = None):
|
|
super().__init__(parent)
|
|
|
|
self.addRoleName(self.NameRole, "name")
|
|
self.addRoleName(self.ContainerNodeRole, "container_node")
|
|
|
|
self._update()
|
|
|
|
def _update(self):
|
|
Logger.log("d", "Updating {model_class_name}.".format(model_class_name = self.__class__.__name__))
|
|
self.setItems([])
|
|
return
|