user details box

This commit is contained in:
Max-Wilhelm Bruker 2011-01-10 20:37:34 +01:00
parent 09595cc691
commit 7f7398de6a
12 changed files with 207 additions and 85 deletions

View file

@ -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();
};