KDE 4.9 PyKDE API Reference

- KDE's Python API

# KTextEditor Namespace Reference

`from PyKDE4.ktexteditor.KTextEditor import *`

## Detailed Description

Namespace for the KDE Text Editor Interfaces. These interfaces provide easy access to editor parts for the applications embedding them. At the moment they are at least supported by both the Kate Part and the Yzis Part.

## Class Index

A | EditorChooser (KTextEditor) | RangeCommand (KTextEditor)
AnnotationInterface (KTextEditor) | F | RecoveryInterface (KTextEditor)
AnnotationModel (KTextEditor) | Factory (KTextEditor) | S
AnnotationViewInterface (KTextEditor) | H | SearchInterface (KTextEditor)
Attribute (KTextEditor) | HighlightInterface (KTextEditor) | SessionConfigInterface (KTextEditor)
C | L | SmartCursor (KTextEditor)
CodeCompletionInterface (KTextEditor) | LoadSaveFilterCheckPlugin (KTextEditor) | SmartCursorNotifier (KTextEditor)
CodeCompletionModel (KTextEditor) | M | SmartCursorWatcher (KTextEditor)
CodeCompletionModel2 (KTextEditor) | Mark (KTextEditor) | SmartInterface (KTextEditor)
CodeCompletionModelControllerInterface3 (KTextEditor) | MarkInterface (KTextEditor) | SmartRange (KTextEditor)
Command (KTextEditor) | MdiContainer (KTextEditor) | SmartRangeNotifier (KTextEditor)
CommandExtension (KTextEditor) | ModeInterface (KTextEditor) | SmartRangeWatcher (KTextEditor)
CommandInterface (KTextEditor) | ModificationInterface (KTextEditor) | T
ConfigInterface (KTextEditor) | MovingCursor (KTextEditor) | TemplateInterface (KTextEditor)
ConfigPage (KTextEditor) | MovingInterface (KTextEditor) | TemplateInterface2 (KTextEditor)
ContainerInterface (KTextEditor) | MovingRange (KTextEditor) | TemplateScript (KTextEditor)
CoordinatesToCursorInterface (KTextEditor) | MovingRangeFeedback (KTextEditor) | TemplateScriptRegistrar (KTextEditor)
Cursor (KTextEditor) | P | TextHintInterface (KTextEditor)
D | ParameterizedSessionConfigInterface (KTextEditor) | V
Document (KTextEditor) | Plugin (KTextEditor) | VariableInterface (KTextEditor)
E | R | View (KTextEditor)
Editor (KTextEditor) | Range (KTextEditor) | ViewBarContainer (KTextEditor)

## Functions
KTextEditor.Plugin | createPlugin (KSharedPtr service, QObject parent)
KTextEditor.Editor | editor (QString libname)

## Function Documentation

KTextEditor.Plugin createPlugin | ( | KSharedPtr | service,
|  | QObject | parent
| ) |  |  |

Create a plugin represented by service with parent object parent. To get the KService object you usually use KServiceTypeTrader. Example

     KService.List list = KServiceTypeTrader.self()->query("KTextEditor/Plugin");

     foreach(const KService.Ptr &service, list) {
       // do something with service
     }

Returns:
  the plugin or NULL if it could not be loaded

KTextEditor.Editor editor | ( | QString | libname
| ) |  |  |

Helper function for the EditorChooser. Usually you do not have to use this function. Instead, use KTextEditor.EditorChooser.editor().

Parameters:

  | libname | library name, for example "katepart"

Returns:
  the Editor object on success, otherwise NULL

See also:
  KTextEditor.EditorChooser.editor()