示例#1
0
 def _onOutputStart(self, output_device: OutputDevice) -> None:
     """If this is the sort of output 'device' (like local or online file storage, rather than a printer),
        the user could have altered the file-name, and thus the project name should be altered as well."""
     if isinstance(output_device, ProjectOutputDevice):
         new_name = output_device.getLastOutputName()
         if new_name is not None:
             self.setJobName(
                 os.path.splitext(os.path.basename(new_name))[0])