#include <chatwindow/chatwindowstyleoutput.h>

| 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. |
| 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. |
| 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. |
1.5.8