(self)
return selections
Build list of extra selections for rectangular selection
Build list of extra selections for rectangular selection
Build list of extra selections for rectangular selection
def selections(self):
        """Build list of extra selections for rectangular selection"""
        selections = []
        cursors = self.cursors()
        if cursors:
            background = self._qpart.palette().color(QPalette.Highlight)
            foreground = self._qpart.palette().color(QPalette.HighlightedText)
            for cursor in cursors:
                selection = QTextEdit.ExtraSelection()
                selection.format.setBackground(background)
                selection.format.setForeground(foreground)
                selection.cursor = cursor

                selections.append(selection)

        return selections
def selections ( self ) : selections = [ ] cursors = self . cursors ( ) if cursors : background = self . _qpart . palette ( ) . color ( QPalette . Highlight ) foreground = self . _qpart . palette ( ) . color ( QPalette . HighlightedText ) for cursor in cursors : selection = QTextEdit . ExtraSelection ( ) selection . format . setBackground ( background ) selection . format . setForeground ( foreground ) selection . cursor = cursor selections . append ( selection ) return selections