Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey de l'Arago <joeydelarago@gmail.com>2022-11-11 18:34:08 +0300
committerJoey de l'Arago <joeydelarago@gmail.com>2022-11-11 18:34:08 +0300
commit1d34cd01c1f9c9b3e747a9819f7d843019cd0c49 (patch)
tree227e7f085c6e32c72113e0a9bc2bce718b48ff85
parentbbadc9c8877e24ce6c1c797946e331e0577749cb (diff)
Removed unused UpdatableMachinesModel.py
CURA-9424
-rw-r--r--plugins/3MFReader/UpdatableMachinesModel.py43
1 files changed, 0 insertions, 43 deletions
diff --git a/plugins/3MFReader/UpdatableMachinesModel.py b/plugins/3MFReader/UpdatableMachinesModel.py
deleted file mode 100644
index 9d6eee6c3e..0000000000
--- a/plugins/3MFReader/UpdatableMachinesModel.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright (c) 2020 Ultimaker B.V.
-# Cura is released under the terms of the LGPLv3 or higher.
-
-from typing import Dict, List
-
-from PyQt6.QtCore import Qt
-
-from UM.Qt.ListModel import ListModel
-from cura.Settings.GlobalStack import GlobalStack
-
-create_new_list_item = {
- "id": "new",
- "name": "Create new",
- "displayName": "Create new",
- "type": "default_option" # to make sure we are not mixing the "Create new" option with a printer with id "new"
-} # type: Dict[str, str]
-
-
-class UpdatableMachinesModel(ListModel):
- """Model that holds cura packages.
-
- By setting the filter property the instances held by this model can be changed.
- """
-
- def __init__(self, parent = None) -> None:
- super().__init__(parent)
-
- self.addRoleName(Qt.ItemDataRole.UserRole + 1, "id")
- self.addRoleName(Qt.ItemDataRole.UserRole + 2, "name")
- self.addRoleName(Qt.ItemDataRole.UserRole + 3, "displayName")
- self.addRoleName(Qt.ItemDataRole.UserRole + 4, "type") # Either "default_option" or "machine"
-
- def update(self, machines: List[GlobalStack]) -> None:
- items = [create_new_list_item] # type: List[Dict[str, str]]
-
- for machine in sorted(machines, key = lambda printer: printer.name):
- items.append({
- "id": machine.id,
- "name": machine.name,
- "displayName": "Update " + machine.name,
- "type": "machine"
- })
- self.setItems(items)