39 bool insertRow(int row, const QModelIndex &parent = QModelIndex()); |
39 bool insertRow(int row, const QModelIndex &parent = QModelIndex()); |
40 bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex()); |
40 bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex()); |
41 bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()); |
41 bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()); |
42 |
42 |
43 public slots: |
43 public slots: |
44 void addPlayer(const QString & nickname); |
44 void addPlayer(const QString & nickname, bool notify); |
45 void removePlayer(const QString & nickname); |
45 void removePlayer(const QString & nickname, const QString & msg = QString()); |
46 void playerJoinedRoom(const QString & nickname); |
46 void playerJoinedRoom(const QString & nickname, bool notify); |
47 void playerLeftRoom(const QString & nickname); |
47 void playerLeftRoom(const QString & nickname); |
48 void resetRoomFlags(); |
48 void resetRoomFlags(); |
49 void setNickname(const QString & nickname); |
49 void setNickname(const QString & nickname); |
|
50 |
|
51 signals: |
|
52 void nickAdded(const QString& nick, bool notifyNick); |
|
53 void nickRemoved(const QString& nick); |
|
54 void nickAddedLobby(const QString& nick, bool notifyNick); |
|
55 void nickRemovedLobby(const QString& nick); |
|
56 void nickRemovedLobby(const QString& nick, const QString& message); |
50 |
57 |
51 private: |
58 private: |
52 QHash<quint32, QIcon> & m_icons(); |
59 QHash<quint32, QIcon> & m_icons(); |
53 typedef QHash<int, QVariant> DataEntry; |
60 typedef QHash<int, QVariant> DataEntry; |
54 QList<DataEntry> m_data; |
61 QList<DataEntry> m_data; |