def autoIndentBlock(self, block, char = '\n'):
        """Indent block after Enter pressed or trigger character typed
        """
        cursor = QTextCursor(block)
        currentText = block.text()
        spaceAtStartLen = len(currentText) - len(currentText.lstrip())
        currentIndent = currentText[:spaceAtStartLen]
        indent = self._smartIndenter.computeIndent(block, char)
        if indent is not None and indent != currentIndent:
            self._qpart.replaceText(block.position(), spaceAtStartLen, indent)
def parse_record(self, metadata, line):
        factors = line.split('|')
        if len(factors) < 7:
            return

        registry, cc, type_, start, value, dete, status = factors[:7]
        if type_ not in ('ipv4', 'ipv6'):
            return

        return Record(metadata, start, type_, value, cc)