30 |
30 |
31 int rowCount(const QModelIndex &parent = QModelIndex()) const; |
31 int rowCount(const QModelIndex &parent = QModelIndex()) const; |
32 |
32 |
33 QVariant data(const QModelIndex &index, int role) const; |
33 QVariant data(const QModelIndex &index, int role) const; |
34 bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::DisplayRole); |
34 bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::DisplayRole); |
|
35 void setFlag(const QString & nickname, StateFlag flagType, bool isSet); |
|
36 bool isFlagSet(const QString & nickname, StateFlag flagType); |
35 |
37 |
36 bool insertRow(int row, const QModelIndex &parent = QModelIndex()); |
38 bool insertRow(int row, const QModelIndex &parent = QModelIndex()); |
37 bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex()); |
39 bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex()); |
38 bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()); |
40 bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()); |
39 |
41 |
40 public slots: |
42 public slots: |
41 void addPlayer(const QString & nickname); |
43 void addPlayer(const QString & nickname); |
42 void removePlayer(const QString & nickname); |
44 void removePlayer(const QString & nickname); |
43 void playerJoinedRoom(const QString & nickname); |
45 void playerJoinedRoom(const QString & nickname); |
44 void playerLeftRoom(const QString & nickname); |
46 void playerLeftRoom(const QString & nickname); |
45 void setFlag(const QString & nickname, StateFlag flagType, bool isSet); |
|
46 void resetRoomFlags(); |
47 void resetRoomFlags(); |
47 void setNickname(const QString & nickname); |
48 void setNickname(const QString & nickname); |
48 |
49 |
49 private: |
50 private: |
50 QHash<quint32, QIcon> & m_icons(); |
51 QHash<quint32, QIcon> & m_icons(); |