def changeColumnType(self, typ): if typ == "BasicBox": for widget in self.widgets: widget = Widget().basicBox(widget.getWidgetInfo()) elif typ == "BasicButton": for widget in self.widgets: widget = Widget().basicButton(widget.getWidgetInfo()) elif typ == "AudioButton": for widget in self.widgets: widget = Widget().audioButton(widget.getWidgetInfo())
def changeColumnTypeByWidget(self, widget, typ): for widgt in self.widgets: if widgt == widget: if typ == "BasicBox": widgt = Widget().basicBox(*widgt.getWidgetInfo()) widgt.setType(typ) elif typ == "BasicButton": widgt = Widget().basicButton(*widgt.getWidgetInfo()) widgt.setType(typ) elif typ == "AudioButton": widgt = Widget().audioButton(*widgt.getWidgetInfo()) widgt.setType(typ)