# 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.
isModified | Public method to retrieve the modification status.
keyPressEvent | Workaround for QScintilla <= 1.3 bug w/ keyboard layouts
recolor | Public method to recolor the given region.
resetSelectionForegroundColor | Public method to reset the foreground color of the selection.
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.

### QextScintillaCompat (Constructor)

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

Constructor

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

### 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.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.recolor

recolor(start = 0, end = -1)

Public method to recolor the given region.

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

### QextScintillaCompat.resetSelectionForegroundColor

resetSelectionForegroundColor()

Public method to reset the foreground color of the selection.

### 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)

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