2023-12-22 11:57:49 +00:00
|
|
|
// SPDX-FileCopyrightText: 2002-2023 PCSX2 Dev Team
|
|
|
|
// SPDX-License-Identifier: LGPL-3.0+
|
2021-12-13 12:12:54 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#include <QtWidgets/QWidget>
|
|
|
|
|
|
|
|
#include "ui_GameListSettingsWidget.h"
|
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
class SettingsWindow;
|
2021-12-13 12:12:54 +00:00
|
|
|
|
|
|
|
class GameListSettingsWidget : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2023-10-14 08:45:09 +00:00
|
|
|
GameListSettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
2021-12-13 12:12:54 +00:00
|
|
|
~GameListSettingsWidget();
|
|
|
|
|
|
|
|
bool addExcludedPath(const std::string& path);
|
|
|
|
void refreshExclusionList();
|
|
|
|
|
2023-09-09 22:36:10 +00:00
|
|
|
Q_SIGNALS:
|
|
|
|
void preferEnglishGameListChanged();
|
|
|
|
|
2021-12-13 12:12:54 +00:00
|
|
|
public Q_SLOTS:
|
|
|
|
void addSearchDirectory(QWidget* parent_widget);
|
|
|
|
|
|
|
|
private Q_SLOTS:
|
|
|
|
void onDirectoryListContextMenuRequested(const QPoint& point);
|
2024-05-06 15:50:24 +00:00
|
|
|
void onDirectoryListSelectionChanged();
|
2021-12-13 12:12:54 +00:00
|
|
|
void onAddSearchDirectoryButtonClicked();
|
|
|
|
void onRemoveSearchDirectoryButtonClicked();
|
2023-08-06 09:50:57 +00:00
|
|
|
void onAddExcludedFileButtonClicked();
|
2021-12-13 12:12:54 +00:00
|
|
|
void onAddExcludedPathButtonClicked();
|
|
|
|
void onRemoveExcludedPathButtonClicked();
|
2024-05-06 15:50:24 +00:00
|
|
|
void onExcludedPathsSelectionChanged();
|
2021-12-13 12:12:54 +00:00
|
|
|
void onScanForNewGamesClicked();
|
|
|
|
void onRescanAllGamesClicked();
|
|
|
|
|
|
|
|
protected:
|
2023-09-16 20:44:35 +00:00
|
|
|
bool event(QEvent* event);
|
2021-12-13 12:12:54 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
void addPathToTable(const std::string& path, bool recursive);
|
|
|
|
void refreshDirectoryList();
|
|
|
|
void addSearchDirectory(const QString& path, bool recursive);
|
|
|
|
void removeSearchDirectory(const QString& path);
|
|
|
|
|
|
|
|
Ui::GameListSettingsWidget m_ui;
|
|
|
|
};
|