mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-10 16:27:51 -06:00
Merge branch 'master' into CURA-7022_Add_cloud_printer_within_add_a_connected_printer
This commit is contained in:
commit
c7cf0fab2f
3 changed files with 9 additions and 7 deletions
|
@ -14,7 +14,7 @@ class DiscoveredUltimakerCloudPrintersModel(ListModel):
|
|||
DeviceTypeRole = Qt.UserRole + 3
|
||||
DeviceFirmwareVersionRole = Qt.UserRole + 4
|
||||
|
||||
cloudPrintersDetectedChanged = pyqtSignal()
|
||||
cloudPrintersDetectedChanged = pyqtSignal(bool)
|
||||
|
||||
def __init__(self, application: "CuraApplication", parent: Optional["QObject"] = None) -> None:
|
||||
super().__init__(parent)
|
||||
|
@ -28,7 +28,7 @@ class DiscoveredUltimakerCloudPrintersModel(ListModel):
|
|||
self._new_cloud_printers_detected = False # type: bool
|
||||
self._application = application # type: CuraApplication
|
||||
|
||||
def addDiscoveredUltimakerCloudPrinters(self, new_devices) -> None:
|
||||
def addDiscoveredUltimakerCloudPrinters(self, new_devices: List[Optional[Dict[str, str]]]) -> None:
|
||||
for device in new_devices:
|
||||
self._discovered_ultimaker_cloud_printers_list.append({
|
||||
"key": device.getId(),
|
||||
|
@ -40,14 +40,14 @@ class DiscoveredUltimakerCloudPrintersModel(ListModel):
|
|||
|
||||
# Inform whether new cloud printers have been detected. If they have, the welcome wizard can close.
|
||||
self._new_cloud_printers_detected = len(new_devices) > 0
|
||||
self.cloudPrintersDetectedChanged.emit()
|
||||
self.cloudPrintersDetectedChanged.emit(len(new_devices) > 0)
|
||||
|
||||
@pyqtSlot()
|
||||
def clear(self) -> None:
|
||||
self._discovered_ultimaker_cloud_printers_list = []
|
||||
self._update()
|
||||
self._new_cloud_printers_detected = False
|
||||
self.cloudPrintersDetectedChanged.emit()
|
||||
self.cloudPrintersDetectedChanged.emit(False)
|
||||
|
||||
def _update(self) -> None:
|
||||
items = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue