41 void removePlayer(const QString & nickname); |
42 void removePlayer(const QString & nickname); |
42 void playerJoinedRoom(const QString & nickname); |
43 void playerJoinedRoom(const QString & nickname); |
43 void playerLeftRoom(const QString & nickname); |
44 void playerLeftRoom(const QString & nickname); |
44 void setFlag(const QString & nickname, StateFlag flagType, bool isSet); |
45 void setFlag(const QString & nickname, StateFlag flagType, bool isSet); |
45 void resetRoomFlags(); |
46 void resetRoomFlags(); |
|
47 void setNickname(const QString & nickname); |
46 |
48 |
47 private: |
49 private: |
48 QHash<quint32, QIcon> & m_icons(); |
50 QHash<quint32, QIcon> & m_icons(); |
49 typedef QHash<int, QVariant> DataEntry; |
51 typedef QHash<int, QVariant> DataEntry; |
50 QList<DataEntry> m_data; |
52 QList<DataEntry> m_data; |
|
53 QSet<QString> m_friendsSet, m_ignoredSet; |
|
54 QString m_nickname; |
|
55 |
51 void updateIcon(const QModelIndex & index); |
56 void updateIcon(const QModelIndex & index); |
52 void updateSortData(const QModelIndex & index); |
57 void updateSortData(const QModelIndex & index); |
|
58 void loadSet(QSet<QString> & set, const QString & suffix); |
|
59 void saveSet(const QSet<QString> & set, const QString & suffix); |
|
60 void checkFriendIgnore(const QModelIndex & mi); |
53 }; |
61 }; |
54 |
62 |
55 #endif // PLAYERSLISTMODEL_H |
63 #endif // PLAYERSLISTMODEL_H |