def __init__(self, var, parent=None, **kwargs): PyListModel.__init__(self, [], parent, **kwargs) self.wrap(var.values) self.colorPalette = OWColorPalette.ColorPaletteHSV(len(self)) self.connect(self, SIGNAL("columnsInserted(QModelIndex, int, int)"), self.updateColors) self.connect(self, SIGNAL("columnsRemoved(QModelIndex, int, int)"), self.updateColors)
def __init__(self, var, parent=None, **kwargs): PyListModel.__init__(self, [], parent, **kwargs) self.wrap(var.values) self.colorPalette = OWColorPalette.ColorPaletteHSV(len(self))