• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • applications API Reference
  • KDE Home
  • Contact Us
 

KTextEditor

  • kde-4.14
  • applications
  • kate
  • 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 
23 using namespace KTextEditor;
24 
25 TemplateScript::~TemplateScript()
26 {
27 }
28 
29 
30 
31 
32 TemplateScriptRegistrar::TemplateScriptRegistrar()
33 {
34 }
35 
36 TemplateScriptRegistrar::~TemplateScriptRegistrar()
37 {
38 }
39 
40 TemplateInterface2::TemplateInterface2()
41  : TemplateInterface()
42  , d(0)
43 {
44 }
45 
46 TemplateInterface2::~TemplateInterface2()
47 {
48 }
49 
50 bool 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::TemplateInterface2::TemplateInterface2
TemplateInterface2()
Definition: templateinterface2.cpp:40
KTextEditor::TemplateScript
Definition: templateinterface2.h:35
KTextEditor::TemplateScriptRegistrar::~TemplateScriptRegistrar
virtual ~TemplateScriptRegistrar()
Definition: templateinterface2.cpp:36
QMap
KTextEditor::TemplateInterface
This is an interface for inserting template strings with user editable fields into a document...
Definition: templateinterface.h:39
KTextEditor::Cursor
An object which represents a position in a Document.
Definition: cursor.h:55
KTextEditor::TemplateInterface2::~TemplateInterface2
virtual ~TemplateInterface2()
Definition: templateinterface2.cpp:46
templateinterface.h
templateinterface2.h
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...
QString
KTextEditor::TemplateScript::~TemplateScript
virtual ~TemplateScript()
Definition: templateinterface2.cpp:25
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::TemplateScriptRegistrar::TemplateScriptRegistrar
TemplateScriptRegistrar()
Definition: templateinterface2.cpp:32
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
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:48 by doxygen 1.8.7 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

applications API Reference

Skip menu "applications API Reference"
  •   kate
  •       kate
  •   KTextEditor
  •   Kate
  • Konsole

Search



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