mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 07:27:29 -06:00
Support for manual device addition for plugins (WIP). [CURA-6294]
This commit is contained in:
parent
48cc9b3c1d
commit
7a7e710b2a
3 changed files with 11 additions and 3 deletions
|
@ -15,6 +15,7 @@ from cura.CuraApplication import CuraApplication
|
|||
from cura.PrinterOutputDevice import ConnectionType
|
||||
from cura.Settings.GlobalStack import GlobalStack # typing
|
||||
from UM.OutputDevice.OutputDevicePlugin import OutputDevicePlugin
|
||||
from UM.OutputDevice.OutputDeviceManager import ManualDeviceAdditionAttempt
|
||||
from UM.Logger import Logger
|
||||
from UM.Signal import Signal, signalemitter
|
||||
from UM.Version import Version
|
||||
|
@ -181,6 +182,10 @@ class UM3OutputDevicePlugin(OutputDevicePlugin):
|
|||
self._zero_conf.close()
|
||||
self._cloud_output_device_manager.stop()
|
||||
|
||||
def canAddManualDevice(self, address: str) -> ManualDeviceAdditionAttempt:
|
||||
return ManualDeviceAdditionAttempt.POSSIBLE
|
||||
# TODO?: Check if address is a valid IP (by regexp?).
|
||||
|
||||
def removeManualDevice(self, key, address = None):
|
||||
if key in self._discovered_devices:
|
||||
if not address:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue