ticket #6 implemented (new filter for ranking games in the lobby). Testing needed

This commit is contained in:
doitux
2011-03-04 21:03:42 +00:00
parent 5144690bee
commit 9b8e250876
2 changed files with 13 additions and 1 deletions
+5
View File
@@ -87,6 +87,11 @@
<string>4 - Show open &amp; non-full &amp; private games</string> <string>4 - Show open &amp; non-full &amp; private games</string>
</property> </property>
</item> </item>
<item>
<property name="text">
<string>5 - Show open &amp; non-full &amp; ranking games</string>
</property>
</item>
</widget> </widget>
</item> </item>
<item row="0" column="2" rowspan="5"> <item row="0" column="2" rowspan="5">
@@ -89,7 +89,7 @@ gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c)
myGameListSelectionModel = treeView_GameList->selectionModel(); myGameListSelectionModel = treeView_GameList->selectionModel();
QStringList headerList; QStringList headerList;
headerList << tr("Game") << tr("Players") << tr("State") << tr("R") << tr("P"); headerList << tr("Game") << tr("Players") << tr("State") << tr("T") << tr("P");
myGameListModel->setHorizontalHeaderLabels(headerList); myGameListModel->setHorizontalHeaderLabels(headerList);
treeView_GameList->setColumnWidth(0,190); treeView_GameList->setColumnWidth(0,190);
@@ -1405,6 +1405,13 @@ void gameLobbyDialogImpl::changeGameListFilter(int index)
myGameListSortFilterProxyModel->setColumn4RegExp(QRegExp("private", Qt::CaseInsensitive, QRegExp::FixedString)); myGameListSortFilterProxyModel->setColumn4RegExp(QRegExp("private", Qt::CaseInsensitive, QRegExp::FixedString));
} }
break; break;
case 5: {
myGameListSortFilterProxyModel->setColumn1RegExp(QRegExp("nonfull", Qt::CaseInsensitive, QRegExp::FixedString));
myGameListSortFilterProxyModel->setColumn2RegExp(QRegExp("open", Qt::CaseInsensitive, QRegExp::FixedString));
myGameListSortFilterProxyModel->setColumn3RegExp(QRegExp("ranking", Qt::CaseInsensitive, QRegExp::FixedString));
myGameListSortFilterProxyModel->setColumn4RegExp(QRegExp());
}
break;
default: default:
; ;
} }