QTfrontend/ui/widget/chatwidget.h
author sheepluva
Wed, 25 Apr 2012 08:23:48 +0200
changeset 6928 9562ace15141
parent 6700 e04da46ee43c
child 6929 c305d31642ac
permissions -rw-r--r--
nemo said I was boring for removing the "hello" randomizer on room join. That was actually an accident, fixed by this commit. Now find an actual reason to call me boring (there are many to choose from :P) nemo!
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
480
09434d6c3865 GPL headers added
displacer
parents: 465
diff changeset
     1
/*
1066
1f1b3686a2b0 Update copyright headers a bit
unc0rr
parents: 486
diff changeset
     2
 * Hedgewars, a free turn based strategy game
486
7ea71cd3acd5 - Change proto version to 4
unc0rr
parents: 480
diff changeset
     3
 * Copyright (c) 2007 Igor Ulyanov <iulyanov@gmail.com>
6700
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
     4
 * Copyright (c) 2007-2012 Andrey Korotaev <unC0Rr@gmail.com>
480
09434d6c3865 GPL headers added
displacer
parents: 465
diff changeset
     5
 *
09434d6c3865 GPL headers added
displacer
parents: 465
diff changeset
     6
 * This program is free software; you can redistribute it and/or modify
09434d6c3865 GPL headers added
displacer
parents: 465
diff changeset
     7
 * it under the terms of the GNU General Public License as published by
09434d6c3865 GPL headers added
displacer
parents: 465
diff changeset
     8
 * the Free Software Foundation; version 2 of the License
09434d6c3865 GPL headers added
displacer
parents: 465
diff changeset
     9
 *
09434d6c3865 GPL headers added
displacer
parents: 465
diff changeset
    10
 * This program is distributed in the hope that it will be useful,
09434d6c3865 GPL headers added
displacer
parents: 465
diff changeset
    11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
09434d6c3865 GPL headers added
displacer
parents: 465
diff changeset
    12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
09434d6c3865 GPL headers added
displacer
parents: 465
diff changeset
    13
 * GNU General Public License for more details.
09434d6c3865 GPL headers added
displacer
parents: 465
diff changeset
    14
 *
09434d6c3865 GPL headers added
displacer
parents: 465
diff changeset
    15
 * You should have received a copy of the GNU General Public License
09434d6c3865 GPL headers added
displacer
parents: 465
diff changeset
    16
 * along with this program; if not, write to the Free Software
09434d6c3865 GPL headers added
displacer
parents: 465
diff changeset
    17
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
09434d6c3865 GPL headers added
displacer
parents: 465
diff changeset
    18
 */
09434d6c3865 GPL headers added
displacer
parents: 465
diff changeset
    19
461
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    20
#ifndef _CHAT_WIDGET_INCLUDED
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    21
#define _CHAT_WIDGET_INCLUDED
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    22
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    23
#include <QWidget>
2706
935b7d618cf0 sheepluva's patch to add a "follow" command to server and frontend, in order to stalk people and join them in their rooms
koda
parents: 1860
diff changeset
    24
#include <QListWidget>
461
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    25
#include <QString>
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    26
#include <QGridLayout>
6214
c06b7e2eb7a4 custom highlighting
sheepluva
parents: 6205
diff changeset
    27
#include <QList>
6229
4c834af76c3b * fix highlighting (i just broke it by not negating a boolean expression)
sheepluva
parents: 6227
diff changeset
    28
#include <QPair>
4899
8163c9aaad0c automatically convert hedgewars.org urls to actual links (in order to make support in the lobby/rooms easier
sheepluva
parents: 4897
diff changeset
    29
#include <QRegExp>
461
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    30
6165
6fe3e922246e moving and renaming SDLs.*, making it a singleton; cleaning up class responsibilties wrt SDLInteraction; some comments
sheepluva
parents: 6147
diff changeset
    31
#include "SDLInteraction.h"
2775
3445ce5e9c79 Only beep in room, load sound in constructor
nemo
parents: 2773
diff changeset
    32
6147
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents: 6060
diff changeset
    33
#include "SmartLineEdit.h"
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents: 6060
diff changeset
    34
4876
813ef4e8e385 sort nick lists case-insensitive
sheepluva
parents: 2847
diff changeset
    35
class ListWidgetNickItem;
1520
f72f538eba05 Refactor chat widget to use QTextBrower instead of QListWidget:
unc0rr
parents: 1405
diff changeset
    36
class QTextBrowser;
f72f538eba05 Refactor chat widget to use QTextBrower instead of QListWidget:
unc0rr
parents: 1405
diff changeset
    37
class QLineEdit;
461
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    38
class QListWidget;
2773
e94f240a8a41 Have game beep when someone joins lobby/room. Controlled by Sound option
nemo
parents: 2706
diff changeset
    39
class QSettings;
461
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    40
6200
6a4ace88d85a tweak and document abstract page
sheepluva
parents: 6197
diff changeset
    41
/// Class for custom nickname sorting
4876
813ef4e8e385 sort nick lists case-insensitive
sheepluva
parents: 2847
diff changeset
    42
class ListWidgetNickItem : public QListWidgetItem
813ef4e8e385 sort nick lists case-insensitive
sheepluva
parents: 2847
diff changeset
    43
{
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    44
    public:
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    45
        ListWidgetNickItem(const QString& nick, bool isFriend, bool isIgnored);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    46
        bool operator<(const QListWidgetItem & other) const;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    47
        void setFriend(bool isFriend);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    48
        void setIgnored(bool isIgnored);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    49
        bool isFriend();
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    50
        bool ignored();
4884
b2006a9f0fbc nicklists:
sheepluva
parents: 4876
diff changeset
    51
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    52
    private:
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    53
        bool aFriend;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    54
        bool isIgnored;
4876
813ef4e8e385 sort nick lists case-insensitive
sheepluva
parents: 2847
diff changeset
    55
};
813ef4e8e385 sort nick lists case-insensitive
sheepluva
parents: 2847
diff changeset
    56
6185
a6aa2d44f390 document css files better
sheepluva
parents: 6182
diff changeset
    57
a6aa2d44f390 document css files better
sheepluva
parents: 6182
diff changeset
    58
/**
6200
6a4ace88d85a tweak and document abstract page
sheepluva
parents: 6197
diff changeset
    59
 * @brief Chat widget.
6185
a6aa2d44f390 document css files better
sheepluva
parents: 6182
diff changeset
    60
 *
a6aa2d44f390 document css files better
sheepluva
parents: 6182
diff changeset
    61
 * By default uses :res/css/chat.css as style sheet for chat.
a6aa2d44f390 document css files better
sheepluva
parents: 6182
diff changeset
    62
 * See \repo{res/css/chat.css} for a more detailed description.
a6aa2d44f390 document css files better
sheepluva
parents: 6182
diff changeset
    63
 *
a6aa2d44f390 document css files better
sheepluva
parents: 6182
diff changeset
    64
 * @see http://doc.qt.nokia.com/4.5/richtext-html-subset.html#css-properties
a6aa2d44f390 document css files better
sheepluva
parents: 6182
diff changeset
    65
 */
a6aa2d44f390 document css files better
sheepluva
parents: 6182
diff changeset
    66
461
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    67
class HWChatWidget : public QWidget
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    68
{
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    69
        Q_OBJECT
461
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    70
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    71
    public:
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    72
        HWChatWidget(QWidget* parent, QSettings * gameSettings, bool notify);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    73
        void loadLists(const QString & nick);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    74
        void saveLists(const QString & nick);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    75
        void setShowReady(bool s);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    76
        void setShowFollow(bool enabled);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    77
        QStringList ignoreList, friendsList;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    78
        static const QString & styleSheet();
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    79
        void displayError(const QString & message);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    80
        void displayNotice(const QString & message);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    81
        void displayWarning(const QString & message);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    82
        void setUser(const QString & nickname);
2845
19db164dd20d Frontend:
smxx
parents: 2779
diff changeset
    83
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    84
    protected:
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    85
        virtual void dragEnterEvent(QDragEnterEvent * event);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    86
        virtual void dropEvent(QDropEvent * event);
6197
sheepluva
parents: 6194
diff changeset
    87
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    88
    private:
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    89
        static QString * s_styleSheet;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    90
        static QStringList * s_displayNone;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    91
        static bool s_isTimeStamped;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    92
        static QString s_tsFormat;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    93
        static const QRegExp URLREGEXP;
6197
sheepluva
parents: 6194
diff changeset
    94
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    95
        static void setStyleSheet(const QString & styleSheet = "");
6180
0992fc5a4ad9 some changes to the css... display:none; works now (e.g. you can use it for user join/leave messages that are not your friends)
sheepluva
parents: 6165
diff changeset
    96
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    97
        void loadList(QStringList & list, const QString & file);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    98
        void saveList(QStringList & list, const QString & file);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    99
        void updateNickItem(QListWidgetItem *item);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   100
        void updateNickItems();
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   101
        void addLine(const QString & cssClass, QString line, bool isHighlight = false);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   102
        bool parseCommand(const QString & line);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   103
        void discardStyleSheet();
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   104
        void saveStyleSheet();
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   105
        QString linkedNick(const QString & nickname);
461
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
   106
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   107
    public slots:
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   108
        void onChatString(const QString& str);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   109
        void onChatString(const QString& nick, const QString& str);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   110
        void onServerMessage(const QString& str);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   111
        void nickAdded(const QString& nick, bool notifyNick);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   112
        void nickRemoved(const QString& nick);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   113
        void clear();
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   114
        void setReadyStatus(const QString & nick, bool isReady);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   115
        void adminAccess(bool);
461
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
   116
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   117
    signals:
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   118
        void chatLine(const QString& str);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   119
        void kick(const QString & str);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   120
        void ban(const QString & str);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   121
        void info(const QString & str);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   122
        void follow(const QString &);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   123
        void nickCountUpdate(int cnt);
461
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
   124
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   125
    private:
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   126
        bool m_isAdmin;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   127
        QGridLayout mainLayout;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   128
        QTextBrowser* chatText;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   129
        QStringList chatStrings;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   130
        QListWidget* chatNicks;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   131
        SmartLineEdit* chatEditLine;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   132
        QAction * acInfo;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   133
        QAction * acKick;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   134
        QAction * acBan;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   135
        QAction * acFollow;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   136
        QAction * acIgnore;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   137
        QAction * acFriend;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   138
        QSettings * gameSettings;
6928
9562ace15141 nemo said I was boring for removing the "hello" randomizer on room join.
sheepluva
parents: 6700
diff changeset
   139
        QStringList m_helloSounds;
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   140
        QString m_hilightSound;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   141
        QString m_userNick;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   142
        QString m_clickedNick;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   143
        QList<QRegExp> m_highlights; ///< regular expressions used for highlighting
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   144
        bool notify;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   145
        bool showReady;
461
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
   146
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   147
    private slots:
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   148
        void returnPressed();
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   149
        void onBan();
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   150
        void onKick();
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   151
        void onInfo();
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   152
        void onFollow();
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   153
        void onIgnore();
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   154
        void onFriend();
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   155
        void chatNickDoubleClicked(QListWidgetItem * item);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   156
        void chatNickSelected(int index);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   157
        void linkClicked(const QUrl & link);
461
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
   158
};
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
   159
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
   160
#endif // _CHAT_WIDGET_INCLUDED