184 if(mi.data(RoomFilterRole).toString() == "1") |
184 if(mi.data(RoomFilterRole).toString() == "1") |
185 { |
185 { |
186 setData(mi, "0", RoomFilterRole); |
186 setData(mi, "0", RoomFilterRole); |
187 setData(mi, false, RoomAdmin); |
187 setData(mi, false, RoomAdmin); |
188 setData(mi, false, Ready); |
188 setData(mi, false, Ready); |
|
189 setData(mi, false, InGame); |
189 |
190 |
190 updateSortData(mi); |
191 updateSortData(mi); |
191 updateIcon(mi); |
192 updateIcon(mi); |
192 } |
193 } |
193 } |
194 } |
203 << index.data(ServerAdmin).toBool() |
204 << index.data(ServerAdmin).toBool() |
204 << index.data(RoomAdmin).toBool() |
205 << index.data(RoomAdmin).toBool() |
205 << index.data(Registered).toBool() |
206 << index.data(Registered).toBool() |
206 << index.data(Friend).toBool() |
207 << index.data(Friend).toBool() |
207 << index.data(Ignore).toBool() |
208 << index.data(Ignore).toBool() |
|
209 << index.data(InGame).toBool() |
208 << (index.data(RoomFilterRole).toString() == "1") |
210 << (index.data(RoomFilterRole).toString() == "1") |
209 ; |
211 ; |
210 |
212 |
211 for(int i = flags.size() - 1; i >= 0; --i) |
213 for(int i = flags.size() - 1; i >= 0; --i) |
212 if(flags[i]) |
214 if(flags[i]) |
222 result.fill(Qt::transparent); |
224 result.fill(Qt::transparent); |
223 |
225 |
224 QPainter painter(&result); |
226 QPainter painter(&result); |
225 |
227 |
226 if(index.data(RoomFilterRole).toString() == "1") |
228 if(index.data(RoomFilterRole).toString() == "1") |
227 if(index.data(Ready).toBool()) |
229 if(index.data(InGame).toBool()) |
228 painter.drawPixmap(0, 0, 16, 16, QPixmap(":/res/chat/lamp.png")); |
230 painter.drawPixmap(0, 0, 16, 16, QPixmap(":/res/chat/ingame.png")); |
229 else |
231 else |
230 painter.drawPixmap(0, 0, 16, 16, QPixmap(":/res/chat/lamp_off.png")); |
232 if(index.data(Ready).toBool()) |
|
233 painter.drawPixmap(0, 0, 16, 16, QPixmap(":/res/chat/lamp.png")); |
|
234 else |
|
235 painter.drawPixmap(0, 0, 16, 16, QPixmap(":/res/chat/lamp_off.png")); |
231 |
236 |
232 QString mainIconName(":/res/chat/"); |
237 QString mainIconName(":/res/chat/"); |
233 |
238 |
234 if(index.data(RoomAdmin).toBool()) |
239 if(index.data(RoomAdmin).toBool()) |
235 mainIconName += "roomadmin"; |
240 mainIconName += "roomadmin"; |