|
@@ -42,7 +42,7 @@ class PrintJobOutputModel(QObject):
|
|
|
self._preview_image = None # type: Optional[QImage]
|
|
|
|
|
|
@pyqtProperty("QStringList", notify=compatibleMachineFamiliesChanged)
|
|
|
- def compatibleMachineFamilies(self):
|
|
|
+ def compatibleMachineFamilies(self) -> List[str]:
|
|
|
# Hack; Some versions of cluster will return a family more than once...
|
|
|
return list(set(self._compatible_machine_families))
|
|
|
|
|
@@ -77,11 +77,11 @@ class PrintJobOutputModel(QObject):
|
|
|
self._configuration = configuration
|
|
|
self.configurationChanged.emit()
|
|
|
|
|
|
- @pyqtProperty(str, notify=ownerChanged)
|
|
|
- def owner(self):
|
|
|
+ @pyqtProperty(str, notify = ownerChanged)
|
|
|
+ def owner(self) -> str:
|
|
|
return self._owner
|
|
|
|
|
|
- def updateOwner(self, owner):
|
|
|
+ def updateOwner(self, owner: str) -> None:
|
|
|
if self._owner != owner:
|
|
|
self._owner = owner
|
|
|
self.ownerChanged.emit()
|
|
@@ -132,7 +132,7 @@ class PrintJobOutputModel(QObject):
|
|
|
|
|
|
@pyqtProperty(float, notify = timeElapsedChanged)
|
|
|
def progress(self) -> float:
|
|
|
- result = float(self.timeElapsed) / max(self.timeTotal, 1.0) # Prevent a division by zero exception.
|
|
|
+ result = float(self.timeElapsed) / max(self.timeTotal, 1.0) # Prevent a division by zero exception.
|
|
|
return min(result, 1.0) # Never get a progress past 1.0
|
|
|
|
|
|
@pyqtProperty(str, notify=stateChanged)
|
|
@@ -151,12 +151,12 @@ class PrintJobOutputModel(QObject):
|
|
|
return False
|
|
|
return True
|
|
|
|
|
|
- def updateTimeTotal(self, new_time_total):
|
|
|
+ def updateTimeTotal(self, new_time_total: int) -> None:
|
|
|
if self._time_total != new_time_total:
|
|
|
self._time_total = new_time_total
|
|
|
self.timeTotalChanged.emit()
|
|
|
|
|
|
- def updateTimeElapsed(self, new_time_elapsed):
|
|
|
+ def updateTimeElapsed(self, new_time_elapsed: int) -> None:
|
|
|
if self._time_elapsed != new_time_elapsed:
|
|
|
self._time_elapsed = new_time_elapsed
|
|
|
self.timeElapsedChanged.emit()
|