mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
DolphinQt: Change main settings window QTabWidget into a QListWidget and QStackedWidget.
This commit is contained in:
@ -5,7 +5,31 @@
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
class QTabWidget;
|
||||
class QStackedWidget;
|
||||
class QListWidget;
|
||||
|
||||
// A settings window with a QListWidget to switch between panes of a QStackedWidget.
|
||||
class StackedSettingsWindow : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit StackedSettingsWindow(QWidget* parent = nullptr);
|
||||
|
||||
void ActivatePane(int index);
|
||||
|
||||
protected:
|
||||
void AddPane(QWidget*, const QString& name);
|
||||
|
||||
// Adds a scrollable Pane.
|
||||
void AddWrappedPane(QWidget*, const QString& name);
|
||||
|
||||
// For derived classes to call after they create their settings panes.
|
||||
void OnDoneCreatingPanes();
|
||||
|
||||
private:
|
||||
QStackedWidget* m_stacked_panes;
|
||||
QListWidget* m_navigation_list;
|
||||
};
|
||||
|
||||
enum class TabIndex
|
||||
{
|
||||
@ -13,14 +37,12 @@ enum class TabIndex
|
||||
Audio = 2
|
||||
};
|
||||
|
||||
class SettingsWindow final : public QDialog
|
||||
class SettingsWindow final : public StackedSettingsWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit SettingsWindow(QWidget* parent = nullptr);
|
||||
|
||||
void SelectGeneralPane();
|
||||
void SelectAudioPane();
|
||||
|
||||
private:
|
||||
QTabWidget* m_tab_widget;
|
||||
};
|
||||
|
Reference in New Issue
Block a user