diff options
author | Ghostkeeper <rubend@tutanota.com> | 2017-02-09 19:34:51 +0300 |
---|---|---|
committer | Ghostkeeper <rubend@tutanota.com> | 2017-02-09 19:34:51 +0300 |
commit | 0c9b9a3033cfe7e110103db15ce9acd7ec5a5b8a (patch) | |
tree | c7d46b91adb364088ed8b53e9b4ec45b114a4fe3 /cura/PrinterOutputDevice.py | |
parent | 27c30006da20b8cf1e849c2f5adfa1e4535c179e (diff) |
Add fallback name property in PrinterOutputDevice
It'll call this property, which gives an empty string, if the device doesn't implement giving a name.
Contributes to issue CURA-3161.
Diffstat (limited to 'cura/PrinterOutputDevice.py')
-rw-r--r-- | cura/PrinterOutputDevice.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index 8f03bdff79..8a95748cf1 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -170,6 +170,12 @@ class PrinterOutputDevice(QObject, OutputDevice): def address(self): Logger.log("w", "address is not implemented by this output device.") + ## A human-readable name for the device. + @pyqtProperty(str, constant = True) + def name(self): + Logger.log("w", "name is not implemented by this output device.") + return "" + @pyqtProperty(str, notify = errorTextChanged) def errorText(self): return self._error_text |