Clang script (#3085)

This commit is contained in:
Zach H 2018-02-06 08:45:13 -05:00 committed by GitHub
parent fcfb2b12b7
commit 35159ef61a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 2098 additions and 2054 deletions

View file

@ -1,30 +1,38 @@
#ifndef CHATVIEW_H
#define CHATVIEW_H
#include <QTextBrowser>
#include <QTextFragment>
#include <QTextCursor>
#include <QColor>
#include <QAction>
#include "../userlist.h"
#include "user_level.h"
#include "room_message_type.h"
#include "../tab_supervisor.h"
#include "../userlist.h"
#include "room_message_type.h"
#include "user_level.h"
#include "userlistProxy.h"
#include <QAction>
#include <QColor>
#include <QTextBrowser>
#include <QTextCursor>
#include <QTextFragment>
class QTextTable;
class QMouseEvent;
class UserContextMenu;
class TabGame;
class ChatView : public QTextBrowser {
class ChatView : public QTextBrowser
{
Q_OBJECT
protected:
const TabSupervisor * const tabSupervisor;
TabGame * const game;
const TabSupervisor *const tabSupervisor;
TabGame *const game;
private:
enum HoveredItemType { HoveredNothing, HoveredUrl, HoveredCard, HoveredUser };
const UserlistProxy * const userlistProxy;
enum HoveredItemType
{
HoveredNothing,
HoveredUrl,
HoveredCard,
HoveredUser
};
const UserlistProxy *const userlistProxy;
UserContextMenu *userContextMenu;
QString lastSender;
QString userName;
@ -54,13 +62,25 @@ private:
private slots:
void openLink(const QUrl &link);
void actMessageClicked();
public:
ChatView(const TabSupervisor *_tabSupervisor, const UserlistProxy *_userlistProxy, TabGame *_game, bool _showTimestamps, QWidget *parent = 0);
ChatView(const TabSupervisor *_tabSupervisor,
const UserlistProxy *_userlistProxy,
TabGame *_game,
bool _showTimestamps,
QWidget *parent = 0);
void retranslateUi();
void appendHtml(const QString &html);
void appendHtmlServerMessage(const QString &html, bool optionalIsBold = false, QString optionalFontColor = QString());
void appendMessage(QString message, RoomMessageTypeFlags messageType = 0, QString sender = QString(), UserLevelFlags userLevel = UserLevelFlags(), QString UserPrivLevel = "NONE", bool playerBold = false);
void
appendHtmlServerMessage(const QString &html, bool optionalIsBold = false, QString optionalFontColor = QString());
void appendMessage(QString message,
RoomMessageTypeFlags messageType = 0,
QString sender = QString(),
UserLevelFlags userLevel = UserLevelFlags(),
QString UserPrivLevel = "NONE",
bool playerBold = false);
void clearChat();
protected:
void enterEvent(QEvent *event);
void leaveEvent(QEvent *event);