blob: 092b7c4195dfd4cf17a86978657c1187b9cc3e1e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
// Copyright 2022 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <optional>
#include <string>
#include <QWidget>
#include "Common/CommonTypes.h"
#include "VideoCommon/GraphicsModSystem/Config/GraphicsModGroup.h"
class GraphicsModWarningWidget;
class QHBoxLayout;
class QLabel;
class QListWidget;
class QListWidgetItem;
class QModelIndex;
class QPushButton;
class QVBoxLayout;
namespace Core
{
enum class State;
}
namespace UICommon
{
class GameFile;
}
class GraphicsModListWidget : public QWidget
{
Q_OBJECT
public:
explicit GraphicsModListWidget(const UICommon::GameFile& game);
~GraphicsModListWidget() override;
void SaveToDisk();
const GraphicsModGroupConfig& GetGraphicsModConfig() const;
signals:
void OpenGraphicsSettings();
private:
void CreateWidgets();
void ConnectWidgets();
void RefreshModList();
void ModSelectionChanged();
void ModItemChanged(QListWidgetItem* item);
void OnModChanged(const std::optional<std::string>& absolute_path);
void SaveModList();
void OpenGraphicsModDir();
void CalculateGameRunning(Core::State state);
bool m_loaded_game_is_running = false;
bool m_needs_save = false;
QListWidget* m_mod_list;
QLabel* m_selected_mod_name;
QVBoxLayout* m_mod_meta_layout;
QPushButton* m_open_directory_button;
QPushButton* m_refresh;
GraphicsModWarningWidget* m_warning;
std::string m_game_id;
GraphicsModGroupConfig m_mod_group;
};
|