'Set the selected preview item index.'

def setCurrentIndex(self, index):

    if ((self.__model is not None) and self.__model.rowCount()):
        index = min(index, (self.__model.rowCount() - 1))
        index = self.__model.index(index, 0)
        sel_model = self.__previewList.selectionModel()
        sel_model.select(index, sel_model.ClearAndSelect)
    elif (self.__currentIndex != (-1)):
        self.__currentIndex = (-1)
        self.__update()
        self.currentIndexChanged.emit((-1))
