Browse Source

Fix improperly removed method

Ian Paschal 6 years ago
parent
commit
f5379dda55
1 changed files with 5 additions and 0 deletions
  1. 5 0
      plugins/UM3NetworkPrinting/src/ClusterUM3OutputDevice.py

+ 5 - 0
plugins/UM3NetworkPrinting/src/ClusterUM3OutputDevice.py

@@ -13,6 +13,7 @@ from UM.FileHandler.WriteFileJob import WriteFileJob  # To call the file writer
 from UM.Logger import Logger
 from UM.Settings.ContainerRegistry import ContainerRegistry
 from UM.i18n import i18nCatalog
+from UM.Qt.Duration import Duration, DurationFormat
 
 from UM.Message import Message
 from UM.Scene.SceneNode import SceneNode  # For typing.
@@ -346,6 +347,10 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice):
     def getDateCompleted(self, time_remaining: int) -> str:
         return formatDateCompleted(time_remaining)
 
+    @pyqtSlot(int, result = str)
+    def formatDuration(self, seconds: int) -> str:
+        return Duration(seconds).getDisplayString(DurationFormat.Format.Short)
+
     @pyqtSlot(str)
     def sendJobToTop(self, print_job_uuid: str) -> None:
         # This function is part of the output device (and not of the printjob output model) as this type of operation