Kuit Namespace
Global constants and functions related to KUIT markup. More...
| Header: | #include <Kuit> | 
| CMake: | find_package(KF6 REQUIRED COMPONENTS I18n)target_link_libraries(mytarget PRIVATE KF6::I18n) | 
Types
| enum | TagClass { PhraseTag, StructTag } | 
| TagFormatter | |
| enum | VisualFormat { UndefinedFormat, PlainText, RichText, TermText } | 
Functions
| QString | escape(const QString &text) | 
| KuitSetup & | setupForDomain(const QByteArray &domain) | 
Detailed Description
Type Documentation
enum Kuit::TagClass
Classification of KUIT tags.
| Constant | Value | Description | 
|---|---|---|
| Kuit::PhraseTag | 0 | Tags wrapping text inserted into running text. | 
| Kuit::StructTag | 1 | Tags splitting text into paragraph-level blocks | 
Kuit::TagFormatter
Functions accepted by tag formatting functions.
languages the target languages (by decreasing priority)
tagName the wrapping tag name
attributes the attribute name-value pairs in the tag
text the wrapped text
tagPath the ordered list of ancestor tag names, parent first
format the target visual format
Returns formatted text
enum Kuit::VisualFormat
Visual formats into which KUIT markup can be resolved.
| Constant | Value | Description | 
|---|---|---|
| Kuit::UndefinedFormat | 0 | format not defined. This value can be explicitly set (e.g. through KLocalizedString::withFormat) to indicate that the format should be decided by another mechanism (e.g. context UI marker). | 
| Kuit::PlainText | 10 | Plain Text | 
| Kuit::RichText | 20 | Qt rich text (HTML subset). | 
| Kuit::TermText | 30 | Terminal escape sequences. | 
Function Documentation
QString Kuit::escape(const QString &text)
Convert &, ", ', <, > characters into XML entities &, <, >, ', ", respectively.
KuitSetup &Kuit::setupForDomain(const QByteArray &domain)
Get hold of the KUIT setup object for a given domain.
domain the translation domain
Returns pointer to KUIT setup object