WIP: Disable unknown printer type buttons

This commit is contained in:
Lipu Fei 2019-03-14 11:16:31 +01:00
parent 2b0e9ea439
commit b3621bae84
4 changed files with 30 additions and 4 deletions

View file

@ -62,6 +62,10 @@ class DiscoveredPrinter(QObject):
readable_type = catalog.i18nc("@label", "Unknown")
return readable_type
@pyqtProperty(bool, notify = machineTypeChanged)
def is_unknown_machine_type(self) -> bool:
return self.readable_machine_type.lower() == "unknown"
@pyqtProperty(QObject, constant = True)
def device(self):
return self._device