From e9138f7512fb875ced7b17499a7d11cb362d2268 Mon Sep 17 00:00:00 2001 From: spycrab Date: Thu, 20 Jul 2017 18:38:09 +0200 Subject: [PATCH] Qt/GameList: Implement GetModel() --- Source/Core/DolphinQt2/GameList/GameList.cpp | 7 ++++++- Source/Core/DolphinQt2/GameList/GameList.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/Core/DolphinQt2/GameList/GameList.cpp b/Source/Core/DolphinQt2/GameList/GameList.cpp index b20629945f..4cd1794dff 100644 --- a/Source/Core/DolphinQt2/GameList/GameList.cpp +++ b/Source/Core/DolphinQt2/GameList/GameList.cpp @@ -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); diff --git a/Source/Core/DolphinQt2/GameList/GameList.h b/Source/Core/DolphinQt2/GameList/GameList.h index 8a02eecd9c..6fa65c89de 100644 --- a/Source/Core/DolphinQt2/GameList/GameList.h +++ b/Source/Core/DolphinQt2/GameList/GameList.h @@ -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); }