2022-07-11 13:03:29 +00:00
|
|
|
#include <QtWidgets/QMessageBox>
|
|
|
|
#include <algorithm>
|
|
|
|
|
|
|
|
#include "foldersettingswidget.h"
|
|
|
|
#include "settingsdialog.h"
|
|
|
|
#include "settingwidgetbinder.h"
|
|
|
|
|
|
|
|
FolderSettingsWidget::FolderSettingsWidget(SettingsDialog* dialog, QWidget* parent) : QWidget(parent)
|
|
|
|
{
|
|
|
|
SettingsInterface* sif = dialog->getSettingsInterface();
|
|
|
|
|
|
|
|
m_ui.setupUi(this);
|
|
|
|
|
|
|
|
SettingWidgetBinder::BindWidgetToFolderSetting(sif, m_ui.cache, m_ui.cacheBrowse, m_ui.cacheOpen, m_ui.cacheReset,
|
2022-07-22 15:28:19 +00:00
|
|
|
"Folders", "Cache", Path::Combine(EmuFolders::DataRoot, "cache"));
|
2022-07-11 13:03:29 +00:00
|
|
|
SettingWidgetBinder::BindWidgetToFolderSetting(sif, m_ui.covers, m_ui.coversBrowse, m_ui.coversOpen, m_ui.coversReset,
|
2022-07-22 15:28:19 +00:00
|
|
|
"Folders", "Covers", Path::Combine(EmuFolders::DataRoot, "covers"));
|
2022-07-11 13:03:29 +00:00
|
|
|
SettingWidgetBinder::BindWidgetToFolderSetting(sif, m_ui.screenshots, m_ui.screenshotsBrowse, m_ui.screenshotsOpen,
|
2022-07-22 15:28:19 +00:00
|
|
|
m_ui.screenshotsReset, "Folders", "Screenshots",
|
|
|
|
Path::Combine(EmuFolders::DataRoot, "screenshots"));
|
2022-07-11 13:03:29 +00:00
|
|
|
SettingWidgetBinder::BindWidgetToFolderSetting(sif, m_ui.saveStates, m_ui.saveStatesBrowse, m_ui.saveStatesOpen,
|
2022-07-22 15:28:19 +00:00
|
|
|
m_ui.saveStatesReset, "Folders", "SaveStates",
|
|
|
|
Path::Combine(EmuFolders::DataRoot, "savestates"));
|
2022-07-11 13:03:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
FolderSettingsWidget::~FolderSettingsWidget() = default;
|