def onAutoIndentTriggered(self):
        """Indent current line or selected lines
        """
        cursor = self._qpart.textCursor()

        startBlock = self._qpart.document().findBlock(cursor.selectionStart())
        endBlock = self._qpart.document().findBlock(cursor.selectionEnd())

        if startBlock != endBlock:  # indent multiply lines
            stopBlock = endBlock.next()

            block = startBlock

            with self._qpart:
                while block != stopBlock:
                    self.autoIndentBlock(block, '')
                    block = block.next()
        else:  # indent 1 line
            self.autoIndentBlock(startBlock, '')
def reset(cls):
        cls.info = [
            [
                "Keyboard Control:",
                "  auto repeat:  on    key click percent:  0    LED mask:  00000002",
                "  XKB indicators:",
                "    00: Caps Lock:   off    01: Num Lock:    on     02: Scroll Lock: off",
                "    03: Compose:     off    04: Kana:        off    05: Sleep:       off",
            ],
            [
                "Keyboard Control:",
                "  auto repeat:  on    key click percent:  0    LED mask:  00000002",
                "  XKB indicators:",
                "    00: Caps Lock:   on     01: Num Lock:    on     02: Scroll Lock: off",
                "    03: Compose:     off    04: Kana:        off    05: Sleep:       off",
            ],
        ]
        cls.index = 0
        cls.is_error = False