Duckstation/src/duckstation-qt/foldersettingswidget.cpp
Connor McLaughlin 8c7a192128 Misc: Add copyright/license statement to applicable files
Should've did this in the beginning.
2022-12-04 21:03:49 +10:00

30 lines
1.6 KiB
C++

// SPDX-FileCopyrightText: 2019-2022 Connor McLaughlin <stenzek@gmail.com>
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
#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,
"Folders", "Cache", Path::Combine(EmuFolders::DataRoot, "cache"));
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.screenshots, m_ui.screenshotsBrowse, m_ui.screenshotsOpen,
m_ui.screenshotsReset, "Folders", "Screenshots",
Path::Combine(EmuFolders::DataRoot, "screenshots"));
SettingWidgetBinder::BindWidgetToFolderSetting(sif, m_ui.saveStates, m_ui.saveStatesBrowse, m_ui.saveStatesOpen,
m_ui.saveStatesReset, "Folders", "SaveStates",
Path::Combine(EmuFolders::DataRoot, "savestates"));
}
FolderSettingsWidget::~FolderSettingsWidget() = default;