sortable game-list in lobby

This commit is contained in:
doitux
2007-11-03 19:36:43 +00:00
parent 567ab9e33f
commit 0e5619bec3
2 changed files with 9 additions and 1 deletions
+3
View File
@@ -66,6 +66,9 @@
<property name="horizontalScrollBarPolicy" >
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="sortingEnabled" >
<bool>true</bool>
</property>
<column>
<property name="text" >
<string>Game</string>
@@ -240,8 +240,13 @@ void gameLobbyDialogImpl::updateGameItem(QTreeWidgetItem *item, unsigned gameId)
else
item->setData(2, Qt::DisplayRole, tr("open"));
if (info.isPasswordProtected)
if (info.isPasswordProtected) {
item->setIcon(3, QIcon(myAppDataPath+"gfx/gui/misc/lock.png"));
item->setData(3, Qt::UserRole, 1);
}
else {
item->setData(3, Qt::UserRole, 0);
}
refreshGameStats();
}