mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-21 12:59:14 +12:00
Qt: Add config window controls
This commit is contained in:
parent
c2b479889c
commit
0e3f8d2915
10 changed files with 395 additions and 11 deletions
|
@ -1,16 +1,25 @@
|
|||
#pragma once
|
||||
|
||||
#include <QApplication>
|
||||
#include <QCheckBox>
|
||||
#include <QComboBox>
|
||||
#include <QDialog>
|
||||
#include <QListWidget>
|
||||
#include <QPalette>
|
||||
#include <QStackedWidget>
|
||||
#include <QTextEdit>
|
||||
#include <QWidget>
|
||||
#include <QtWidgets>
|
||||
#include <array>
|
||||
#include <functional>
|
||||
#include <utility>
|
||||
|
||||
#include "emulator.hpp"
|
||||
|
||||
class ConfigWindow : public QDialog {
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
private:
|
||||
enum class Theme : int {
|
||||
System = 0,
|
||||
Light = 1,
|
||||
|
@ -20,11 +29,20 @@ class ConfigWindow : public QDialog {
|
|||
};
|
||||
|
||||
Theme currentTheme;
|
||||
QComboBox* themeSelect = nullptr;
|
||||
QTextEdit* helpText = nullptr;
|
||||
QListWidget* widgetList = nullptr;
|
||||
QStackedWidget* widgetContainer = nullptr;
|
||||
|
||||
static constexpr size_t settingWidgetCount = 6;
|
||||
std::array<QString, settingWidgetCount> helpTexts;
|
||||
|
||||
void addWidget(QWidget* widget, QString title, QString icon, QString helpText);
|
||||
void setTheme(Theme theme);
|
||||
|
||||
public:
|
||||
ConfigWindow(QWidget* parent = nullptr);
|
||||
public:
|
||||
ConfigWindow(Emulator* emu, QWidget* parent = nullptr);
|
||||
~ConfigWindow();
|
||||
|
||||
private:
|
||||
Emulator* emu;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue