mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-28 01: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
|
|
@ -5,6 +5,7 @@
|
|||
#include <QGroupBox>
|
||||
#include <QTreeWidgetItem>
|
||||
#include <QStyledItemDelegate>
|
||||
#include "user_level.h"
|
||||
|
||||
class QTreeWidget;
|
||||
class ServerInfo_User;
|
||||
|
|
@ -47,10 +48,13 @@ public:
|
|||
};
|
||||
|
||||
class UserListTWI : public QTreeWidgetItem {
|
||||
private:
|
||||
ServerInfo_User userInfo;
|
||||
public:
|
||||
UserListTWI();
|
||||
QString getUserName() const;
|
||||
int getUserLevel() const;
|
||||
UserListTWI(const ServerInfo_User &_userInfo);
|
||||
const ServerInfo_User &getUserInfo() const { return userInfo; }
|
||||
void setUserInfo(const ServerInfo_User &_userInfo);
|
||||
void setOnline(bool online);
|
||||
bool operator<(const QTreeWidgetItem &other) const;
|
||||
};
|
||||
|
||||
|
|
@ -69,7 +73,6 @@ private:
|
|||
int onlineCount;
|
||||
QString titleStr;
|
||||
void updateCount();
|
||||
void setUserOnline(QTreeWidgetItem *user, bool online);
|
||||
private slots:
|
||||
void userClicked(QTreeWidgetItem *item, int column);
|
||||
signals:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue