equal
deleted
inserted
replaced
16 ServerAdmin = Qt::UserRole + 1, |
16 ServerAdmin = Qt::UserRole + 1, |
17 RoomAdmin = Qt::UserRole + 2, |
17 RoomAdmin = Qt::UserRole + 2, |
18 Registered = Qt::UserRole + 3, |
18 Registered = Qt::UserRole + 3, |
19 Friend = Qt::UserRole + 4, |
19 Friend = Qt::UserRole + 4, |
20 Ignore = Qt::UserRole + 5 |
20 Ignore = Qt::UserRole + 5 |
|
21 }; |
|
22 |
|
23 enum SpecialRoles { |
|
24 SortRole = Qt::UserRole + 100 |
21 }; |
25 }; |
22 |
26 |
23 explicit PlayersListModel(QObject *parent = 0); |
27 explicit PlayersListModel(QObject *parent = 0); |
24 |
28 |
25 int rowCount(const QModelIndex &parent = QModelIndex()) const; |
29 int rowCount(const QModelIndex &parent = QModelIndex()) const; |
39 private: |
43 private: |
40 QHash<quint32, QIcon> & m_icons(); |
44 QHash<quint32, QIcon> & m_icons(); |
41 typedef QHash<int, QVariant> DataEntry; |
45 typedef QHash<int, QVariant> DataEntry; |
42 QList<DataEntry> m_data; |
46 QList<DataEntry> m_data; |
43 void updateIcon(const QModelIndex & index); |
47 void updateIcon(const QModelIndex & index); |
|
48 void updateSortData(const QModelIndex & index); |
44 }; |
49 }; |
45 |
50 |
46 #endif // PLAYERSLISTMODEL_H |
51 #endif // PLAYERSLISTMODEL_H |