KTextEditor::TemplateInterface Class Reference
This is an interface for inserting template strings with user editable fields into a document. More...
#include <templateinterface.h>
Public Member Functions | |
uint | templateInterfaceNumber () const |
bool | insertTemplateText (uint line, uint column, const QString &templateString, const QMap< QString, QString > &initialValues, QWidget *parentWindow=0) |
Static Public Member Functions | |
static bool | expandMacros (QMap< QString, QString > &initialValues, QWidget *parentWindow) |
Protected Member Functions | |
void | setTemplateInterfaceDCOPSuffix (const QCString &suffix) |
virtual bool | insertTemplateTextImplementation (uint line, uint column, const QString &templateString, const QMap< QString, QString > &initialValues, QWidget *parentWindow=0)=0 |
Friends | |
class | PrivateTemplateInterface |
Detailed Description
This is an interface for inserting template strings with user editable fields into a document.
Definition at line 37 of file templateinterface.h.
Member Function Documentation
|
Parses The NAME string may contain any non-whitespace character execpt '}'
Definition at line 66 of file templateinterface.cpp. References KLocale::calendar(), KLocale::formatDate(), KLocale::formatTime(), KGlobal::locale(), and KCalendarSystem::yearString(). Referenced by insertTemplateText(). |
|
Inserts an interactive ediable template text at line "line", column "col".
This syntax is somewhat similiar to the one found in the Eclipse editor. There are certain common placeholders (macros), which get assigned a default initialValue, If the second parameter does not a given value. For all others the initial value is the name of the placeholder. Placeholder names may only consist of a-zA-Z0-9_ Common placeholders and values are
If a macro is started with a (persent sign) like "%{date}" it isn't added to the list editable strings ( for example TAB key navigation) if a value differing from the macro name is found. If the editor supports some kind of smart indentation, the inserted code should be layouted by the indenter. Definition at line 141 of file templateinterface.cpp. References expandMacros(), and insertTemplateTextImplementation(). |
|
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.
Referenced by insertTemplateText(). |
The documentation for this class was generated from the following files: