def _save_settings(self):
"""Save the current settings as a text file.
Args:
file_name: the filename to write to
"""
current_model = self._controller.get_model()
config_file = ['conf (*.conf)', 'All files (*)']
file_name, used_filter = QFileDialog().getSaveFileName(caption='Select the GUI config file',
filter=';;'.join(config_file))
if file_name:
with open(file_name, 'w') as f:
f.write(current_model.get_config().to_yaml())
评论列表
文章目录