Implement ServiceStateChange.Removed (bonjour undiscovery)

Contributes to CURA-1851
This commit is contained in:
fieldOfView 2016-07-27 16:41:06 +02:00
parent 050e81053f
commit 136755758e
3 changed files with 23 additions and 9 deletions

View file

@ -233,6 +233,7 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
self._updateHeadPosition(head_x, head_y, head_z)
def close(self):
self._updateJobState("")
self.setConnectionState(ConnectionState.closed)
if self._progress_message:
self._progress_message.hide()
@ -279,6 +280,11 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
self._update_timer.start()
self._camera_timer.start()
## Stop requesting data from printer
def disconnect(self):
Logger.log("d", "Connection with printer %s with ip %s stopped", self._key, self._address)
self.close()
newImage = pyqtSignal()
@pyqtProperty(QUrl, notify = newImage)