mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Rename models to prevent conflict
This commit is contained in:
parent
e35fba6f05
commit
700f7179f1
4 changed files with 14 additions and 14 deletions
|
@ -8,29 +8,29 @@ from typing import Optional
|
|||
|
||||
MYPY = False
|
||||
if MYPY:
|
||||
from cura.PrinterOutput.PrinterModel import PrinterModel
|
||||
from cura.PrinterOutput.MaterialModel import MaterialModel
|
||||
from cura.PrinterOutput.PrinterOutputModel import PrinterOutputModel
|
||||
from cura.PrinterOutput.MaterialOutputModel import MaterialOutputModel
|
||||
|
||||
|
||||
class ExtruderModel(QObject):
|
||||
class ExtruderOutputModel(QObject):
|
||||
hotendIDChanged = pyqtSignal()
|
||||
targetHotendTemperatureChanged = pyqtSignal()
|
||||
hotendTemperatureChanged = pyqtSignal()
|
||||
activeMaterialChanged = pyqtSignal()
|
||||
|
||||
def __init__(self, printer: "PrinterModel", parent=None):
|
||||
def __init__(self, printer: "PrinterOutputModel", parent=None):
|
||||
super().__init__(parent)
|
||||
self._printer = printer
|
||||
self._target_hotend_temperature = 0
|
||||
self._hotend_temperature = 0
|
||||
self._hotend_id = ""
|
||||
self._active_material = None # type: Optional[MaterialModel]
|
||||
self._active_material = None # type: Optional[MaterialOutputModel]
|
||||
|
||||
@pyqtProperty(QObject, notify = activeMaterialChanged)
|
||||
def activeMaterial(self) -> "MaterialModel":
|
||||
def activeMaterial(self) -> "MaterialOutputModel":
|
||||
return self._active_material
|
||||
|
||||
def updateActiveMaterial(self, material: Optional["MaterialModel"]):
|
||||
def updateActiveMaterial(self, material: Optional["MaterialOutputModel"]):
|
||||
if self._active_material != material:
|
||||
self._active_material = material
|
||||
self.activeMaterialChanged.emit()
|
|
@ -4,7 +4,7 @@
|
|||
from PyQt5.QtCore import pyqtSignal, pyqtProperty, QObject, QVariant, pyqtSlot
|
||||
|
||||
|
||||
class MaterialModel(QObject):
|
||||
class MaterialOutputModel(QObject):
|
||||
def __init__(self, guid, type, color, brand, parent = None):
|
||||
super().__init__(parent)
|
||||
self._guid = guid
|
|
@ -4,7 +4,7 @@
|
|||
from PyQt5.QtCore import pyqtSignal, pyqtProperty, QObject, QVariant
|
||||
|
||||
|
||||
class PrintJobModel(QObject):
|
||||
class PrintJobOutputModel(QObject):
|
||||
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent)
|
|
@ -7,11 +7,11 @@ from typing import Optional, List
|
|||
|
||||
MYPY = False
|
||||
if MYPY:
|
||||
from cura.PrinterOutput.PrintJobModel import PrintJobModel
|
||||
from cura.PrinterOutput.ExtruderModel import ExtruderModel
|
||||
from cura.PrinterOutput.PrintJobOutputModel import PrintJobOutputModel
|
||||
from cura.PrinterOutput.ExtruderOuputModel import ExtruderOutputModel
|
||||
|
||||
|
||||
class PrinterModel(QObject):
|
||||
class PrinterOutputModel(QObject):
|
||||
bedTemperatureChanged = pyqtSignal()
|
||||
targetBedTemperatureChanged = pyqtSignal()
|
||||
printerStateChanged = pyqtSignal()
|
||||
|
@ -24,9 +24,9 @@ class PrinterModel(QObject):
|
|||
self._target_bed_temperature = 0
|
||||
self._name = ""
|
||||
|
||||
self._extruders = [] # type: List[ExtruderModel]
|
||||
self._extruders = [] # type: List[ExtruderOutputModel]
|
||||
|
||||
self._active_print_job = None # type: Optional[PrintJobModel]
|
||||
self._active_print_job = None # type: Optional[PrintJobOutputModel]
|
||||
|
||||
# Features of the printer;
|
||||
self._can_pause = True
|
Loading…
Add table
Add a link
Reference in a new issue