all repos — mgba @ 2edd1505ae9b3fd05c8aede741d61baacaae0609

mGBA Game Boy Advance Emulator

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

 1/* Copyright (c) 2013-2015 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_SHADER_SELECTOR_H
 7#define QGBA_SHADER_SELECTOR_H
 8
 9#include <QDialog>
10
11#include "ui_ShaderSelector.h"
12
13struct GBAGLES2Shader;
14class QGridLayout;
15struct VideoShader;
16
17namespace QGBA {
18
19class Display;
20
21class ShaderSelector : public QDialog {
22Q_OBJECT
23
24public:
25	ShaderSelector(Display* display, QWidget* parent = nullptr);
26	~ShaderSelector();
27
28public slots:
29	void refreshShaders();
30	void clear();
31
32private slots:
33	void selectShader();
34	void loadShader(const QString& path);
35	void clearShader();
36
37private:
38	void addUniform(QGridLayout*, float* value, float min, float max, int y, int x);
39	void addUniform(QGridLayout*, int* value, int min, int max, int y, int x);
40	QWidget* makePage(GBAGLES2Shader*);
41
42	Ui::ShaderSelector m_ui;
43	Display* m_display;
44	VideoShader* m_shaders;
45};
46
47}
48
49#endif