Use a proxy model for the GameList.

This lets us sort by the underlying integers while only displaying the
icons. Currently, in both DolphinQt and DolphinQt2, we display both the
icon and the integer, but cut off the column width to not show the
integer. We also currently sort by the size's formatted string, not by
the size itself, which leads to "1 MB" sorting to less than "2 KB". This
commit fixes these issues.

In the future, we can use the filter methods here to allow for
searching for games.
This commit is contained in:
spxtr
2015-11-28 10:00:03 -08:00
parent 5a1729877e
commit 59bdeb411c
7 changed files with 153 additions and 89 deletions

View File

@ -71,6 +71,7 @@ void MainWindow::AddTableColumnsMenu(QMenu* view_menu)
QStringList col_names{
tr("Platform"),
tr("ID"),
tr("Banner"),
tr("Title"),
tr("Description"),
tr("Maker"),
@ -78,12 +79,13 @@ void MainWindow::AddTableColumnsMenu(QMenu* view_menu)
tr("Country"),
tr("Quality")
};
// TODO we'll need to update SConfig with another column. Then we can clean this
// up significantly.
// TODO we'll need to update SConfig with the extra columns. Then we can
// clean this up significantly.
QList<bool> show_cols{
SConfig::GetInstance().m_showSystemColumn,
SConfig::GetInstance().m_showIDColumn,
SConfig::GetInstance().m_showBannerColumn,
true,
false,
SConfig::GetInstance().m_showMakerColumn,
SConfig::GetInstance().m_showSizeColumn,