Ejemplo n.º 1
0
    def __init__(self, delegate, *args):
        AbstractTableModel.__init__(self)
        AbstractDelegateList.__init__(self, delegate)

        self.__columns__ = list(args if args else self.__columns__)
        self._getters = [None] * len(self.__columns__)
        for index, column in enumerate(self.__columns__):
            self.__columns__[index] = self._validateColumn(column, index)
Ejemplo n.º 2
0
    def __init__(self, delegate, *args):
        # TODO: use super() when #1540 is fixed
        AbstractTableModel.__init__(self)
        AbstractDelegateList.__init__(self, delegate)

        self.__columns__ = list(args if args else self.__columns__)
        self._getters = [None] * len(self.__columns__)
        for index, column in enumerate(self.__columns__):
            self.__columns__[index] = self._validateColumn(column, index)
Ejemplo n.º 3
0
    def __init__(self, delegate, *args):
        """
        Initializes the column names and types.
        You can supply the column names and types as a series of either
        (name, type) tuples or column names to the constructor, or provide a
        __columns__ variable in a subclass.

        :param delegate: the list where this table model gets its data from

        """
        AbstractTableModel.__init__(self)
        AbstractDelegateList.__init__(self, delegate)

        self.__columns__ = list(args if args else self.__columns__)
        for index, column in enumerate(self.__columns__):
            self.__columns__[index] = self._validateColumn(column, index)