• Skip to content
  • Skip to link menu
KDE 4.3 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KTextEditor

Overview of the Core Interface Design

Overview | Design | Coding Guidelines | Porting to KDE 4 | Using

The core of the KTextEditor interfaces consists of several main interfaces:

  • KTextEditor::Factory
    The Factory provides access to the editor object.
  • KTextEditor::Editor
    The Editor interface allows you to create documents, get a document list, and a be informed when a new document is created.
  • KTextEditor::Document
    The Document interface represents a single document and enables the creation of views, access to and manipulation of document contents, and access to document extension interfaces.
  • KTextEditor::View
    The View provides a widget that displays the contents of a Document, and its interface allows for manipulation of text selection, position of the cursor and mouse, text selections, and behaviour of the view. Additionally it provides access to the view extension interfaces.

The hierarchy can be illustrated as follows:

ktexteditorhierarchy.png

Basic KTextEditor Hierarchy

Notes for KTextEditor Users

To use a KTextEditor implementation you first have to get the KTextEditor::Editor object. This can be done in several ways and is described in detail in the following documentation:

  • KTextEditor::Factory
  • KTextEditor::EditorChooser

Notes for KTextEditor Developers

The KTextEditor::Factory provides access to its KTextEditor::Editor. The Editor has a list of all opened documents and can create new documents. A Document's content is visualized by a View. A Document can have any number of views (or none). When the contents of the document are changed, the change is reflected in all views.

The Factory should always return the same Editor object, as it does not make sense to load the same editor implementation several times. Further notes about the Editor implementation can be found in the Implementation Notes.

As applications can load different editor implementations via different factories (for example the kate-part and the yzis-part) the signal KTextEditor::Editor::documentCreated() contains the responsible Editor as first argument.

See also:
KTextEditor::Factory, KTextEditor::Editor, KTextEditor::Document, KTextEditor::View
Author:
Dominik Haumann <dhdev@gmx.de>

KTextEditor

Skip menu "KTextEditor"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal