def flags(self, index):
        """ Returns the item flags for the given index.
        """

        if not index.isValid():
            return QtCore.Qt.NoItemFlags

        item = index.internalPointer()

        # return QtCore.Qt.ItemIsEnabled | QtCore.Qt.ItemIsSelectable |
        # QtCore.Qt.ItemIsDragEnabled
        return item.getFlags()