some UI changes for usability
[makneto-zunavac1.git] / src / ui-kde / chatoutput.cpp
blobc5fb30298acef4adf075ff3d9ffde5c5b14fbaa9
1 #include "chatoutput.h"
3 ChatOutput::ChatOutput(QWidget *parent) : QTextEdit(parent)
7 void ChatOutput::setNick(const QString &nick)
9 m_nick = nick;
12 void ChatOutput::infoMessage(const QString &text)
14 append("<font color=\"#00FF00\"><i>" + text + "</i></font>");
17 void ChatOutput::myMessage(const QString &text)
19 append("<font color=\"#0000FF\"><b>Me:</b></font> " + text);
22 void ChatOutput::incomingMessage(const QString &text, const QString &sender)
24 QString newText;//(text);
25 //newText.replace(QRegExp("([^:]+:)(.*)"), "<font color=\"#0000FF\">\\1</font>\\2");
26 //if (!m_nick.isEmpty() && newText.section(':', 1, 1).contains(m_nick, Qt::CaseInsensitive))
27 newText = "<b>" + sender + ": " + "</b>" + text ;
28 append(newText);