Debian Codegraph @

Source/Core/DolphinQt/Config/SettingsWindow.h

raw symbols SCIP
1 // Copyright 2015 Dolphin Emulator Project
2 // SPDX-License-Identifier: GPL-2.0-or-later
3
4 #pragma once
5
6 #include <QDialog>
7
8 class QStackedWidget;
9 class QListWidget;
10 class MainWindow;
11 class QEvent;
12
13 // A settings window with a QListWidget to switch between panes of a QStackedWidget.
14 class StackedSettingsWindow : public QDialog
15 {
16 Q_OBJECT
17 public:
18 explicit StackedSettingsWindow(QWidget* parent = nullptr);
19
20 void ActivatePane(int index);
21
22 protected:
23 void AddPane(QWidget*, const QString& name);
24
25 // Adds a scrollable Pane.
26 void AddWrappedPane(QWidget*, const QString& name);
27
28 // For derived classes to call after they create their settings panes.
29 void OnDoneCreatingPanes();
30
31 void changeEvent(QEvent* event) override;
32
33 private:
34 void UpdateNavigationListStyle();
35
36 QStackedWidget* m_stacked_panes = nullptr;
37 QListWidget* m_navigation_list = nullptr;
38 bool m_handling_theme_change = false;
39 };
40
41 enum class SettingsWindowPaneIndex : int
42 {
43 General = 0,
44 Graphics,
45 Controllers,
46 Interface,
47 OnScreenDisplay,
48 Audio,
49 Paths,
50 GameCube,
51 Wii,
52 Triforce,
53 Advanced,
54 };
55
56 class SettingsWindow final : public StackedSettingsWindow
57 {
58 Q_OBJECT
59 public:
60 explicit SettingsWindow(MainWindow* parent);
61
62 void SelectPane(SettingsWindowPaneIndex);
63
64 void closeEvent(QCloseEvent* event) override;
65 };