Add Cura.API.connectionStatus

CURA-7437
This commit is contained in:
Nino van Hooff 2020-05-20 16:03:24 +02:00
parent fbedfc88d4
commit b135da866a
2 changed files with 71 additions and 0 deletions

View file

@ -5,6 +5,7 @@ from typing import Optional, TYPE_CHECKING
from PyQt5.QtCore import QObject, pyqtProperty
from cura.API.Backups import Backups
from cura.API.ConnectionStatus import ConnectionStatus
from cura.API.Interface import Interface
from cura.API.Account import Account
@ -45,6 +46,8 @@ class CuraAPI(QObject):
# Backups API
self._backups = Backups(self._application)
self._connectionStatus = ConnectionStatus()
# Interface API
self._interface = Interface(self._application)
@ -55,6 +58,10 @@ class CuraAPI(QObject):
def account(self) -> "Account":
return self._account
@pyqtProperty(QObject, constant = True)
def connectionStatus(self) -> "ConnectionStatus":
return self._connectionStatus
@property
def backups(self) -> "Backups":
return self._backups