mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 22:54:01 -06:00
CURA-4400 first version that disables extruder and updates available quality profiles
This commit is contained in:
parent
7507ba10a9
commit
86c13e86c7
8 changed files with 54 additions and 15 deletions
|
@ -3,7 +3,7 @@
|
|||
|
||||
from typing import Any, TYPE_CHECKING, Optional
|
||||
|
||||
from PyQt5.QtCore import pyqtProperty
|
||||
from PyQt5.QtCore import pyqtProperty, pyqtSignal
|
||||
|
||||
from UM.Decorators import override
|
||||
from UM.MimeTypeDatabase import MimeType, MimeTypeDatabase
|
||||
|
@ -28,9 +28,12 @@ class ExtruderStack(CuraContainerStack):
|
|||
super().__init__(container_id, *args, **kwargs)
|
||||
|
||||
self.addMetaDataEntry("type", "extruder_train") # For backward compatibility
|
||||
self._enabled = True
|
||||
|
||||
self.propertiesChanged.connect(self._onPropertiesChanged)
|
||||
|
||||
enabledChanged = pyqtSignal()
|
||||
|
||||
## Overridden from ContainerStack
|
||||
#
|
||||
# This will set the next stack and ensure that we register this stack as an extruder.
|
||||
|
@ -47,6 +50,14 @@ class ExtruderStack(CuraContainerStack):
|
|||
def getNextStack(self) -> Optional["GlobalStack"]:
|
||||
return super().getNextStack()
|
||||
|
||||
def setEnabled(self, enabled):
|
||||
self._enabled = enabled
|
||||
self.enabledChanged.emit()
|
||||
|
||||
@pyqtProperty(bool, notify = enabledChanged)
|
||||
def isEnabled(self):
|
||||
return self._enabled
|
||||
|
||||
@classmethod
|
||||
def getLoadingPriority(cls) -> int:
|
||||
return 3
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue