QTfrontend/ui/widget/chatwidget.h
author Wuzzy <Wuzzy2@mail.ru>
Wed, 25 Oct 2017 23:09:41 +0200
changeset 12763 ad67a3804981
parent 11865 047be82b6f67
child 15909 7409084d891f
permissions -rw-r--r--
Fix sometimes ammo schemes not being saved after changing before an ammo scheme got deleted in session This was because the bool isDeleting is not initialized, so its initial value is unpredictable. Which means there's chance it starts with true, confusing the frontend.
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>
11046
47a8c19ecb60 more copyright fixes
sheepluva
parents: 10536
diff changeset
     4
 * Copyright (c) 2004-2015 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
10108
c68cf030eded update FSF address. note: two sdl include files (by Sam Lantinga) still have the old FSF address in their copyright - but I ain't gonna touch their copyright headers
sheepluva
parents: 9998
diff changeset
    17
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
480
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>
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    24
#include <QString>
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    25
#include <QGridLayout>
6214
c06b7e2eb7a4 custom highlighting
sheepluva
parents: 6205
diff changeset
    26
#include <QList>
6229
4c834af76c3b * fix highlighting (i just broke it by not negating a boolean expression)
sheepluva
parents: 6227
diff changeset
    27
#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
    28
#include <QRegExp>
7720
8e6b79a020f8 Show more statuses in icons.
unc0rr
parents: 6952
diff changeset
    29
#include <QHash>
7723
ca05b576ec74 Start moving to players list model.
unc0rr
parents: 7720
diff changeset
    30
#include <QListWidgetItem>
461
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    31
6165
6fe3e922246e moving and renaming SDLs.*, making it a singleton; cleaning up class responsibilties wrt SDLInteraction; some comments
sheepluva
parents: 6147
diff changeset
    32
#include "SDLInteraction.h"
2775
3445ce5e9c79 Only beep in room, load sound in constructor
nemo
parents: 2773
diff changeset
    33
6147
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents: 6060
diff changeset
    34
#include "SmartLineEdit.h"
10536
1010df878643 don't flash frontend on hilight - while in-game
sheepluva
parents: 10108
diff changeset
    35
#include "playerslistmodel.h"
6147
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents: 6060
diff changeset
    36
1520
f72f538eba05 Refactor chat widget to use QTextBrower instead of QListWidget:
unc0rr
parents: 1405
diff changeset
    37
class QTextBrowser;
f72f538eba05 Refactor chat widget to use QTextBrower instead of QListWidget:
unc0rr
parents: 1405
diff changeset
    38
class QLineEdit;
7723
ca05b576ec74 Start moving to players list model.
unc0rr
parents: 7720
diff changeset
    39
class QListView;
2773
e94f240a8a41 Have game beep when someone joins lobby/room. Controlled by Sound option
nemo
parents: 2706
diff changeset
    40
class QSettings;
7725
4ad05a478c6c Further work on moving to players list model
unc0rr
parents: 7723
diff changeset
    41
class QAbstractItemModel;
7740
076f57836ee3 Restore old context menu behavior
unc0rr
parents: 7725
diff changeset
    42
class QMenu;
461
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    43
6185
a6aa2d44f390 document css files better
sheepluva
parents: 6182
diff changeset
    44
/**
6200
6a4ace88d85a tweak and document abstract page
sheepluva
parents: 6197
diff changeset
    45
 * @brief Chat widget.
6185
a6aa2d44f390 document css files better
sheepluva
parents: 6182
diff changeset
    46
 *
a6aa2d44f390 document css files better
sheepluva
parents: 6182
diff changeset
    47
 * By default uses :res/css/chat.css as style sheet for chat.
a6aa2d44f390 document css files better
sheepluva
parents: 6182
diff changeset
    48
 * See \repo{res/css/chat.css} for a more detailed description.
a6aa2d44f390 document css files better
sheepluva
parents: 6182
diff changeset
    49
 *
a6aa2d44f390 document css files better
sheepluva
parents: 6182
diff changeset
    50
 * @see http://doc.qt.nokia.com/4.5/richtext-html-subset.html#css-properties
a6aa2d44f390 document css files better
sheepluva
parents: 6182
diff changeset
    51
 */
a6aa2d44f390 document css files better
sheepluva
parents: 6182
diff changeset
    52
461
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    53
class HWChatWidget : public QWidget
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    54
{
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    55
        Q_OBJECT
461
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    56
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    57
    public:
8179
a1ffcb559f99 Refactor: get rid of excessive QSettings instances on the same poor hedgewars.ini file
unc0rr
parents: 7742
diff changeset
    58
        HWChatWidget(QWidget* parent, bool notify);
6929
c305d31642ac reimplement auto-kick for ignored players (it was temporarily removed during refactoring)
sheepluva
parents: 6928
diff changeset
    59
        void setIgnoreListKick(bool enabled); ///< automatically kick people on ignore list (if possible)
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    60
        void setShowFollow(bool enabled);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    61
        static const QString & styleSheet();
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    62
        void displayError(const QString & message);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    63
        void displayNotice(const QString & message);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    64
        void displayWarning(const QString & message);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    65
        void setUser(const QString & nickname);
7725
4ad05a478c6c Further work on moving to players list model
unc0rr
parents: 7723
diff changeset
    66
        void setUsersModel(QAbstractItemModel * model);
8179
a1ffcb559f99 Refactor: get rid of excessive QSettings instances on the same poor hedgewars.ini file
unc0rr
parents: 7742
diff changeset
    67
        void setSettings(QSettings * settings);
2845
19db164dd20d Frontend:
smxx
parents: 2779
diff changeset
    68
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    69
    protected:
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    70
        virtual void dragEnterEvent(QDragEnterEvent * event);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    71
        virtual void dropEvent(QDropEvent * event);
9493
23c674bfa2e2 Scroll chat widget to bottom on show and resize events
unc0rr
parents: 9080
diff changeset
    72
        virtual void resizeEvent(QResizeEvent * event);
23c674bfa2e2 Scroll chat widget to bottom on show and resize events
unc0rr
parents: 9080
diff changeset
    73
        virtual void showEvent(QShowEvent * event);
6197
sheepluva
parents: 6194
diff changeset
    74
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    75
    private:
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    76
        static QString * s_styleSheet;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    77
        static QStringList * s_displayNone;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    78
        static bool s_isTimeStamped;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    79
        static QString s_tsFormat;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    80
        static const QRegExp URLREGEXP;
6197
sheepluva
parents: 6194
diff changeset
    81
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    82
        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
    83
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    84
        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
    85
        bool parseCommand(const QString & line);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    86
        void discardStyleSheet();
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    87
        void saveStyleSheet();
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
    88
        QString linkedNick(const QString & nickname);
8451
8c7da08df048 Allow navigating backwards chat widget log while new lines are being added
unc0rr
parents: 8430
diff changeset
    89
        void beforeContentAdd();
8c7da08df048 Allow navigating backwards chat widget log while new lines are being added
unc0rr
parents: 8430
diff changeset
    90
        void afterContentAdd();
10536
1010df878643 don't flash frontend on hilight - while in-game
sheepluva
parents: 10108
diff changeset
    91
        bool isInGame();
461
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
    92
8759
1a4b9b9fe2b0 add lobby chat features to room chat
sheepluva
parents: 8451
diff changeset
    93
        /**
1a4b9b9fe2b0 add lobby chat features to room chat
sheepluva
parents: 8451
diff changeset
    94
         * @brief Checks whether the message contains a highlight.
1a4b9b9fe2b0 add lobby chat features to room chat
sheepluva
parents: 8451
diff changeset
    95
         * @param sender the sender of the message
1a4b9b9fe2b0 add lobby chat features to room chat
sheepluva
parents: 8451
diff changeset
    96
         * @param message the message
1a4b9b9fe2b0 add lobby chat features to room chat
sheepluva
parents: 8451
diff changeset
    97
         * @return true if the sender is somebody else and the message contains a highlight, otherwise false
1a4b9b9fe2b0 add lobby chat features to room chat
sheepluva
parents: 8451
diff changeset
    98
         */
1a4b9b9fe2b0 add lobby chat features to room chat
sheepluva
parents: 8451
diff changeset
    99
        bool containsHighlight(const QString & sender, const QString & message);
1a4b9b9fe2b0 add lobby chat features to room chat
sheepluva
parents: 8451
diff changeset
   100
        /**
1a4b9b9fe2b0 add lobby chat features to room chat
sheepluva
parents: 8451
diff changeset
   101
         * @brief Escapes HTML chars in the message and converts URls to HTML links.
1a4b9b9fe2b0 add lobby chat features to room chat
sheepluva
parents: 8451
diff changeset
   102
         * @param message the message to be converted to HTML
1a4b9b9fe2b0 add lobby chat features to room chat
sheepluva
parents: 8451
diff changeset
   103
         * @return the HTML message
1a4b9b9fe2b0 add lobby chat features to room chat
sheepluva
parents: 8451
diff changeset
   104
         */
1a4b9b9fe2b0 add lobby chat features to room chat
sheepluva
parents: 8451
diff changeset
   105
        QString messageToHTML(const QString & message);
1a4b9b9fe2b0 add lobby chat features to room chat
sheepluva
parents: 8451
diff changeset
   106
        void printChatString(
1a4b9b9fe2b0 add lobby chat features to room chat
sheepluva
parents: 8451
diff changeset
   107
            const QString & nick,
1a4b9b9fe2b0 add lobby chat features to room chat
sheepluva
parents: 8451
diff changeset
   108
            const QString & str,
1a4b9b9fe2b0 add lobby chat features to room chat
sheepluva
parents: 8451
diff changeset
   109
            const QString & cssClassPart,
1a4b9b9fe2b0 add lobby chat features to room chat
sheepluva
parents: 8451
diff changeset
   110
            bool highlight);
1a4b9b9fe2b0 add lobby chat features to room chat
sheepluva
parents: 8451
diff changeset
   111
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   112
    public slots:
8759
1a4b9b9fe2b0 add lobby chat features to room chat
sheepluva
parents: 8451
diff changeset
   113
        void onChatAction(const QString & nick, const QString & str);
1a4b9b9fe2b0 add lobby chat features to room chat
sheepluva
parents: 8451
diff changeset
   114
        void onChatMessage(const QString & nick, const QString & str);
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   115
        void onServerMessage(const QString& str);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   116
        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
   117
        void nickRemoved(const QString& nick);
8759
1a4b9b9fe2b0 add lobby chat features to room chat
sheepluva
parents: 8451
diff changeset
   118
        void nickRemoved(const QString& nick, const QString& message);
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   119
        void clear();
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   120
        void adminAccess(bool);
8762
388d2bf73ff9 fix player info
sheepluva
parents: 8759
diff changeset
   121
        void onPlayerInfo(
388d2bf73ff9 fix player info
sheepluva
parents: 8759
diff changeset
   122
            const QString & nick,
388d2bf73ff9 fix player info
sheepluva
parents: 8759
diff changeset
   123
            const QString & ip,
388d2bf73ff9 fix player info
sheepluva
parents: 8759
diff changeset
   124
            const QString & version,
388d2bf73ff9 fix player info
sheepluva
parents: 8759
diff changeset
   125
            const QString & roomInfo);
461
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
   126
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   127
    signals:
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   128
        void chatLine(const QString& str);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   129
        void kick(const QString & str);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   130
        void ban(const QString & str);
11865
047be82b6f67 fix for Bug 91 - Make DELEGATE action available in frontend
sheepluva
parents: 11046
diff changeset
   131
        void delegate(const QString & str);
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   132
        void info(const QString & str);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   133
        void follow(const QString &);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   134
        void nickCountUpdate(int cnt);
8396
5123eac2f9d6 - Pass unknown chat commands to server
unc0rr
parents: 8179
diff changeset
   135
        void consoleCommand(const QString & command);
461
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
   136
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   137
    private:
10536
1010df878643 don't flash frontend on hilight - while in-game
sheepluva
parents: 10108
diff changeset
   138
        PlayersListModel* m_usersModel;
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   139
        bool m_isAdmin;
8430
5a5c34a75e1a Aesthetic improvements to chat widget. Also fixed the ghosting issue in a few areas by using repaint().
dag10
parents: 8396
diff changeset
   140
        QHBoxLayout mainLayout;
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   141
        QTextBrowser* chatText;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   142
        QStringList chatStrings;
7723
ca05b576ec74 Start moving to players list model.
unc0rr
parents: 7720
diff changeset
   143
        QListView* chatNicks;
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   144
        SmartLineEdit* chatEditLine;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   145
        QAction * acInfo;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   146
        QAction * acKick;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   147
        QAction * acBan;
11865
047be82b6f67 fix for Bug 91 - Make DELEGATE action available in frontend
sheepluva
parents: 11046
diff changeset
   148
        QAction * acDelegate;
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   149
        QAction * acFollow;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   150
        QAction * acIgnore;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   151
        QAction * acFriend;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   152
        QSettings * gameSettings;
7740
076f57836ee3 Restore old context menu behavior
unc0rr
parents: 7725
diff changeset
   153
        QMenu * m_nicksMenu;
6928
9562ace15141 nemo said I was boring for removing the "hello" randomizer on room join.
sheepluva
parents: 6700
diff changeset
   154
        QStringList m_helloSounds;
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   155
        QString m_hilightSound;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   156
        QString m_userNick;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   157
        QString m_clickedNick;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   158
        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
   159
        bool notify;
6929
c305d31642ac reimplement auto-kick for ignored players (it was temporarily removed during refactoring)
sheepluva
parents: 6928
diff changeset
   160
        bool m_autoKickEnabled;
8451
8c7da08df048 Allow navigating backwards chat widget log while new lines are being added
unc0rr
parents: 8430
diff changeset
   161
        bool m_scrollToBottom;
8c7da08df048 Allow navigating backwards chat widget log while new lines are being added
unc0rr
parents: 8430
diff changeset
   162
        int m_scrollBarPos;
461
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
   163
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   164
    private slots:
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   165
        void returnPressed();
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   166
        void onBan();
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   167
        void onKick();
11865
047be82b6f67 fix for Bug 91 - Make DELEGATE action available in frontend
sheepluva
parents: 11046
diff changeset
   168
        void onDelegate();
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   169
        void onInfo();
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   170
        void onFollow();
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   171
        void onIgnore();
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   172
        void onFriend();
7742
e5e529dcc9bb - Finish conversion to nicks model
unc0rr
parents: 7741
diff changeset
   173
        void chatNickDoubleClicked(const QModelIndex & index);
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6418
diff changeset
   174
        void linkClicked(const QUrl & link);
7740
076f57836ee3 Restore old context menu behavior
unc0rr
parents: 7725
diff changeset
   175
        void nicksContextMenuRequested(const QPoint & pos);
461
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
   176
};
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
   177
105af110b0e6 chatWidget with layout
displacer
parents:
diff changeset
   178
#endif // _CHAT_WIDGET_INCLUDED