mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-07-20 14:01:44 +12:00
Some checks failed
Android Build / x64 (release) (push) Has been cancelled
Android Build / arm64 (release) (push) Has been cancelled
HTTP Server Build / build (push) Has been cancelled
Hydra Core Build / Windows (push) Has been cancelled
Hydra Core Build / MacOS (push) Has been cancelled
Hydra Core Build / Linux (push) Has been cancelled
Hydra Core Build / Android-x64 (push) Has been cancelled
Hydra Core Build / ARM-Libretro (push) Has been cancelled
Linux AppImage Build / build (push) Has been cancelled
Linux Build / build (push) Has been cancelled
MacOS Build / MacOS-arm64 (push) Has been cancelled
MacOS Build / MacOS-x86_64 (push) Has been cancelled
Qt Build / Windows (push) Has been cancelled
Qt Build / MacOS-arm64 (push) Has been cancelled
Qt Build / MacOS-x86_64 (push) Has been cancelled
Qt Build / Linux (push) Has been cancelled
Windows Build / build (push) Has been cancelled
iOS Simulator Build / build (push) Has been cancelled
MacOS Build / MacOS-Universal (push) Has been cancelled
Qt Build / MacOS-Universal (push) Has been cancelled
* Initial input UI draft Co-Authored-By: Paris Oplopoios <parisoplop@gmail.com> * More keybinding work Co-Authored-By: Paris Oplopoios <parisoplop@gmail.com> * Nit Co-Authored-By: Paris Oplopoios <parisoplop@gmail.com> * More nits Co-Authored-By: Paris Oplopoios <parisoplop@gmail.com> --------- Co-authored-by: Paris Oplopoios <parisoplop@gmail.com>
62 lines
1.6 KiB
C++
62 lines
1.6 KiB
C++
#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"
|
|
#include "frontend_settings.hpp"
|
|
#include "input_mappings.hpp"
|
|
#include "panda_qt/input_window.hpp"
|
|
|
|
class ConfigWindow : public QDialog {
|
|
Q_OBJECT
|
|
|
|
private:
|
|
using ConfigCallback = std::function<void()>;
|
|
using MainWindowCallback = std::function<QWidget*()>;
|
|
|
|
using Theme = FrontendSettings::Theme;
|
|
using WindowIcon = FrontendSettings::WindowIcon;
|
|
|
|
QTextEdit* helpText = nullptr;
|
|
QListWidget* widgetList = nullptr;
|
|
QStackedWidget* widgetContainer = nullptr;
|
|
InputWindow* inputWindow = nullptr;
|
|
|
|
static constexpr size_t settingWidgetCount = 7;
|
|
std::array<QString, settingWidgetCount> helpTexts;
|
|
|
|
// The config class holds a copy of the emulator config which it edits and sends
|
|
// over to the emulator in a thread-safe manner
|
|
EmulatorConfig config;
|
|
|
|
ConfigCallback updateConfig;
|
|
MainWindowCallback getMainWindow;
|
|
|
|
void addWidget(QWidget* widget, QString title, QString icon, QString helpText);
|
|
void setTheme(FrontendSettings::Theme theme);
|
|
void setIcon(FrontendSettings::WindowIcon icon);
|
|
|
|
QComboBox* createLanguageSelect();
|
|
|
|
public:
|
|
ConfigWindow(ConfigCallback configCallback, MainWindowCallback windowCallback, const EmulatorConfig& config, QWidget* parent = nullptr);
|
|
~ConfigWindow();
|
|
|
|
EmulatorConfig& getConfig() { return config; }
|
|
InputWindow* getInputWindow() { return inputWindow; }
|
|
|
|
private:
|
|
Emulator* emu;
|
|
};
|