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 = []
|
||||
|
|
|
@ -5118,7 +5118,7 @@ msgstr "Merkmale, die noch nicht vollständig ausgearbeitet wurden."
|
|||
#: fdmprinter.def.json
|
||||
msgctxt "support_tree_enable label"
|
||||
msgid "Tree Support"
|
||||
msgstr "Baumstruktur"
|
||||
msgstr "Baumstützstruktur"
|
||||
|
||||
#: fdmprinter.def.json
|
||||
msgctxt "support_tree_enable description"
|
||||
|
|
|
@ -15,9 +15,11 @@ Item
|
|||
{
|
||||
UM.I18nCatalog { id: catalog; name: "cura" }
|
||||
|
||||
property bool newCloudPrintersDetected: CuraApplication.getDiscoveredUltimakerCloudPrintersModel().newCloudPrintersDetected
|
||||
signal cloudPrintersDetected(bool newCloudPrintersDetected)
|
||||
|
||||
onNewCloudPrintersDetectedChanged:
|
||||
Component.onCompleted: CuraApplication.getDiscoveredUltimakerCloudPrintersModel().cloudPrintersDetectedChanged.connect(cloudPrintersDetected)
|
||||
|
||||
onCloudPrintersDetected:
|
||||
{
|
||||
// When the user signs in successfully, it will be checked whether he/she has cloud printers connected to
|
||||
// the account. If he/she does, then the welcome wizard can close. If not, then proceed to the next page (if any)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue