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 void audioDriverChanged();
26
27private slots:
28 void selectBios();
29 void updateConfig();
30
31private:
32 Ui::SettingsView m_ui;
33
34 ConfigController* m_controller;
35
36 void saveSetting(const char* key, const QAbstractButton*);
37 void saveSetting(const char* key, const QComboBox*);
38 void saveSetting(const char* key, const QDoubleSpinBox*);
39 void saveSetting(const char* key, const QLineEdit*);
40 void saveSetting(const char* key, const QSlider*);
41 void saveSetting(const char* key, const QSpinBox*);
42 void saveSetting(const char* key, const QString&);
43
44 void loadSetting(const char* key, QAbstractButton*);
45 void loadSetting(const char* key, QComboBox*);
46 void loadSetting(const char* key, QDoubleSpinBox*);
47 void loadSetting(const char* key, QLineEdit*);
48 void loadSetting(const char* key, QSlider*);
49 void loadSetting(const char* key, QSpinBox*);
50 QString loadSetting(const char* key);
51};
52
53}
54
55#endif