(self)
Reset the encodings model to the default selected set.
Reset the encodings model to the default selected set.
Reset the encodings model to the default selected set .
def reset(self):
        """
        Reset the encodings model to the default selected set.
        """
        model = self.__model
        for i in range(model.rowCount()):
            item = model.item(i)
            co = item.data(CodecInfoRole)
            if isinstance(co, codecs.CodecInfo):
                state = co.name in DEFAULT_ENCODINGS
                item.setCheckState(
                    Qt.Checked if state else Qt.Unchecked
                )
def reset ( self ) : model = self . __model for i in range ( model . rowCount ( ) ) : item = model . item ( i ) co = item . data ( CodecInfoRole ) if isinstance ( co , codecs . CodecInfo ) : state = co . name in DEFAULT_ENCODINGS item . setCheckState ( Qt . Checked if state else Qt . Unchecked )