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:
Max-Wilhelm Bruker 2012-04-08 23:48:02 +02:00
parent f9e0b6fe9e
commit 95cd293b9c
30 changed files with 283 additions and 195 deletions

View file

@ -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