diff options
author | Ghostkeeper <rubend@tutanota.com> | 2021-06-09 18:10:31 +0300 |
---|---|---|
committer | Ghostkeeper <rubend@tutanota.com> | 2021-06-09 18:10:31 +0300 |
commit | e9031f1aff5d40f3c69ac625edf11963a3253eb8 (patch) | |
tree | 737e919b83762d209b53b3a09b601f9b7f80f3ec /cura/Machines | |
parent | 66b2825a667f9aa9618005d2a5875383a3658f4f (diff) |
Add documentation
Contributes to issue CURA-8055.
Diffstat (limited to 'cura/Machines')
-rw-r--r-- | cura/Machines/Models/MaterialManagementModel.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cura/Machines/Models/MaterialManagementModel.py b/cura/Machines/Models/MaterialManagementModel.py index 01ffb9eeb3..c63068140c 100644 --- a/cura/Machines/Models/MaterialManagementModel.py +++ b/cura/Machines/Models/MaterialManagementModel.py @@ -290,12 +290,23 @@ class MaterialManagementModel(QObject): outputDevicesChanged = pyqtSignal() # Triggered when adding or removing removable drives. @pyqtProperty(QUrl, notify = outputDevicesChanged) def preferredExportAllPath(self) -> QUrl: + """ + Get the preferred path to export materials to. + + If there is a removable drive, that should be the preferred path. Otherwise it should be the most recent local + file path. + :return: The preferred path to export all materials to. + """ if self._preferred_export_all_path is None: # Not initialised yet. Can happen when output devices changed before class got created. self._onOutputDevicesChanged() return self._preferred_export_all_path @pyqtSlot(QUrl) def exportAll(self, file_path: QUrl) -> None: + """ + Export all materials to a certain file path. + :param file_path: The path to export the materials to. + """ registry = CuraContainerRegistry.getInstance() archive = zipfile.ZipFile(file_path.toLocalFile(), "w") |