KDE 4.9 PyKDE API Reference
  • KDE's Python API
  • Overview
  • PyKDE Home
  • Sitemap
  • Contact Us
 

CodeCompletionModel2 Class Reference

from PyKDE4.ktexteditor import *

Inherits: KTextEditor.CodeCompletionModel → QAbstractItemModel → QObject
Namespace: KTextEditor

Detailed Description

You must inherit your completion-model from CodeCompletionModel2 if you want to use a hierarchical structure and want to receive execution-feedback.

See also:
CodeCompletionModel.GroupRole


Methods

 __init__ (self, QObject parent)
 executeCompletionItem2 (self, KTextEditor.Document document, KTextEditor.Range word, QModelIndex index)

Method Documentation

__init__ (  self,
QObject  parent
)
executeCompletionItem2 (  self,
KTextEditor.Document  document,
KTextEditor.Range  word,
QModelIndex  index
)

This function is responsible for inserting a selected completion into the document. The default implementation replaces the text that the completions were based on with the Qt.DisplayRole of the Name column of the given match.

Parameters:
document  the document to insert the completion into
word  the Range that the completions are based on (what the user entered so far)
index  identifies the completion match to insert

  • Full Index

Modules

  • akonadi
  • dnssd
  • kdecore
  • kdeui
  • khtml
  • kio
  • knewstuff
  • kparts
  • kutils
  • nepomuk
  • phonon
  • plasma
  • polkitqt
  • solid
  • soprano
This documentation is maintained by Simon Edwards.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal