# eric5.QScintilla.TypingCompleters.CompleterBase

Module implementing a base class for all typing completers.

Typing completers are classes that implement some convenience actions, that are performed while the user is typing (e.g. insert ')' when the user types '(').

### Global Attributes

None

### Classes

CompleterBase | Class implementing the base class for all completers.

### Functions

None

## CompleterBase

Class implementing the base class for all completers.

### Derived from

QObject

### Class Attributes

None

### Class Methods

None

### Methods

CompleterBase | Constructor
charAdded | Public slot called to handle the user entering a character.
isEnabled | Public method to get the enabled state.
readSettings | Public slot called to reread the configuration parameters.
setEnabled | Public slot to set the enabled state.

### Static Methods

None

#### CompleterBase (Constructor)

CompleterBase(editor, parent=None)

Constructor

editor
  reference to the editor object (QScintilla.Editor)
parent
  reference to the parent object (QObject) If parent is None, we set the editor as the parent.

#### CompleterBase.charAdded

charAdded(charNumber)

Public slot called to handle the user entering a character.

Note 1: this slot must be overridden by subclasses implementing the specific behavior for the language.

Note 2: charNumber can be greater than 255 because the editor is in UTF-8 mode by default.

charNumber
  value of the character entered (integer)

#### CompleterBase.isEnabled

isEnabled()

Public method to get the enabled state.

Returns:
  enabled state (boolean)

#### CompleterBase.readSettings

readSettings()

Public slot called to reread the configuration parameters.

Note: this slot should be overridden by subclasses having configurable parameters.

#### CompleterBase.setEnabled

setEnabled(enable)

Public slot to set the enabled state.

enable
  flag indicating the new enabled state (boolean)

Up