mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 11:17:49 -06:00
Add a new printer selector button that is connected to the output
devices and shows labels containing the type of printers that are in the same group. Contributes to CURA-5942.
This commit is contained in:
parent
b890e40e81
commit
9720512f50
5 changed files with 121 additions and 37 deletions
|
@ -211,6 +211,11 @@ class PrinterOutputDevice(QObject, OutputDevice):
|
|||
self._unique_configurations.sort(key = lambda k: k.printerType)
|
||||
self.uniqueConfigurationsChanged.emit()
|
||||
|
||||
# Returns the unique configurations of the printers within this output device
|
||||
@pyqtProperty("QVariantList", notify = uniqueConfigurationsChanged)
|
||||
def uniquePrinterTypes(self) -> List[str]:
|
||||
return list(set([configuration.printerType for configuration in self._unique_configurations]))
|
||||
|
||||
def _onPrintersChanged(self) -> None:
|
||||
for printer in self._printers:
|
||||
printer.configurationChanged.connect(self._updateUniqueConfigurations)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue