Provides methods for text formatting. More...
Inherits QObject.
Public Member Functions | |
IrcTextFormat (QObject *parent=0) | |
virtual | ~IrcTextFormat () |
Q_INVOKABLE QString | toHtml (const QString &text) const |
Q_INVOKABLE QString | toPlainText (const QString &text) const |
Properties | |
IrcPalette | palette |
QString | urlPattern |
IrcTextFormat is used to convert IRC-style formatted messages to either plain text or HTML. When converting to plain text, the IRC-style formatting (colors, bold, underline etc.) are simply stripped away. When converting to HTML, the IRC-style formatting is converted to the corresponding HTML formatting.
|
explicit |
Constructs a new text format with parent.
|
virtual |
Destructs the text format.
Converts text to HTML. This function parses the text and replaces IRC-style formatting (colors, bold, underline etc.) to the corresponding HTML formatting. Furthermore, this function detects URLs and replaces them with appropriate HTML hyperlinks.
Converts text to plain text. This function parses the text and strips away IRC-style formatting (colors, bold, underline etc.)
|
read |
This property holds the palette used for color formatting.