ACMX 2.139.0
Dual-Backend Real-Time GPU Video Synthesis
Loading...
Searching...
No Matches
shader.hpp
Go to the documentation of this file.
1#ifndef SHADER_H
2#define SHADER_H
3
4/**
5 * @file shader.hpp
6 * @brief Dialog for creating a new shader file.
7 */
8
9#include "backend.hpp"
10#include <QCheckBox>
11#include <QComboBox>
12#include <QDialog>
13#include <QFile>
14#include <QLabel>
15#include <QLineEdit>
16#include <QMessageBox>
17#include <QPushButton>
18#include <QTextStream>
19#include <QVBoxLayout>
20
21/**
22 * @brief New-shader dialog with optional starter template content.
23 */
24class ShaderDialog : public QDialog {
25 Q_OBJECT
26
27 public:
28 explicit ShaderDialog(acmx2::Backend backend, QWidget *parent = nullptr);
29 /// @brief Set output directory used for generated shader files.
30 void setShaderPath(const QString &path);
31
32 private:
33 QLineEdit *shaderNameEdit;
34 QPushButton *okButton;
35 QPushButton *cancelButton;
39 QString shaderPath;
41
42 void init();
43 bool createShaderFile(const QString &shaderName, bool includeDefaultCode, bool createCacheShader, bool createComputeShader);
44 private slots:
45 void onOkButtonClicked();
47};
48
49#endif
QPushButton * okButton
Definition shader.hpp:34
void onOkButtonClicked()
Definition shader.cpp:61
QCheckBox * defaultCodeCheckBox
Definition shader.hpp:36
ShaderDialog(acmx2::Backend backend, QWidget *parent=nullptr)
Definition shader.cpp:10
void setShaderPath(const QString &path)
Set output directory used for generated shader files.
Definition shader.cpp:136
void init()
Definition shader.cpp:12
QPushButton * cancelButton
Definition shader.hpp:35
acmx2::Backend backend
Definition shader.hpp:40
bool createShaderFile(const QString &shaderName, bool includeDefaultCode, bool createCacheShader, bool createComputeShader)
Definition shader.cpp:376
QLineEdit * shaderNameEdit
Definition shader.hpp:33
QCheckBox * cacheShaderCheckBox
Definition shader.hpp:37
QString shaderPath
Definition shader.hpp:39
void onCancelButtonClicked()
Definition shader.cpp:138
QComboBox * shaderTypeComboBox
Definition shader.hpp:38
Backend
Definition backend.hpp:8