Класс ChatWindowStyleOutput

Служит для формирования HTML на основе выбраного стиля. Подробнее...

#include <chatwindow/chatwindowstyleoutput.h>

Граф связей класса ChatWindowStyleOutput:

Collaboration graph

Полный список членов класса

Открытые члены

Закрытые члены

Закрытые данные


Подробное описание

Служит для формирования HTML на основе выбраного стиля.

Конструктор(ы)

ChatWindowStyleOutput ( const QString &  style,
const QString &  variant 
)

Конструктор класса ChatWindowStyleOutput.


Методы

void commonReplace ( QString &  html,
const QString &  msg,
const QString &  time 
) [private]

Общие замены для обычного и статусного сообщения.

Аргументы:
html Строка, в которой будет производиться замены.
msg Сообщение.
time Время.

QString makeMessage ( const QString &  sender = "%sender%",
const QString &  message = "%message%",
bool  direction = true,
bool  sameSender = false,
const QString &  avatarPath = "",
bool  action = false,
const QString &  time = QDateTime::currentDateTime().toString("hh:mm:ss"),
bool  aligment = true 
)

Changes keywords to message atributes in html.

Аргументы:
sender Sender's nickname.
message Message text.
direction true if it was send, false if it was recived.
sameSender true - same sender, false - message is send by another person.
avatarPath Path to avatar, if "" uses style provided picture.
action true changes keywords to action atributes in html like "Bob is writing on the desk".
time Time at witch message was send.
aligment true if left-to-right, false if right-to-left.
Возвращает:
Result HTML.

QString makeSkeleton ( const QString &  chatName = "IMPOMEZIA Simple Chat",
const QString &  ownerName = "%sourceName%",
const QString &  partnerName = "%destinationName%",
const QString &  ownerIconPath = "",
const QString &  partnerIconPath = "",
const QString &  time = QDateTime::currentDateTime().toString() 
)

Create a html skeleton. Future messages will be added to it skeleton consist of styles, header and footer it has a mark as well. Before this mark new messages should be added.

Аргументы:
chatName Name of chat, example "Weekends plans".
ownerName Name or nickname of program owner.
partnerName Name or nicname of chating partner.
ownerIconPath Path to image files representing ppl, "" uses style provided pictures.
partnerIconPath See ownerIconPath.
time It's time when the chat has started.
Возвращает:
Result HTML.

QString makeStatus ( const QString &  message = "%message%",
const QString &  time = QDateTime::currentDateTime().toString("hh:mm:ss") 
)

It is used for displaying system and user messages like "user gone offline", "Marina is now away", "You are being ignored" etc.

Аргументы:
message Message by it self to be shown.
time Timestamp.
Возвращает:
Result HTML.


Документация по IMPOMEZIA Simple Chat. Последние изменения: Wed Feb 25 02:12:44 2009. Создано системой  doxygen 1.5.8
Бесплатный хостинг от EOMY.NET