GH-2374 fix missing alternating backgrounds in worlds, add gametype column

This commit is contained in:
Petr Mrázek
2018-12-11 23:53:14 +01:00
parent de568b32b8
commit 13b293dd65
5 changed files with 76 additions and 1 deletions

View File

@ -138,7 +138,7 @@ bool WorldList::deleteWorlds(int first, int last)
int WorldList::columnCount(const QModelIndex &parent) const
{
return 2;
return 3;
}
QVariant WorldList::data(const QModelIndex &index, int role) const
@ -161,6 +161,9 @@ QVariant WorldList::data(const QModelIndex &index, int role) const
case NameColumn:
return world.name();
case GameModeColumn:
return gameTypeToString(world.gameType());
case LastPlayedColumn:
return world.lastPlayed();
@ -206,6 +209,8 @@ QVariant WorldList::headerData(int section, Qt::Orientation orientation, int rol
{
case NameColumn:
return tr("Name");
case GameModeColumn:
return tr("Game Mode");
case LastPlayedColumn:
return tr("Last Played");
default:
@ -217,6 +222,8 @@ QVariant WorldList::headerData(int section, Qt::Orientation orientation, int rol
{
case NameColumn:
return tr("The name of the world.");
case GameModeColumn:
return tr("Game mode of the world.");
case LastPlayedColumn:
return tr("Date and time the world was last played.");
default: