def index(self, row, column, parent=QModelIndex()):
        if row < 0 or column < 0 or not self.cards.isOpen():
            return QModelIndex()
        else:
            #  returns index with given card id
            header = self.cards.getCardHeaders('', row, row + 1)
            if len(header) == 1:
                return self.createIndex(row, column, int(header[0][0]))
            else:
                return QModelIndex()