Blame view

QChatClient/chatwidget.cpp 413 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "chatwidget.h"

ChatWidget::ChatWidget(QWidget *parent) :
    QTextEdit(parent)
{

}

void ChatWidget::printServerMsg(QString &str)
{
    this->append("<p style=\"font-style:italic;color:gray;\">" + str + "</p>");
}

void ChatWidget::printMsg(QString &str)
{
    this->append(str);
}

void ChatWidget::printStatusMsg(QString &str)
{
    this->append("<p style=\"font-weight:bold;\">" + str + "</p>");
}