本文整理汇总了Python中mantid.kernel.ConfigService.getUserFilename方法的典型用法代码示例。如果您正苦于以下问题:Python ConfigService.getUserFilename方法的具体用法?Python ConfigService.getUserFilename怎么用?Python ConfigService.getUserFilename使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mantid.kernel.ConfigService
的用法示例。
在下文中一共展示了ConfigService.getUserFilename方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: closeEvent
# 需要导入模块: from mantid.kernel import ConfigService [as 别名]
# 或者: from mantid.kernel.ConfigService import getUserFilename [as 别名]
def closeEvent(self, event):
# Check whether or not to save project
if not self.project.saved:
# Offer save
if self.project.offer_save(self):
# Cancel has been clicked
event.ignore()
return
# Close editors
if self.editor.app_closing():
# write out any changes to the mantid config file
ConfigService.saveConfig(ConfigService.getUserFilename())
# write current window information to global settings object
self.writeSettings(CONF)
# Close all open plots
# We don't want this at module scope here
import matplotlib.pyplot as plt # noqa
plt.close('all')
app = QApplication.instance()
if app is not None:
app.closeAllWindows()
# Kill the project recovery thread and don't restart should a save be in progress and clear out current
# recovery checkpoint as it is closing properly
self.project_recovery.stop_recovery_thread()
self.project_recovery.closing_workbench = True
self.project_recovery.remove_current_pid_folder()
self.interface_manager.closeHelpWindow()
event.accept()
else:
# Cancel was pressed when closing an editor
event.ignore()