mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-07-04 04:45:08 +08:00
Codestyle
This commit is contained in:
parent
4817c05a52
commit
d621162a9b
@ -5,14 +5,18 @@ from zeroconf import Zeroconf, ServiceBrowser, ServiceStateChange
|
||||
from UM.Signal import Signal, SignalEmitter
|
||||
from UM.Application import Application
|
||||
|
||||
|
||||
class WifiOutputDevicePlugin(OutputDevicePlugin, SignalEmitter):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self._zero_conf = Zeroconf()
|
||||
self._browser = None
|
||||
self._connections = {}
|
||||
self.addConnectionSignal.connect(self.addConnection) #Because the model needs to be created in the same thread as the QMLEngine, we use a signal.
|
||||
|
||||
# Because the model needs to be created in the same thread as the QMLEngine, we use a signal.
|
||||
self.addConnectionSignal.connect(self.addConnection)
|
||||
Application.getInstance().getMachineManager().activeMachineInstanceChanged.connect(self._onActiveMachineInstanceChanged)
|
||||
|
||||
addConnectionSignal = Signal()
|
||||
|
||||
## Start looking for devices on network.
|
||||
@ -31,7 +35,6 @@ class WifiOutputDevicePlugin(OutputDevicePlugin, SignalEmitter):
|
||||
self._connections[address].connectionStateChanged.connect(self._onPrinterConnectionStateChanged)
|
||||
else:
|
||||
self._connections[address].close()
|
||||
print("on active machine instance changed" , active_machine_key)
|
||||
|
||||
## Because the model needs to be created in the same thread as the QMLEngine, we use a signal.
|
||||
def addConnection(self, name, address, properties):
|
||||
|
Loading…
x
Reference in New Issue
Block a user