eric3.QScintilla.QextScintillaCompat

Module implementing a compatability interface class to QextScintilla.

Classes

QextScintillaCompat Class implementing a compatability interface to QextScintilla.

Functions

QSCINTILLA_VERSION Module function to return the QScintilla version.


QextScintillaCompat

Class implementing a compatability interface to QextScintilla. This class implements all the functions, that were added to QextScintilla incrementally. This class ensures compatibility to older versions of QextScintilla.

Derived from

QextScintilla

Methods

QextScintillaCompat Constructor
_handleModificationChanged Private slot to handle the modificationChanged signal.
clearAlternateKeys Protected method to clear the alternate key commands.
clearStyles Public method to set the styles according the selected Qt style.
delete Public method to delete the character to the right of the cursor.
deleteBack Public method to delete the character to the left of the cursor.
deleteLineRight Public method to delete the line to the right of the cursor.
editorCommand Public method to perform a simple editor command.
firstVisibleLine Public method to get the line number of the first visible line.
isAutoCompletionActive Public method to check, if autocompletion is active.
isModified Public method to retrieve the modification status.
keyPressEvent Workaround for QScintilla <= 1.3 bug w/ keyboard layouts
monospacedStyles Public method to set the current style to be monospaced.
moveCursorLeft Public method to move the cursor left.
moveCursorRight Public method to move the cursor left.
moveCursorToEOL Public method to move the cursor to the end of line.
recolor Public method to recolor the given region.
resetSelectionForegroundColor Public method to reset the foreground color of the selection.
scrollVertical Public method to scroll the text area.
setCaretForegroundColor Public method to set the foreground color of the caret.
setCaretLineBackgroundColor Public method to set the background color of the caret line.
setCaretLineVisible Public method to enable the highlighting of the caret line.
setCaretWidth Public method to enable the highlighting of the caret line.
setEdgeColor Public method to set the color of the edge mode highlight.
setEdgeColumn Public method to set the edge column.
setEdgeMode Public method to set the edge mode.
setLexer Public method to set the lexer.
setModified Public method to set the modification status.
setSelectionBackgroundColor Public method to set the background color of the selection.
setSelectionForegroundColor Public method to set the foreground color of the selection.
setWrapMode Public slot to set the wrap mode of the text display.
showUserList Public method to show a user list.
textHeight Public method to get the text height.

QextScintillaCompat (Constructor)

QextScintillaCompat(parent=None, name=None, flags=0)

Constructor

parent
parent widget (QWidget)
name
name of this instance (string or QString)
flags
window flags

QextScintillaCompat._handleModificationChanged

_handleModificationChanged(m)

Private slot to handle the modificationChanged signal. It emits the signal modificationStatusChanged with parameters m and self.

m
modification status

QextScintillaCompat.clearAlternateKeys

clearAlternateKeys()

Protected method to clear the alternate key commands.

QextScintillaCompat.clearStyles

clearStyles()

Public method to set the styles according the selected Qt style.

QextScintillaCompat.delete

delete()

Public method to delete the character to the right of the cursor.

QextScintillaCompat.deleteBack

deleteBack()

Public method to delete the character to the left of the cursor.

QextScintillaCompat.deleteLineRight

deleteLineRight()

Public method to delete the line to the right of the cursor.

QextScintillaCompat.editorCommand

editorCommand(cmd)

Public method to perform a simple editor command.

cmd
the scintilla command to be performed

QextScintillaCompat.firstVisibleLine

firstVisibleLine()

Public method to get the line number of the first visible line.

Returns:
number of the first visible line (integer)

QextScintillaCompat.isAutoCompletionActive

isAutoCompletionActive()

Public method to check, if autocompletion is active.

Returns:
flag indicating autocompletion active state (boolean)

QextScintillaCompat.isModified

isModified()

Public method to retrieve the modification status.

Returns:
flag indicating the modification status (boolean)

QextScintillaCompat.keyPressEvent

keyPressEvent(event)

Workaround for QScintilla <= 1.3 bug w/ keyboard layouts having a AltGr key in win32: AltGr is reported as state == Qt.ControlButton | Qt.AltButton, but QScintilla expects (Unix-style) Qt.MetaButton. Just translate states for infected QScintilla versions. Reimplemented from QextScintilla.keyPressEvent

event
reference to the key press event (QKeyEvent)

Author(s): Torsten Marek, 2004-08-22

QextScintillaCompat.monospacedStyles

monospacedStyles(font)

Public method to set the current style to be monospaced.

font
font to be used (QFont)

QextScintillaCompat.moveCursorLeft

moveCursorLeft()

Public method to move the cursor left.

QextScintillaCompat.moveCursorRight

moveCursorRight()

Public method to move the cursor left.

QextScintillaCompat.moveCursorToEOL

moveCursorToEOL()

Public method to move the cursor to the end of line.

QextScintillaCompat.recolor

recolor(start = 0, end = -1)

Public method to recolor the given region.

start
linenumber where to start recolourisation (integer)
end
linenumber where to end recolourisation (integer)

QextScintillaCompat.resetSelectionForegroundColor

resetSelectionForegroundColor()

Public method to reset the foreground color of the selection.

QextScintillaCompat.scrollVertical

scrollVertical(lines)

Public method to scroll the text area.

lines
number of lines to scroll (negative scrolls up, positive scrolls down) (integer)

QextScintillaCompat.setCaretForegroundColor

setCaretForegroundColor(colour)

Public method to set the foreground color of the caret.

colour
colour to be set (QColor)

QextScintillaCompat.setCaretLineBackgroundColor

setCaretLineBackgroundColor(colour)

Public method to set the background color of the caret line.

colour
colour to be set (QColor)

QextScintillaCompat.setCaretLineVisible

setCaretLineVisible(enable)

Public method to enable the highlighting of the caret line.

enable
flag indicating the highlighting state to be set (boolean)

QextScintillaCompat.setCaretWidth

setCaretWidth(width)

Public method to enable the highlighting of the caret line.

width
width of the caret (integer - 0, 1, 2 or 3)

QextScintillaCompat.setEdgeColor

setEdgeColor(colour)

Public method to set the color of the edge mode highlight.

colour
colour to be set (QColor)

QextScintillaCompat.setEdgeColumn

setEdgeColumn(column)

Public method to set the edge column.

column
column number to be set for the edge mode (integer)

QextScintillaCompat.setEdgeMode

setEdgeMode(edgeMode)

Public method to set the edge mode.

edgeMode
mode to be set

QextScintillaCompat.setLexer

setLexer(lex = None)

Public method to set the lexer.

lex
the lexer to be set or None to reset it.

QextScintillaCompat.setModified

setModified(m)

Public method to set the modification status.

m
flag indicating the new modification status

QextScintillaCompat.setSelectionBackgroundColor

setSelectionBackgroundColor(colour)

Public method to set the background color of the selection.

colour
colour to be set (QColor)

QextScintillaCompat.setSelectionForegroundColor

setSelectionForegroundColor(colour)

Public method to set the foreground color of the selection.

colour
colour to be set (QColor)

QextScintillaCompat.setWrapMode

setWrapMode(mode)

Public slot to set the wrap mode of the text display.

mode
wrap mode (QextScintilla.WrapNone or QextScintilla.WrapWord)

QextScintillaCompat.showUserList

showUserList(id, userlist)

Public method to show a user list.

id
id of the list to be shown (integer)
userlist
list of items to be shown (QStringList)

QextScintillaCompat.textHeight

textHeight()

Public method to get the text height.

Returns:
text height (integer)

Up


QSCINTILLA_VERSION

QSCINTILLA_VERSION()

Module function to return the QScintilla version. If the installed QScintilla is a snapshot version, then assume it is of the latest release and return a version number of 0x99999.

Returns:
QScintilla version (integer)
Up