Ki18n
Public Member Functions | List of all members
KUITSetup Class Reference

#include <kuitmarkup.h>

Public Member Functions

 ~KUITSetup ()
void setTagPattern (const QString &tagName, const QStringList &attrNames, KUIT::VisualFormat format, const KLocalizedString &pattern)
void setTagPattern (const QString &tagName, const QStringList &attrNames, KUIT::VisualFormat format, const KUIT::TagFormatter formatter)
void setTagClass (const QString &tagName, KUIT::TagClass aClass)
void setFormatForMarker (const QString &marker, KUIT::VisualFormat format)

Detailed Description

Class for modifying KUIT markup in a given catalog.

Not directly constructed, but obtained through KUIT::setupForCatalog.

Constructor & Destructor Documentation

KUITSetup::~KUITSetup ( )

Destructor.

Member Function Documentation

void KUITSetup::setTagPattern ( const QString &  tagName,
const QStringList &  attrNames,
KUIT::VisualFormat  format,
const KLocalizedString pattern 
)

Set the formatting string for a tag with attributes combination.

If a new tag name is given, this effectively defines a new tag. The same holds for attribute names.

The pattern string pattern should contain placeholders for inserting the text and the attribute values. %1 will be replaced with the wrapped text, and %2 and upwards with attribute values in the order given by attrNames. Non markup-aware translation call with context (ki18nc) should be used to create the pattern string.

Parameters
tagNamethe name of the tag
attrNamesthe names of the attributes
formatthe target visual format
patternthe pattern string
void KUITSetup::setTagPattern ( const QString &  tagName,
const QStringList &  attrNames,
KUIT::VisualFormat  format,
const KUIT::TagFormatter  formatter 
)

Set the formatting function for a tag with attributes combination.

This is like setTagPattern with a string pattern, except that a function instead of simple string substitution is used to format the text.

Parameters
tagNamethe name of the tag
attrNamesthe names of the attributes
formatthe target visual format
formatterthe formatting function
void KUITSetup::setTagClass ( const QString &  tagName,
KUIT::TagClass  aClass 
)

Set the KUIT class of the tag.

Parameters
tagNamethe name of the tag
aClassthe KUIT tag class
void KUITSetup::setFormatForMarker ( const QString &  marker,
KUIT::VisualFormat  format 
)

Set the default visual format for given UI marker.

Giving "@<major>" for marker means to set the format only for standalone @<major> marker, while "@<major>:" (with trailing colon) means to set the same format for all @<major>:<minor> combinations.

Setting KUIT::UndefinedFormat as format means to fall back to default format for the given UI marker.

Parameters
markerthe UI marker
formatthe visual format

The documentation for this class was generated from the following file: