duckstation

duckstation, but archived from the revision just before upstream changed it to a proprietary software project, this version is the libre one
git clone https://git.neptards.moe/u3shit/duckstation.git
Log | Files | Refs | README | LICENSE

gamelistsettingswidget.h (1338B)


      1 // SPDX-FileCopyrightText: 2019-2024 Connor McLaughlin <stenzek@gmail.com>
      2 // SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
      3 
      4 #pragma once
      5 #include <QtWidgets/QWidget>
      6 #include <string>
      7 
      8 #include "ui_gamelistsettingswidget.h"
      9 
     10 class SettingsWindow;
     11 
     12 class GameListSettingsWidget : public QWidget
     13 {
     14   Q_OBJECT
     15 
     16 public:
     17   GameListSettingsWidget(SettingsWindow* dialog, QWidget* parent);
     18   ~GameListSettingsWidget();
     19 
     20   bool addExcludedPath(const std::string& path);
     21   void refreshExclusionList();
     22 
     23 public Q_SLOTS:
     24   void addSearchDirectory(QWidget* parent_widget);
     25 
     26 private Q_SLOTS:
     27   void onDirectoryListContextMenuRequested(const QPoint& point);
     28   void onAddSearchDirectoryButtonClicked();
     29   void onRemoveSearchDirectoryButtonClicked();
     30   void onSearchDirectoriesSelectionChanged();
     31   void onAddExcludedFileButtonClicked();
     32   void onAddExcludedFolderButtonClicked();
     33   void onRemoveExcludedPathButtonClicked();
     34   void onExcludedPathsSelectionChanged();
     35   void onScanForNewGamesClicked();
     36   void onRescanAllGamesClicked();
     37 
     38 protected:
     39   bool event(QEvent* event) override;
     40 
     41 private:
     42   void addPathToTable(const std::string& path, bool recursive);
     43   void refreshDirectoryList();
     44   void addSearchDirectory(const QString& path, bool recursive);
     45   void removeSearchDirectory(const QString& path);
     46 
     47   Ui::GameListSettingsWidget m_ui;
     48 };