KTextTemplate

Overview

KTextTemplate is a Free Software, Open Source Qt based library used for text processing.

The text template is modelled after the Django template system:

 <ul>
 {% for athlete in athlete_list %}
 <li>{{ athlete.name }}{% if athlete.isCaptain %} (C){% endif %}</li>
 {% endfor %}
 </ul>

KTextTemplate is covered by the GNU Lesser General Public Licence version 2.1 or, at your option, any later version.

Application API:

  • KTextTemplate::AbstractLocalizer
  • KTextTemplate::AbstractTemplateLoader
  • KTextTemplate::CachingLoaderDecorator
  • KTextTemplate::Context
  • KTextTemplate::Engine
  • KTextTemplate::FileSystemTemplateLoader
  • KTextTemplate::InMemoryTemplateLoader
  • KTextTemplate::OutputStream
  • KTextTemplate::QtLocalizer
  • KTextTemplate::Template

Plugin API:

  • KTextTemplate::AbstractNodeFactory
  • KTextTemplate::Exception
  • KTextTemplate::Filter
  • KTextTemplate::FilterExpression
  • KTextTemplate::Node
  • KTextTemplate::NodeList
  • KTextTemplate::Parser
  • KTextTemplate::RenderContext
  • KTextTemplate::SafeString
  • KTextTemplate::TagLibraryInterface
  • KTextTemplate::Variable

Guides:

Using the Module

Using a KDE module's C++ API requires linking against the module library. The preferred way of consuming the library is through CMake.

Building with CMake

Use the find_package() command to locate the needed module component in the KF6 package:

 find_package(KF6 REQUIRED COMPONENTS TextTemplate)
 target_link_libraries(mytarget PRIVATE KF6::TextTemplate)

For more details, see the Build with CMake overview.

API Reference