mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-13 09:47:50 -06:00
Remove deprecated MachineManager.activeMachineHasRemoteConnection
CURA-6858
This commit is contained in:
parent
38ee4bf208
commit
1f3a7c976f
3 changed files with 15 additions and 13 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue