mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-19 12:47:49 -06:00
Add outputDevice, outputDeviceIcon properties and saveToOutputDevice slot to PrinterApplication
This commit is contained in:
parent
77f6929de4
commit
f001efde8f
1 changed files with 19 additions and 0 deletions
|
@ -45,6 +45,7 @@ class PrinterApplication(QtApplication):
|
||||||
self._physics = None
|
self._physics = None
|
||||||
self._volume = None
|
self._volume = None
|
||||||
self._platform = None
|
self._platform = None
|
||||||
|
self._output_source = 'local_file'
|
||||||
self.activeMachineChanged.connect(self._onActiveMachineChanged)
|
self.activeMachineChanged.connect(self._onActiveMachineChanged)
|
||||||
|
|
||||||
def _loadPlugins(self):
|
def _loadPlugins(self):
|
||||||
|
@ -257,6 +258,24 @@ class PrinterApplication(QtApplication):
|
||||||
|
|
||||||
removableDrivesChanged = pyqtSignal()
|
removableDrivesChanged = pyqtSignal()
|
||||||
|
|
||||||
|
outputDeviceChanged = pyqtSignal()
|
||||||
|
@pyqtProperty(str, notify = outputDeviceChanged)
|
||||||
|
def outputDevice(self):
|
||||||
|
return self._output_source
|
||||||
|
|
||||||
|
@pyqtProperty(str, notify = outputDeviceChanged)
|
||||||
|
def outputDeviceIcon(self):
|
||||||
|
if self._output_source == 'local_file':
|
||||||
|
return 'save'
|
||||||
|
elif self._output_source == 'sdcard':
|
||||||
|
return 'save_sd'
|
||||||
|
elif self._output_source == 'usb':
|
||||||
|
return 'print_usb'
|
||||||
|
|
||||||
|
@pyqtSlot()
|
||||||
|
def writeToOutputDevice(self):
|
||||||
|
pass
|
||||||
|
|
||||||
@pyqtProperty("QStringList", notify = removableDrivesChanged)
|
@pyqtProperty("QStringList", notify = removableDrivesChanged)
|
||||||
def removableDrives(self):
|
def removableDrives(self):
|
||||||
return list(self.getStorageDevice('LocalFileStorage').getRemovableDrives().keys())
|
return list(self.getStorageDevice('LocalFileStorage').getRemovableDrives().keys())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue