QTfrontend/ui/widget/chatwidget.h
changeset 8759 1a4b9b9fe2b0
parent 8451 8c7da08df048
child 8762 388d2bf73ff9
--- a/QTfrontend/ui/widget/chatwidget.h	Wed Mar 20 09:13:05 2013 +0400
+++ b/QTfrontend/ui/widget/chatwidget.h	Wed Mar 20 23:18:46 2013 +0100
@@ -86,12 +86,32 @@
         void beforeContentAdd();
         void afterContentAdd();
 
+        /**
+         * @brief Checks whether the message contains a highlight.
+         * @param sender the sender of the message
+         * @param message the message
+         * @return true if the sender is somebody else and the message contains a highlight, otherwise false
+         */
+        bool containsHighlight(const QString & sender, const QString & message);
+        /**
+         * @brief Escapes HTML chars in the message and converts URls to HTML links.
+         * @param message the message to be converted to HTML
+         * @return the HTML message
+         */
+        QString messageToHTML(const QString & message);
+        void printChatString(
+            const QString & nick,
+            const QString & str,
+            const QString & cssClassPart,
+            bool highlight);
+
     public slots:
-        void onChatString(const QString& str);
-        void onChatString(const QString& nick, const QString& str);
+        void onChatAction(const QString & nick, const QString & str);
+        void onChatMessage(const QString & nick, const QString & str);
         void onServerMessage(const QString& str);
         void nickAdded(const QString& nick, bool notifyNick);
         void nickRemoved(const QString& nick);
+        void nickRemoved(const QString& nick, const QString& message);
         void clear();
         void adminAccess(bool);