126 |
|
|
127 |
group -- group that the value maps to. |
group -- group that the value maps to. |
128 |
""" |
""" |
|
|
|
129 |
assert isinstance(group, ClassGroupDefault) |
assert isinstance(group, ClassGroupDefault) |
130 |
if len(self.__groups) > 0: |
if len(self.__groups) > 0: |
131 |
self.__groups[0] = group |
self.__groups[0] = group |
132 |
else: |
else: |
133 |
self.__groups.append(group) |
self.__groups.append(group) |
134 |
|
self.__SendNotification() |
135 |
|
|
136 |
def GetDefaultGroup(self): |
def GetDefaultGroup(self): |
137 |
"""Return the default group.""" |
"""Return the default group.""" |
151 |
self.__SendNotification() |
self.__SendNotification() |
152 |
|
|
153 |
def RemoveGroup(self, index): |
def RemoveGroup(self, index): |
154 |
return self.__groups.pop(index + 1) |
"""Remove the classification group with the given index""" |
155 |
|
self.__groups.pop(index + 1) |
156 |
|
self.__SendNotification() |
157 |
|
|
158 |
def ReplaceGroup(self, index, group): |
def ReplaceGroup(self, index, group): |
159 |
assert isinstance(group, ClassGroup) |
assert isinstance(group, ClassGroup) |