all repos — mgba @ 6d8a34a6dcb5c819a978933bf47f3396ab6a7d3a

mGBA Game Boy Advance Emulator

src/platform/qt/SettingsView.h (view raw)

 1/* Copyright (c) 2013-2014 Jeffrey Pfau
 2 *
 3 * This Source Code Form is subject to the terms of the Mozilla Public
 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 6#ifndef QGBA_SETTINGS_VIEW
 7#define QGBA_SETTINGS_VIEW
 8
 9#include <QDialog>
10
11#include "ui_SettingsView.h"
12
13namespace QGBA {
14
15class ConfigController;
16class InputController;
17class ShortcutController;
18
19class SettingsView : public QDialog {
20Q_OBJECT
21
22public:
23	SettingsView(ConfigController* controller, InputController* inputController, ShortcutController* shortcutController, QWidget* parent = nullptr);
24
25signals:
26	void biosLoaded(const QString&);
27	void audioDriverChanged();
28	void displayDriverChanged();
29	void pathsChanged();
30
31private slots:
32	void selectBios();
33	void updateConfig();
34
35private:
36	Ui::SettingsView m_ui;
37
38	ConfigController* m_controller;
39	InputController* m_input;
40
41	void saveSetting(const char* key, const QAbstractButton*);
42	void saveSetting(const char* key, const QComboBox*);
43	void saveSetting(const char* key, const QDoubleSpinBox*);
44	void saveSetting(const char* key, const QLineEdit*);
45	void saveSetting(const char* key, const QSlider*);
46	void saveSetting(const char* key, const QSpinBox*);
47	void saveSetting(const char* key, const QVariant&);
48
49	void loadSetting(const char* key, QAbstractButton*);
50	void loadSetting(const char* key, QComboBox*);
51	void loadSetting(const char* key, QDoubleSpinBox*);
52	void loadSetting(const char* key, QLineEdit*);
53	void loadSetting(const char* key, QSlider*);
54	void loadSetting(const char* key, QSpinBox*);
55	QString loadSetting(const char* key);
56};
57
58}
59
60#endif