mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-15 03:28:49 -07:00
context menu for a message sender's name in chat; also display the user level icon next to the name; minor consistency and type-safety changes
This commit is contained in:
parent
f9e0b6fe9e
commit
95cd293b9c
30 changed files with 283 additions and 195 deletions
|
|
@ -8,12 +8,14 @@ class ChatView;
|
|||
class QLineEdit;
|
||||
class Event_UserMessage;
|
||||
class Response;
|
||||
class ServerInfo_User;
|
||||
|
||||
class TabMessage : public Tab {
|
||||
Q_OBJECT
|
||||
private:
|
||||
AbstractClient *client;
|
||||
QString userName;
|
||||
ServerInfo_User *ownUserInfo;
|
||||
ServerInfo_User *otherUserInfo;
|
||||
bool userOnline;
|
||||
|
||||
ChatView *chatView;
|
||||
|
|
@ -27,16 +29,16 @@ private slots:
|
|||
void actLeave();
|
||||
void messageSent(const Response &response);
|
||||
public:
|
||||
TabMessage(TabSupervisor *_tabSupervisor, AbstractClient *_client, const QString &_ownName, const QString &_userName);
|
||||
TabMessage(TabSupervisor *_tabSupervisor, AbstractClient *_client, const ServerInfo_User &_ownUserInfo, const ServerInfo_User &_otherUserInfo);
|
||||
~TabMessage();
|
||||
void retranslateUi();
|
||||
void closeRequest();
|
||||
QString getUserName() const { return userName; }
|
||||
QString getTabText() const { return tr("Talking to %1").arg(userName); }
|
||||
QString getUserName() const;
|
||||
QString getTabText() const;
|
||||
|
||||
void processUserMessageEvent(const Event_UserMessage &event);
|
||||
void processUserLeft();
|
||||
void processUserJoined();
|
||||
void processUserJoined(const ServerInfo_User &_userInfo);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue