diff --git a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py index e43e522c0c..59c04dd822 100644 --- a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py +++ b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py @@ -246,6 +246,7 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): # Celsius. # \param duration How long the bed should stay warm, in seconds. Defaults # to a quarter hour. + @pyqtSlot(float, float) def preheatBed(self, temperature, duration=900): url = QUrl("http://" + self._address + self._api_prefix + "printer/bed/pre_heat") data = """{"temperature": "{temperature}", "timeout": "{timeout}"}""".format(temperature=str(temperature), timeout=str(duration)) @@ -256,6 +257,7 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): ## Cancels pre-heating the heated bed of the printer. # # If the bed is not pre-heated, nothing happens. + @pyqtSlot() def cancelPreheatBed(self): self.preheatBed(temperature=0) diff --git a/resources/qml/PrintMonitor.qml b/resources/qml/PrintMonitor.qml index c1fbdef983..4ff6d02c54 100644 --- a/resources/qml/PrintMonitor.qml +++ b/resources/qml/PrintMonitor.qml @@ -362,7 +362,7 @@ Column onClicked: { - print("Click!"); + connectedPrinter.preheatBed(preheatTemperatureInput.text, 900) } } }