mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-19 13:23:55 -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
|
|
@ -2,7 +2,7 @@
|
|||
#define USER_CONTEXT_MENU_H
|
||||
|
||||
#include <QObject>
|
||||
#include "pb/serverinfo_user.pb.h"
|
||||
#include "user_level.h"
|
||||
|
||||
class QAction;
|
||||
class TabSupervisor;
|
||||
|
|
@ -16,7 +16,7 @@ class UserContextMenu : public QObject {
|
|||
Q_OBJECT
|
||||
private:
|
||||
AbstractClient *client;
|
||||
TabSupervisor *tabSupervisor;
|
||||
const TabSupervisor *tabSupervisor;
|
||||
TabGame *game;
|
||||
|
||||
QAction *aUserName;
|
||||
|
|
@ -34,8 +34,8 @@ private slots:
|
|||
void banUser_dialogFinished();
|
||||
void gamesOfUserReceived(const Response &resp, const CommandContainer &commandContainer);
|
||||
public:
|
||||
UserContextMenu(TabSupervisor *_tabSupervisor, QWidget *_parent, TabGame *_game = 0);
|
||||
void showContextMenu(const QPoint &pos, const QString &userName, ServerInfo_User::UserLevelFlags userLevel, int playerId = -1);
|
||||
UserContextMenu(const TabSupervisor *_tabSupervisor, QWidget *_parent, TabGame *_game = 0);
|
||||
void showContextMenu(const QPoint &pos, const QString &userName, UserLevelFlags userLevel, int playerId = -1);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue