all repos — mgba @ 7cad9ab33a3ac07060bc971c3a2f9e86d15424ff

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 <QWidget>
10
11#include "ui_SettingsView.h"
12
13namespace QGBA {
14
15class ConfigController;
16
17class SettingsView : public QWidget {
18Q_OBJECT
19
20public:
21	SettingsView(ConfigController* controller, QWidget* parent = nullptr);
22
23signals:
24	void biosLoaded(const QString&);
25
26private slots:
27	void selectBios();
28	void updateConfig();
29
30private:
31	Ui::SettingsView m_ui;
32
33	ConfigController* m_controller;
34
35	void saveSetting(const char* key, const QAbstractButton*);
36	void saveSetting(const char* key, const QComboBox*);
37	void saveSetting(const char* key, const QLineEdit*);
38	void saveSetting(const char* key, const QSpinBox*);
39	void saveSetting(const char* key, const QString&);
40
41	void loadSetting(const char* key, QAbstractButton*);
42	void loadSetting(const char* key, QComboBox*);
43	void loadSetting(const char* key, QLineEdit*);
44	void loadSetting(const char* key, QSpinBox*);
45	QString loadSetting(const char* key);
46};
47
48}
49
50#endif