mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-11 00:37:50 -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
|
DeviceTypeRole = Qt.UserRole + 3
|
||||||
DeviceFirmwareVersionRole = Qt.UserRole + 4
|
DeviceFirmwareVersionRole = Qt.UserRole + 4
|
||||||
|
|
||||||
cloudPrintersDetectedChanged = pyqtSignal()
|
cloudPrintersDetectedChanged = pyqtSignal(bool)
|
||||||
|
|
||||||
def __init__(self, application: "CuraApplication", parent: Optional["QObject"] = None) -> None:
|
def __init__(self, application: "CuraApplication", parent: Optional["QObject"] = None) -> None:
|
||||||
super().__init__(parent)
|
super().__init__(parent)
|
||||||
|
@ -28,7 +28,7 @@ class DiscoveredUltimakerCloudPrintersModel(ListModel):
|
||||||
self._new_cloud_printers_detected = False # type: bool
|
self._new_cloud_printers_detected = False # type: bool
|
||||||
self._application = application # type: CuraApplication
|
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:
|
for device in new_devices:
|
||||||
self._discovered_ultimaker_cloud_printers_list.append({
|
self._discovered_ultimaker_cloud_printers_list.append({
|
||||||
"key": device.getId(),
|
"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.
|
# 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._new_cloud_printers_detected = len(new_devices) > 0
|
||||||
self.cloudPrintersDetectedChanged.emit()
|
self.cloudPrintersDetectedChanged.emit(len(new_devices) > 0)
|
||||||
|
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def clear(self) -> None:
|
def clear(self) -> None:
|
||||||
self._discovered_ultimaker_cloud_printers_list = []
|
self._discovered_ultimaker_cloud_printers_list = []
|
||||||
self._update()
|
self._update()
|
||||||
self._new_cloud_printers_detected = False
|
self._new_cloud_printers_detected = False
|
||||||
self.cloudPrintersDetectedChanged.emit()
|
self.cloudPrintersDetectedChanged.emit(False)
|
||||||
|
|
||||||
def _update(self) -> None:
|
def _update(self) -> None:
|
||||||
items = []
|
items = []
|
||||||
|
|
|
@ -5118,7 +5118,7 @@ msgstr "Merkmale, die noch nicht vollständig ausgearbeitet wurden."
|
||||||
#: fdmprinter.def.json
|
#: fdmprinter.def.json
|
||||||
msgctxt "support_tree_enable label"
|
msgctxt "support_tree_enable label"
|
||||||
msgid "Tree Support"
|
msgid "Tree Support"
|
||||||
msgstr "Baumstruktur"
|
msgstr "Baumstützstruktur"
|
||||||
|
|
||||||
#: fdmprinter.def.json
|
#: fdmprinter.def.json
|
||||||
msgctxt "support_tree_enable description"
|
msgctxt "support_tree_enable description"
|
||||||
|
|
|
@ -15,9 +15,11 @@ Item
|
||||||
{
|
{
|
||||||
UM.I18nCatalog { id: catalog; name: "cura" }
|
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
|
// 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)
|
// 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