mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 15:44:04 -06:00
Make extrudersChanged into a pyqtSignal
This way we can listen for it on the cute side. Contributes to issues CURA-340 and CURA-1278.
This commit is contained in:
parent
64c92caa58
commit
84a9166241
1 changed files with 2 additions and 3 deletions
|
@ -1,12 +1,11 @@
|
||||||
# Copyright (c) 2016 Ultimaker B.V.
|
# Copyright (c) 2016 Ultimaker B.V.
|
||||||
# Cura is released under the terms of the AGPLv3 or higher.
|
# Cura is released under the terms of the AGPLv3 or higher.
|
||||||
|
|
||||||
from PyQt5.QtCore import pyqtSignal, pyqtProperty, pyqtSlot, QObject
|
from PyQt5.QtCore import pyqtSignal, pyqtProperty, pyqtSlot, QObject #For communicating data and events to Qt.
|
||||||
|
|
||||||
import UM.Application #To get the global container stack to find the current machine.
|
import UM.Application #To get the global container stack to find the current machine.
|
||||||
import UM.Logger
|
import UM.Logger
|
||||||
import UM.Settings.ContainerRegistry #Finding containers by ID.
|
import UM.Settings.ContainerRegistry #Finding containers by ID.
|
||||||
import UM.Signal #To notify other components of changes in the extruders.
|
|
||||||
|
|
||||||
|
|
||||||
## Manages all existing extruder stacks.
|
## Manages all existing extruder stacks.
|
||||||
|
@ -14,7 +13,7 @@ import UM.Signal #To notify other components of changes in the extruders.
|
||||||
# This keeps a list of extruder stacks for each machine.
|
# This keeps a list of extruder stacks for each machine.
|
||||||
class ExtruderManager(QObject):
|
class ExtruderManager(QObject):
|
||||||
## Signal to notify other components when the list of extruders changes.
|
## Signal to notify other components when the list of extruders changes.
|
||||||
extrudersChanged = UM.Signal()
|
extrudersChanged = pyqtSignal()
|
||||||
|
|
||||||
## Notify when the user switches the currently active extruder.
|
## Notify when the user switches the currently active extruder.
|
||||||
activeExtruderChanged = pyqtSignal()
|
activeExtruderChanged = pyqtSignal()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue