diff options
| author | 2015-09-06 23:51:57 -0700 | |
|---|---|---|
| committer | 2015-10-01 19:39:15 -0700 | |
| commit | 0fae76c741b84cfe6d31a9079b818866778dfa31 (patch) | |
| tree | 2a6002949976468f137ccb92913f4d0377218c58 /src/citra_qt/game_list.cpp | |
| parent | Add menu item for selecting the game list folder (diff) | |
| download | yuzu-0fae76c741b84cfe6d31a9079b818866778dfa31.tar.gz yuzu-0fae76c741b84cfe6d31a9079b818866778dfa31.tar.xz yuzu-0fae76c741b84cfe6d31a9079b818866778dfa31.zip | |
Game list: save and load column sizes, sort order, to QSettings
Diffstat (limited to 'src/citra_qt/game_list.cpp')
| -rw-r--r-- | src/citra_qt/game_list.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/citra_qt/game_list.cpp b/src/citra_qt/game_list.cpp index f90e05374..dade3c212 100644 --- a/src/citra_qt/game_list.cpp +++ b/src/citra_qt/game_list.cpp | |||
| @@ -100,6 +100,23 @@ void GameList::PopulateAsync(const QString& dir_path, bool deep_scan) | |||
| 100 | current_worker = std::move(worker); | 100 | current_worker = std::move(worker); |
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | void GameList::SaveInterfaceLayout(QSettings& settings) | ||
| 104 | { | ||
| 105 | settings.beginGroup("UILayout"); | ||
| 106 | settings.setValue("gameListHeaderState", tree_view->header()->saveState()); | ||
| 107 | settings.endGroup(); | ||
| 108 | } | ||
| 109 | |||
| 110 | void GameList::LoadInterfaceLayout(QSettings& settings) | ||
| 111 | { | ||
| 112 | auto header = tree_view->header(); | ||
| 113 | settings.beginGroup("UILayout"); | ||
| 114 | header->restoreState(settings.value("gameListHeaderState").toByteArray()); | ||
| 115 | settings.endGroup(); | ||
| 116 | |||
| 117 | item_model->sort(header->sortIndicatorSection(), header->sortIndicatorOrder()); | ||
| 118 | } | ||
| 119 | |||
| 103 | void GameListWorker::AddFstEntriesToGameList(const std::string& dir_path, bool deep_scan) | 120 | void GameListWorker::AddFstEntriesToGameList(const std::string& dir_path, bool deep_scan) |
| 104 | { | 121 | { |
| 105 | const auto callback = [&](const std::string& directory, | 122 | const auto callback = [&](const std::string& directory, |