--- a/QScintilla/QsciScintillaCompat.py Tue Oct 15 22:03:54 2013 +0200 +++ b/QScintilla/QsciScintillaCompat.py Fri Oct 18 23:00:41 2013 +0200 @@ -57,8 +57,6 @@ Constructor @param parent parent widget (QWidget) - @param name name of this instance (string) - @param flags window flags """ super(QsciScintillaCompat, self).__init__(parent) @@ -118,11 +116,13 @@ self.SendScintilla(QsciScintilla.SCI_STYLESETFONT, style, f) self.SendScintilla(QsciScintilla.SCI_STYLESETSIZE, style, ps) try: - self.SendScintilla(QsciScintilla.SCI_STYLESETWEIGHT, style, weight) + self.SendScintilla( + QsciScintilla.SCI_STYLESETWEIGHT, style, weight) except AttributeError: self.SendScintilla(QsciScintilla.SCI_STYLESETBOLD, style, bold) self.SendScintilla(QsciScintilla.SCI_STYLESETITALIC, style, italic) - self.SendScintilla(QsciScintilla.SCI_STYLESETUNDERLINE, style, underline) + self.SendScintilla( + QsciScintilla.SCI_STYLESETUNDERLINE, style, underline) def linesOnScreen(self): """ @@ -183,6 +183,8 @@ def getEndStyled(self): """ Public method to get the last styled position. + + @return end position of the last styling run (integer) """ return self.SendScintilla(QsciScintilla.SCI_GETENDSTYLED) @@ -505,14 +507,17 @@ if not self.selectionIsRectangle(): return (-1, -1, -1, -1) - startPos = self.SendScintilla(QsciScintilla.SCI_GETRECTANGULARSELECTIONANCHOR) - endPos = self.SendScintilla(QsciScintilla.SCI_GETRECTANGULARSELECTIONCARET) + startPos = self.SendScintilla( + QsciScintilla.SCI_GETRECTANGULARSELECTIONANCHOR) + endPos = self.SendScintilla( + QsciScintilla.SCI_GETRECTANGULARSELECTIONCARET) startLine, startIndex = self.lineIndexFromPosition(startPos) endLine, endIndex = self.lineIndexFromPosition(endPos) return (startLine, startIndex, endLine, endIndex) - def setRectangularSelection(self, startLine, startIndex, endLine, endIndex): + def setRectangularSelection(self, startLine, startIndex, endLine, + endIndex): """ Public method to set a rectangular selection. @@ -524,8 +529,10 @@ startPos = self.positionFromLineIndex(startLine, startIndex) endPos = self.positionFromLineIndex(endLine, endIndex) - self.SendScintilla(QsciScintilla.SCI_SETRECTANGULARSELECTIONANCHOR, startPos) - self.SendScintilla(QsciScintilla.SCI_SETRECTANGULARSELECTIONCARET, endPos) + self.SendScintilla( + QsciScintilla.SCI_SETRECTANGULARSELECTIONANCHOR, startPos) + self.SendScintilla( + QsciScintilla.SCI_SETRECTANGULARSELECTIONCARET, endPos) def getSelectionCount(self): """ @@ -537,12 +544,15 @@ def getSelectionN(self, index): """ - Public method to get the start and end of a selection given by its index. + Public method to get the start and end of a selection given by its + index. + @param index index of the selection (integer) @return tuple with start line and index and end line and index (tuple of four int) for the given selection """ - startPos = self.SendScintilla(QsciScintilla.SCI_GETSELECTIONNSTART, index) + startPos = self.SendScintilla( + QsciScintilla.SCI_GETSELECTIONNSTART, index) endPos = self.SendScintilla(QsciScintilla.SCI_GETSELECTIONNEND, index) startLine, startIndex = self.lineIndexFromPosition(startPos) endLine, endIndex = self.lineIndexFromPosition(endPos) @@ -551,7 +561,8 @@ def getSelections(self): """ - Public method to get the start and end coordinates of all active selections. + Public method to get the start and end coordinates of all active + selections. @return list of tuples with start line and index and end line and index of each active selection (list of tuples of four int) @@ -890,7 +901,6 @@ QsciScintilla.INDIC_CONTAINER .. QsciScintilla.INDIC_MAX) @param spos position of the indicator start (integer) @param length length of the indicator (integer) - @exception ValueError the indicator or style are not valid """ self.setCurrentIndicator(indicator) self.SendScintilla(QsciScintilla.SCI_INDICATORFILLRANGE, spos, length) @@ -905,7 +915,6 @@ @param sindex index of the indicator start (integer) @param eline line number of the indicator end (integer) @param eindex index of the indicator end (integer) - @exception ValueError the indicator or style are not valid """ spos = self.positionFromLineIndex(sline, sindex) epos = self.positionFromLineIndex(eline, eindex) @@ -1098,10 +1107,11 @@ """ Protected method to handle events. - Note: We are not interested in the standard QsciScintilla event handling - because we do it our self. + Note: We are not interested in the standard QsciScintilla event + handling because we do it our self. @param evt event object to handle (QEvent) + @return result of the event handling (boolean) """ return QsciScintillaBase.event(self, evt)