all repos — mgba @ e17e4fd19003209ff9db1f0ac1394e463c7b4a47

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;
16
17class SettingsView : public QDialog {
18Q_OBJECT
19
20public:
21	SettingsView(ConfigController* controller, QWidget* parent = nullptr);
22
23signals:
24	void biosLoaded(const QString&);
25	void audioDriverChanged();
26	void displayDriverChanged();
27
28private slots:
29	void selectBios();
30	void updateConfig();
31
32private:
33	Ui::SettingsView m_ui;
34
35	ConfigController* m_controller;
36
37	void saveSetting(const char* key, const QAbstractButton*);
38	void saveSetting(const char* key, const QComboBox*);
39	void saveSetting(const char* key, const QDoubleSpinBox*);
40	void saveSetting(const char* key, const QLineEdit*);
41	void saveSetting(const char* key, const QSlider*);
42	void saveSetting(const char* key, const QSpinBox*);
43	void saveSetting(const char* key, const QVariant&);
44
45	void loadSetting(const char* key, QAbstractButton*);
46	void loadSetting(const char* key, QComboBox*);
47	void loadSetting(const char* key, QDoubleSpinBox*);
48	void loadSetting(const char* key, QLineEdit*);
49	void loadSetting(const char* key, QSlider*);
50	void loadSetting(const char* key, QSpinBox*);
51	QString loadSetting(const char* key);
52};
53
54}
55
56#endif