• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KTextEditor

  • interfaces
  • ktexteditor
templateinterface2.cpp
Go to the documentation of this file.
1/* This file is part of the KDE libraries
2 Copyright (C) 2010 Joseph Wenninger <jowenn@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License version 2 as published by the Free Software Foundation.
7
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 Boston, MA 02110-1301, USA.
17*/
18
19#include "templateinterface.h"
20#include "templateinterface2.h"
21
22
23using namespace KTextEditor;
24
25TemplateScript::~TemplateScript()
26{
27}
28
29
30
31
32TemplateScriptRegistrar::TemplateScriptRegistrar()
33{
34}
35
36TemplateScriptRegistrar::~TemplateScriptRegistrar()
37{
38}
39
40TemplateInterface2::TemplateInterface2()
41 : TemplateInterface()
42 , d(0)
43{
44}
45
46TemplateInterface2::~TemplateInterface2()
47{
48}
49
50bool TemplateInterface2::insertTemplateText ( const Cursor& insertPosition,
51 const QString &templateString,
52 const QMap<QString, QString> &initialValues,
53 TemplateScript* templateScript)
54{
55 QMap<QString,QString> enhancedInitValues(initialValues);
56 if (!KTE_INTERNAL_setupIntialValues(templateString,&enhancedInitValues)) {
57 return false;
58 }
59 return insertTemplateTextImplementation( insertPosition, templateString, enhancedInitValues, templateScript);
60}
61
62// kate: space-indent on; indent-width 2; replace-tabs on;
KTextEditor::Cursor
An object which represents a position in a Document.
Definition: cursor.h:62
KTextEditor::TemplateInterface2::TemplateInterface2
TemplateInterface2()
Definition: templateinterface2.cpp:40
KTextEditor::TemplateInterface2::~TemplateInterface2
virtual ~TemplateInterface2()
Definition: templateinterface2.cpp:46
KTextEditor::TemplateInterface2::insertTemplateTextImplementation
virtual bool insertTemplateTextImplementation(const Cursor &insertPosition, const QString &templateString, const QMap< QString, QString > &initialValues, TemplateScript *templateScript)=0
You must implement this, it is called by insertTemplateText, after all default values are inserted.
KTextEditor::TemplateInterface2::insertTemplateText
bool insertTemplateText(const Cursor &insertPosition, const QString &templateString, const QMap< QString, QString > &initialValues, TemplateScript *templateScript)
See the function description in TemplateInterface, this should be folded into the base Interface in K...
Definition: templateinterface2.cpp:50
KTextEditor::TemplateInterface
This is an interface for inserting template strings with user editable fields into a document.
Definition: templateinterface.h:40
KTextEditor::TemplateInterface::KTE_INTERNAL_setupIntialValues
bool KTE_INTERNAL_setupIntialValues(const QString &templateString, QMap< QString, QString > *initialValues)
DO NOT USE !!!! THIS IS USED INTERNALLY by the interface only !!!!!! Behaviour might change !...
Definition: templateinterface.cpp:118
KTextEditor::TemplateScriptRegistrar::~TemplateScriptRegistrar
virtual ~TemplateScriptRegistrar()
Definition: templateinterface2.cpp:36
KTextEditor::TemplateScriptRegistrar::TemplateScriptRegistrar
TemplateScriptRegistrar()
Definition: templateinterface2.cpp:32
KTextEditor::TemplateScript
Definition: templateinterface2.h:36
KTextEditor::TemplateScript::~TemplateScript
virtual ~TemplateScript()
Definition: templateinterface2.cpp:25
QMap
KTextEditor
Namespace for the KDE Text Editor Interfaces.
Definition: annotationinterface.h:31
templateinterface2.h
templateinterface.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KTextEditor

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

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal