(self)
QTextEdit.ExtraSelection, which highlightes current line
QTextEdit.ExtraSelection, which highlightes current line
QTextEdit . ExtraSelection which highlightes current line
def _currentLineExtraSelections(self):
        """QTextEdit.ExtraSelection, which highlightes current line
        """
        if self._currentLineColor is None:
            return []

        def makeSelection(cursor):
            selection = QTextEdit.ExtraSelection()
            selection.format.setBackground(self._currentLineColor)
            selection.format.setProperty(QTextFormat.FullWidthSelection, True)
            cursor.clearSelection()
            selection.cursor = cursor
            return selection

        rectangularSelectionCursors = self._rectangularSelection.cursors()
        if rectangularSelectionCursors:
            return [makeSelection(cursor) \
                    for cursor in rectangularSelectionCursors]
        else:
            return [makeSelection(self.textCursor())]
def _currentLineExtraSelections ( self ) : if self . _currentLineColor is None : return [ ] def makeSelection ( cursor ) : selection = QTextEdit . ExtraSelection ( ) selection . format . setBackground ( self . _currentLineColor ) selection . format . setProperty ( QTextFormat . FullWidthSelection , True ) cursor . clearSelection ( ) selection . cursor = cursor return selection rectangularSelectionCursors = self . _rectangularSelection . cursors ( ) if rectangularSelectionCursors : return [ makeSelection ( cursor ) for cursor in rectangularSelectionCursors ] else : return [ makeSelection ( self . textCursor ( ) ) ]