Qt/GameList: Implement GetModel()

This commit is contained in:
spycrab 2017-07-20 18:38:09 +02:00
parent 655778f7f1
commit e9138f7512
2 changed files with 7 additions and 1 deletions

View File

@ -402,7 +402,12 @@ QString GameList::GetSelectedGame() const
return QStringLiteral("");
}
void GameList::SetPreferredView(bool list)
GameListModel* GameList::GetModel() const
{
return m_model;
}
void GameList::SetPreferredView(bool table)
{
m_prefer_list = list;
Settings::Instance().SetPreferredView(list);

View File

@ -20,6 +20,7 @@ class GameList final : public QStackedWidget
public:
explicit GameList(QWidget* parent = nullptr);
QString GetSelectedGame() const;
GameListModel* GetModel() const;
void SetListView() { SetPreferredView(true); }
void SetGridView() { SetPreferredView(false); }