def __init__(self, label_text=None, attribute_name=None, show_popup=True, history_name=None): Single.__init__(self, label_text) FaultyMixin.__init__(self, attribute_name, show_popup, history_name)
def __init__(self, fields, label_text=None, attribute_name=None, show_popup=True, history_name=None, show_field_popups=False): for field in fields: if isinstance(field, EditMixin): field.show_popup = show_field_popups Multiple.__init__(self, fields, label_text) FaultyMixin.__init__(self, attribute_name, show_popup, history_name) self.show_field_popups = show_field_popups
def write_to_widget(self, representation, original=False): if representation == ambiguous: for field in self.fields: field.write_to_widget(ambiguous, original) else: for index, field in enumerate(self.fields): field.write_to_widget(representation[index], original) FaultyMixin.write_to_widget(self, representation, original)
def write_to_widget(self, representation, original=False): if representation is ambiguous: for field in self.fields: field.write_to_widget(ambiguous, original) else: for index, field in enumerate(self.fields): field.write_to_widget(representation[index], original) FaultyMixin.write_to_widget(self, representation, original)
def create_widgets(self): for field in self.fields: field.on_widget_changed = self.on_widget_changed field.update_label = self.update_label field.changed = self.changed field.get_active = self.get_active # make the subfields also believe they are active field.instance = self.instance field.instances = self.instances field.create_widgets() Multiple.create_widgets(self) FaultyMixin.create_widgets(self)
def write(self): FaultyMixin.write(self)
def write_multiplex(self): FaultyMixin.write_multiplex(self)
def read_multiplex(self): FaultyMixin.read_multiplex(self)
def check(self): Multiple.check(self) FaultyMixin.check(self)
def destroy_widgets(self): Single.destroy_widgets(self) FaultyMixin.destroy_widgets(self)
def destroy_widgets(self): Multiple.destroy_widgets(self) FaultyMixin.destroy_widgets(self)
def applicable(self, instance): return FaultyMixin.applicable(self, instance)
def create_widgets(self): Single.create_widgets(self) FaultyMixin.create_widgets(self)
def read(self): FaultyMixin.read(self)
def set_sensitive(self, sensitive): FaultyMixin.set_sensitive(self, sensitive) Multiple.set_sensitive(self, sensitive)
def save_history(self, representations): FaultyMixin.save_history(self, representations) for field, representation in zip(self.fields, representations): field.save_history(representation)
def set_sensitive(self, sensitive): FaultyMixin.set_sensitive(self, sensitive) Single.set_sensitive(self, sensitive)