Handles the 'D' command.

        :index: Index of the item to mark as not done.
509065
def undone(self, index):
        
        if self.model.exists(index):
            self.model.edit(index, done=False)
321680
def do_index_command(self, index, **options):
        """"""
        if options["interactive"]:
            logger.warning("This will permanently delete the index '%s'.", index)
            if not self._confirm_action():
                logger.warning(
                    "Aborting deletion of index '%s' at user's request.", index
                )
                return
        return delete_index(index)
1255315
def setCurrentIndex(self, index):
        
        if self._currentIndex == index:
            return

        self._currentIndex = index
        self.currentIndexChanged.emit(index)

        for i, item in enumerate(self.items()):
            item.setMenuEnabled(i == index)
        self.repaint()
647246
def itemAt( self, index ):
        
        layout = self.widget().layout()
        if ( 0 <= index and index < (layout.count() - 1) ):
            return layout.itemAt(index).widget()
        return None
1143381
def _delIndex(catalog, index):
    
    if index in catalog.indexes():
        try:
            catalog.delIndex(index)
            logger.info(
                'Catalog index %s deleted from %s.' % (index, catalog.id))
            return True
        except:
            logger.error(
                'Catalog index %s error while deleting from %s.'
                % (index, catalog.id))
    return False
597419
def getDone(self, done):
        

        doneItems = self.noteDB['todo'] \
                        .find({"done": done}) \
                        .sort("date", pymongo.DESCENDING)
        IDs = [ii['ID'] for ii in doneItems]
        return IDs
1095967
def itemFromIndex(self, index):
        
        sourceIndex = self.mapToSource(index)
        return self.sourceModel().itemFromIndex(sourceIndex)
596804
def index(self, date):
        
        for (i, (start, end, ruler)) in enumerate(self.table):
            if start <= date.jd <= end:
                return i
        return None
530169
def index(self, value):
        
        # pylint: disable=arguments-differ
        for idx, val in enumerate(self):
            if value == val:
                return idx
        raise ValueError('{0!r} is not in dict'.format(value))
421956
def itemat(iterable, index):
    

    result = None

    handleindex = True

    if isinstance(iterable, dict):
        handleindex = False

    else:
        try:
            result = iterable[index]
        except TypeError:
            handleindex = False

    if not handleindex:
        iterator = iter(iterable)

        if index < 0:  # ensure index is positive
            index += len(iterable)

        while index >= 0:
            try:
                value = next(iterator)

            except StopIteration:
                raise IndexError(
                    "{0} index {1} out of range".format(
                        iterable.__class__, index
                    )
                )

            else:
                if index == 0:
                    result = value
                    break
                index -= 1

    return result
861717
def set_index(self, index):
        
        item = index.internalPointer()
        note = item.internal_data()
        self.content_lb.setText(note.content)
        self.created_dte.setDateTime(dt_to_qdatetime(note.date_created))
        self.updated_dte.setDateTime(dt_to_qdatetime(note.date_updated))
        self.username_lb.setText(note.user.username)
1068356
def _pop(self, command, *args, **kwargs):
        
        result = self._traverse_command(command, *args, **kwargs)
        if self.indexable:
            self.deindex([result])
        return result
600532
def set_index(self, index):
        
        item = index.internalPointer()
        self.actionunit = item.internal_data()
        self.setEnabled(bool(self.actionunit.status.traceback))
745201
private T doRemove(int index) {
        keys[index]   = 0;
        states[index] = REMOVED;
        final Object previous = values[index];
        values[index] = missingEntries;
        --size;
        ++count;
        return (T)previous;
    }
903787
def done(self):
        
        logger.info('Marking %s as done', self)

        fn = self.get_path()
        try:
            os.makedirs(os.path.dirname(fn))
        except OSError:
            pass
        open(fn, 'w').close()
724026
def removeItem(self, index):
        """"""
        self._stim.removeComponent(index.row(), index.column())
1203104
def push(self, index=None):
        
        for ind in self.indexes:
            if index and not isinstance(ind, index):
                continue
            ind.push()