KTextEditor.TemplateInterface2

KDE 4.9 PyKDE API Reference

- KDE's Python API

# TemplateInterface2 Class Reference

`from PyKDE4.ktexteditor import *`

Inherits: KTextEditor.TemplateInterface
Namespace: KTextEditor

## Detailed Description

Since:
  4.5 This is an interface for inserting template strings with user editable fields into a document and support for scripts. Fold back into base Interface in KDE 5

## Methods
| __init__ (self)
bool | insertTemplateText (self, KTextEditor.Cursor insertPosition, QString templateString, {QString:QString} initialValues, KTextEditor.TemplateScript templateScript)
bool | insertTemplateTextImplementation (self, KTextEditor.Cursor insertPosition, QString templateString, {QString:QString} initialValues, KTextEditor.TemplateScript templateScript)
bool | insertTemplateTextImplementation (self, KTextEditor.Cursor insertPosition, QString templateString, {QString:QString} initialValues)

## Method Documentation

__init__ | ( |  | self ) |

bool insertTemplateText | ( | self, |
|  | KTextEditor.Cursor | insertPosition,
|  | QString | templateString,
|  | {QString:QString} | initialValues,
|  | KTextEditor.TemplateScript | templateScript
| ) |  |  |

See the function description in TemplateInterface, this should be folded into the base Interface in KDE 5

Parameters:

  | templateScript | pointer to TemplateScript created by TemplateScriptRegistrar.registerTemplateScript

bool insertTemplateTextImplementation | ( | self, |
|  | KTextEditor.Cursor | insertPosition,
|  | QString | templateString,
|  | {QString:QString} | initialValues,
|  | KTextEditor.TemplateScript | templateScript
| ) |  |  |

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

You must implement this, it is called by insertTemplateText, after all default values are inserted. If you are implementing this interface, this method should work as described in the documentation for insertTemplateText above.

Returns:
  true if any text was inserted.

bool insertTemplateTextImplementation | ( | self, |
|  | KTextEditor.Cursor | insertPosition,
|  | QString | templateString,
|  | {QString:QString} | initialValues
| ) |  |  |

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

You must implement this, it is called by insertTemplateText, after all default values are inserted. If you are implementing this interface, this method should work as described in the documentation for insertTemplateText above.

Returns:
  true if any text was inserted.