mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-15 03:28:49 -07:00
user details box
This commit is contained in:
parent
09595cc691
commit
7f7398de6a
12 changed files with 207 additions and 85 deletions
|
|
@ -3,9 +3,17 @@
|
|||
|
||||
#include <QGroupBox>
|
||||
#include <QTreeWidgetItem>
|
||||
#include <QItemDelegate>
|
||||
|
||||
class QTreeWidget;
|
||||
class ServerInfo_User;
|
||||
class AbstractClient;
|
||||
|
||||
class UserListItemDelegate : public QItemDelegate {
|
||||
public:
|
||||
UserListItemDelegate(QObject *const parent);
|
||||
bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index);
|
||||
};
|
||||
|
||||
class UserListTWI : public QTreeWidgetItem {
|
||||
public:
|
||||
|
|
@ -16,7 +24,9 @@ public:
|
|||
class UserList : public QGroupBox {
|
||||
Q_OBJECT
|
||||
private:
|
||||
AbstractClient *client;
|
||||
QTreeWidget *userTree;
|
||||
UserListItemDelegate *itemDelegate;
|
||||
bool global;
|
||||
QString titleStr;
|
||||
void updateCount();
|
||||
|
|
@ -25,10 +35,11 @@ private slots:
|
|||
signals:
|
||||
void openMessageDialog(const QString &userName, bool focus);
|
||||
public:
|
||||
UserList(bool _global, QWidget *parent = 0);
|
||||
UserList(AbstractClient *_client, bool _global, QWidget *parent = 0);
|
||||
void retranslateUi();
|
||||
void processUserInfo(ServerInfo_User *user);
|
||||
bool deleteUser(const QString &userName);
|
||||
void showContextMenu(const QPoint &pos, const QModelIndex &index);
|
||||
void sortItems();
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue