mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-23 15:35:46 +00:00
Game list: save and load column sizes, sort order, to QSettings
This commit is contained in:
parent
7b1025c819
commit
dfaed461ff
3 changed files with 24 additions and 0 deletions
|
@ -100,6 +100,23 @@ void GameList::PopulateAsync(const QString& dir_path, bool deep_scan)
|
|||
current_worker = std::move(worker);
|
||||
}
|
||||
|
||||
void GameList::SaveInterfaceLayout(QSettings& settings)
|
||||
{
|
||||
settings.beginGroup("UILayout");
|
||||
settings.setValue("gameListHeaderState", tree_view->header()->saveState());
|
||||
settings.endGroup();
|
||||
}
|
||||
|
||||
void GameList::LoadInterfaceLayout(QSettings& settings)
|
||||
{
|
||||
auto header = tree_view->header();
|
||||
settings.beginGroup("UILayout");
|
||||
header->restoreState(settings.value("gameListHeaderState").toByteArray());
|
||||
settings.endGroup();
|
||||
|
||||
item_model->sort(header->sortIndicatorSection(), header->sortIndicatorOrder());
|
||||
}
|
||||
|
||||
void GameListWorker::AddFstEntriesToGameList(const std::string& dir_path, bool deep_scan)
|
||||
{
|
||||
const auto callback = [&](const std::string& directory,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue