mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-07 22:13:58 -06:00
Inform the Cloud page about new cloud printers
Properly close the welcome screen if the user has signed in and has cloud printers linked to his/her account. If he doesn't have any, move to the next page of the welcome wizard. CURA-7019
This commit is contained in:
parent
1262d1f641
commit
1602b71841
3 changed files with 19 additions and 12 deletions
|
@ -29,10 +29,12 @@ class Account(QObject):
|
|||
# Signal emitted when user logged in or out.
|
||||
loginStateChanged = pyqtSignal(bool)
|
||||
accessTokenChanged = pyqtSignal()
|
||||
cloudPrintersDetectedChanged = pyqtSignal(bool)
|
||||
|
||||
def __init__(self, application: "CuraApplication", parent = None) -> None:
|
||||
super().__init__(parent)
|
||||
self._application = application
|
||||
self._new_cloud_printers_detected = False
|
||||
|
||||
self._error_message = None # type: Optional[Message]
|
||||
self._logged_in = False
|
||||
|
@ -74,6 +76,10 @@ class Account(QObject):
|
|||
def isLoggedIn(self) -> bool:
|
||||
return self._logged_in
|
||||
|
||||
@pyqtProperty(bool, notify=cloudPrintersDetectedChanged)
|
||||
def newCloudPrintersDetected(self) -> bool:
|
||||
return self._new_cloud_printers_detected
|
||||
|
||||
def _onLoginStateChanged(self, logged_in: bool = False, error_message: Optional[str] = None) -> None:
|
||||
if error_message:
|
||||
if self._error_message:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue