mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 16:24:45 -07:00
* add new param to closeRequest * don't emit signals in dtors * send closeRequest * fix build failure * fix build failure * see if we can get away with the overloaded triggered * fix build failure
58 lines
1.4 KiB
C++
58 lines
1.4 KiB
C++
#ifndef TAB_MESSAGE_H
|
|
#define TAB_MESSAGE_H
|
|
|
|
#include "tab.h"
|
|
|
|
class AbstractClient;
|
|
class ChatView;
|
|
class LineEditUnfocusable;
|
|
class Event_UserMessage;
|
|
class Response;
|
|
class ServerInfo_User;
|
|
|
|
class TabMessage : public Tab
|
|
{
|
|
Q_OBJECT
|
|
private:
|
|
AbstractClient *client;
|
|
QMenu *messageMenu;
|
|
ServerInfo_User *ownUserInfo;
|
|
ServerInfo_User *otherUserInfo;
|
|
bool userOnline;
|
|
|
|
ChatView *chatView;
|
|
LineEditUnfocusable *sayEdit;
|
|
|
|
QAction *aLeave;
|
|
signals:
|
|
void talkClosing(TabMessage *tab);
|
|
void maximizeClient();
|
|
private slots:
|
|
void sendMessage();
|
|
void messageSent(const Response &response);
|
|
void addMentionTag(QString mentionTag);
|
|
void messageClicked();
|
|
|
|
public:
|
|
TabMessage(TabSupervisor *_tabSupervisor,
|
|
AbstractClient *_client,
|
|
const ServerInfo_User &_ownUserInfo,
|
|
const ServerInfo_User &_otherUserInfo);
|
|
~TabMessage() override;
|
|
void retranslateUi() override;
|
|
void closeRequest(bool forced = false) override;
|
|
void tabActivated() override;
|
|
QString getUserName() const;
|
|
QString getTabText() const override;
|
|
|
|
void processUserMessageEvent(const Event_UserMessage &event);
|
|
|
|
void processUserLeft();
|
|
void processUserJoined(const ServerInfo_User &_userInfo);
|
|
|
|
private:
|
|
bool shouldShowSystemPopup(const Event_UserMessage &event);
|
|
void showSystemPopup(const Event_UserMessage &event);
|
|
};
|
|
|
|
#endif
|