KDE 4.9 PyKDE API Reference

- KDE's Python API

# KTextEditSpellInterface Class Reference

`from PyKDE4.kdeui import *`

## Detailed Description

This interface is a workaround to keep binary compatibility in KDE4, because adding the virtual keyword to functions is not BC.

Call KTextEdit.setSpellInterface() to set this interface to a KTextEdit, and some functions of KTextEdit will delegate their calls to this interface instead, which provides a way for derived classes to modifiy the behavior or those functions.

Since:
  4.2

TODO: Get rid of this class in KDE5 and add the methods to KTextEdit instead, by making them virtual there.

## Methods

bool | isSpellCheckingEnabled (self)
| setSpellCheckingEnabled (self, bool enable)
bool | shouldBlockBeSpellChecked (self, QString block)

## Method Documentation

bool isSpellCheckingEnabled | ( |  | self ) |

Abstract method:
  This method is abstract and can be overridden but not called directly.

Returns:
  true if spellchecking for the text edit is enabled.

setSpellCheckingEnabled | ( | self, |
|  | bool | enable
| ) |  |  |

Abstract method:
  This method is abstract and can be overridden but not called directly.

Sets whether to enable spellchecking for the KTextEdit.

Parameters:

  | enable | true if spellchecking should be enabled, false otherwise

bool shouldBlockBeSpellChecked | ( | self, |
|  | QString | block
| ) |  |  |

Abstract method:
  This method is abstract and can be overridden but not called directly.

Returns true if the given paragraph or block should be spellcheck. For example, a mail client does not want to check quoted text, and would return false here (by checking whether the block starts with a quote sign).