24 from PyQt4
import QtCore, QtGui
25 from immutable_preset_info_handler
import ImmutablePresetInfoHandler
30 ImmutablePresetInfoHandler.__init__(self, file_name)
33 group = self.presets_.CreateGroup(ImmutablePresetInfoHandler.PRESET_GROUP_NAME)
35 self.handle_.Export(self.file_name_)
38 group_list = self.presets_.GetGroups(ImmutablePresetInfoHandler.PRESET_GROUP_NAME)
40 for group
in group_list:
41 if group.HasAttribute(ImmutablePresetInfoHandler.NAME_ATTRIBUTE_NAME):
42 groupname = group.GetAttribute(ImmutablePresetInfoHandler.NAME_ATTRIBUTE_NAME)
47 if group_to_del !=
None:
48 self.presets_.Remove(group_to_del)
49 self.handle_.Export(self.file_name_)
52 group_list = self.presets_.GetGroups(ImmutablePresetInfoHandler.PRESET_GROUP_NAME)
53 for group
in group_list:
54 if group.HasAttribute(ImmutablePresetInfoHandler.NAME_ATTRIBUTE_NAME):
55 groupname = group.GetAttribute(ImmutablePresetInfoHandler.NAME_ATTRIBUTE_NAME)
57 group.SetAttribute(ImmutablePresetInfoHandler.NAME_ATTRIBUTE_NAME, new)
58 self.handle_.Export(self.file_name_)