#include "iproxyobject.h"
Definition at line 30 of file iproxyobject.h.
◆ ~IFormatterProxyObject()
virtual LC::Azoth::IFormatterProxyObject::~IFormatterProxyObject |
( |
| ) |
|
|
inlinevirtual |
◆ EscapeBody()
◆ FindLinks()
virtual QStringList LC::Azoth::IFormatterProxyObject::FindLinks |
( |
const QString & |
| ) |
|
|
pure virtual |
◆ FormatBody()
virtual QString LC::Azoth::IFormatterProxyObject::FormatBody |
( |
QString |
body, |
|
|
QObject * |
message, |
|
|
const QList< QColor > & |
coloring |
|
) |
| const |
|
pure virtual |
Formats the body for the given message.
This function should be used to format the body of the given message.
This function also accepts the list of colors used for nick coloring in the current chat window, since the body of the message may also be colored if it contains other participants' nicks.
- Parameters
-
[in] | body | The body to format. |
[in] | message | The message object implementing IMessage. |
[in] | coloring | The set of colors used for nick coloring. |
- Returns
- The formatted body.
◆ FormatDate()
virtual QString LC::Azoth::IFormatterProxyObject::FormatDate |
( |
QDateTime |
date, |
|
|
QObject * |
message |
|
) |
| const |
|
pure virtual |
Formats the date for the given message.
This function should be used to format the date of a message when displaying it.
- Parameters
-
[in] | date | The timestamp of the message to format. |
[in] | message | The message object implementing IMessage. |
- Returns
- The formatted date string.
◆ FormatLinks()
virtual void LC::Azoth::IFormatterProxyObject::FormatLinks |
( |
QString & |
body | ) |
|
|
pure virtual |
◆ FormatNickname()
virtual QString LC::Azoth::IFormatterProxyObject::FormatNickname |
( |
QString |
nick, |
|
|
QObject * |
message, |
|
|
const QString & |
color |
|
) |
| const |
|
pure virtual |
Formats the nickname for the given message and color.
This function should be used to format the nick when displaying the given message. The color should be the one from GetNickColor().
- Parameters
-
[in] | nick | The nickname to format. |
[in] | message | The message object implementing IMessage. |
[in] | color | The color of the nickname. |
- Returns
- The formatted nickname.
◆ GenerateColors()
virtual QList<QColor> LC::Azoth::IFormatterProxyObject::GenerateColors |
( |
const QString & |
scheme, |
|
|
QColor |
bg |
|
) |
| const |
|
pure virtual |
Generates the nickname colors for the given scheme.
If the scheme is empty or equals "hash", then a random set of colors is generated based on bg and settings.
Otherwise, scheme is interpreted as space-separated list of colors, either named, like "green" or "cyan", or their RGB values in forms like "#FA12BB".
- Parameters
-
[in] | scheme | The color scheme to use. |
[in] | bg | The background color to generate colors for. Pass an invalid color to use application palette's background. |
- Returns
- The list of colors matching the given color scheme.
◆ GetNickColor()
virtual QString LC::Azoth::IFormatterProxyObject::GetNickColor |
( |
const QString & |
nick, |
|
|
const QList< QColor > & |
colors |
|
) |
| const |
|
pure virtual |
Returns the color for the given nick and color set.
This function should be used to choose a color for the given nick. Internally, it calculates a hash from the nick and uses it to choose a corresponding color.
- Parameters
-
[in] | nick | The nickname for which to choose the color. |
[in] | colors | The list of colors to choose from. |
- Returns
- The color name to use.
◆ PreprocessMessage()
virtual void LC::Azoth::IFormatterProxyObject::PreprocessMessage |
( |
QObject * |
message | ) |
|
|
pure virtual |
Preprocesses the message before displaying it.
This function should be called once on each message before displaying it.
- Parameters
-
[in] | message | The message to preprocess. |
The documentation for this class was generated from the following file:
- /home/d34df00d/leechcraft/src/plugins/azoth/interfaces/azoth/iproxyobject.h