2023-12-22 11:57:49 +00:00
|
|
|
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
|
|
|
// SPDX-License-Identifier: LGPL-3.0+
|
2022-06-18 10:20:24 +00:00
|
|
|
|
|
|
|
#include <QtWidgets/QMessageBox>
|
|
|
|
#include <algorithm>
|
|
|
|
|
|
|
|
#include "FolderSettingsWidget.h"
|
|
|
|
#include "SettingWidgetBinder.h"
|
2023-10-14 08:45:09 +00:00
|
|
|
#include "SettingsWindow.h"
|
2022-06-18 10:20:24 +00:00
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
FolderSettingsWidget::FolderSettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
2022-06-18 10:20:24 +00:00
|
|
|
: QWidget(parent)
|
|
|
|
{
|
|
|
|
SettingsInterface* sif = dialog->getSettingsInterface();
|
|
|
|
|
|
|
|
m_ui.setupUi(this);
|
|
|
|
|
2022-08-05 12:44:01 +00:00
|
|
|
SettingWidgetBinder::BindWidgetToFolderSetting(sif, m_ui.cache, m_ui.cacheBrowse, m_ui.cacheOpen, m_ui.cacheReset, "Folders", "Cache", Path::Combine(EmuFolders::DataRoot, "cache"));
|
2022-12-25 14:29:24 +00:00
|
|
|
SettingWidgetBinder::BindWidgetToFolderSetting(sif, m_ui.cheats, m_ui.cheatsBrowse, m_ui.cheatsOpen, m_ui.cheatsReset, "Folders", "Cheats", Path::Combine(EmuFolders::DataRoot, "cheats"));
|
2022-08-05 12:44:01 +00:00
|
|
|
SettingWidgetBinder::BindWidgetToFolderSetting(sif, m_ui.covers, m_ui.coversBrowse, m_ui.coversOpen, m_ui.coversReset, "Folders", "Covers", Path::Combine(EmuFolders::DataRoot, "covers"));
|
|
|
|
SettingWidgetBinder::BindWidgetToFolderSetting(sif, m_ui.snapshots, m_ui.snapshotsBrowse, m_ui.snapshotsOpen, m_ui.snapshotsReset, "Folders", "Snapshots", Path::Combine(EmuFolders::DataRoot, "snaps"));
|
|
|
|
SettingWidgetBinder::BindWidgetToFolderSetting(sif, m_ui.saveStates, m_ui.saveStatesBrowse, m_ui.saveStatesOpen, m_ui.saveStatesReset, "Folders", "SaveStates", Path::Combine(EmuFolders::DataRoot, "sstates"));
|
2022-06-18 10:20:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
FolderSettingsWidget::~FolderSettingsWidget() = default;
|