Remove deprecated MachineManager.activeMachineHasRemoteConnection

CURA-6858
This commit is contained in:
Lipu Fei 2019-10-22 14:09:43 +02:00
parent 38ee4bf208
commit 1f3a7c976f
3 changed files with 15 additions and 13 deletions

View file

@ -20,6 +20,7 @@ from UM.Platform import Platform
from UM.Util import parseBool
import cura.CuraApplication
from cura.PrinterOutput.PrinterOutputDevice import ConnectionType
from . import Exceptions
from .CuraContainerStack import CuraContainerStack
@ -108,6 +109,19 @@ class GlobalStack(CuraContainerStack):
pass
return result
# Returns a boolean indicating if this machine has a remote connection. A machine is considered as remotely
# connected if its connection types contain one of the following values:
# - ConnectionType.NetworkConnection
# - ConnectionType.CloudConnection
@pyqtProperty(bool, notify = configuredConnectionTypesChanged)
def hasRemoteConnection(self) -> bool:
has_remote_connection = False
for connection_type in self.configuredConnectionTypes:
has_remote_connection |= connection_type in [ConnectionType.NetworkConnection.value,
ConnectionType.CloudConnection.value]
return has_remote_connection
## \sa configuredConnectionTypes
def addConfiguredConnectionType(self, connection_type: int) -> None:
configured_connection_types = self.configuredConnectionTypes