Radium Engine  1.5.20
Loading...
Searching...
No Matches
MaterialParameterEditor.hpp
1#pragma once
2#include <Gui/RaGui.hpp>
3
4#include <QGroupBox>
5#include <QLabel>
6#include <QPlainTextEdit>
7#include <QVBoxLayout>
8#include <QWidget>
9
10#include <nlohmann/json.hpp>
11
12#include <Gui/ParameterSetEditor/ParameterSetEditor.hpp>
13
14namespace Ra {
15namespace Engine {
16namespace Data {
17class Material;
18class RenderParameters;
19} // namespace Data
20} // namespace Engine
21
22namespace Gui {
23
29class RA_GUI_API MaterialParameterEditor : public QWidget
30{
31 Q_OBJECT
32 public:
36 explicit MaterialParameterEditor( QWidget* parent = nullptr );
38 MaterialParameterEditor& operator=( const MaterialParameterEditor& ) = delete;
40 MaterialParameterEditor&& operator=( MaterialParameterEditor&& ) = delete;
41 ~MaterialParameterEditor() override = default;
53 const nlohmann::json& constraints,
54 const std::string& name = "" );
55
63 void setupFromMaterial( std::shared_ptr<Ra::Engine::Data::Material> material );
64
70 void showUnspecified( bool enable );
71
72 signals:
77
78 private:
80 QLabel* m_matInstanceNameLabel;
82 QLabel* m_matNameLabel;
84 QPlainTextEdit* m_matProperties;
86 QVBoxLayout* m_matParamsLayout;
88 VariableSetEditor* m_parametersControlPanel;
90 bool m_showUnspecified = false;
91
92 // matInfoGroup
93 QGroupBox* m_matInfoGroup;
94};
95
96} // namespace Gui
97} // namespace Ra
Management of shader parameters with automatic binding of a named parameter to the corresponding glsl...
Simple Widget for Material/RenderParameter editing A material editor will show information about the ...
void materialParametersModified(const std::string &name)
void setupFromParameters(Engine::Data::RenderParameters &params, const nlohmann::json &constraints, const std::string &name="")
Update the different UI element with the given renderParameter, using the given constraints.
Simple Widget for RenderParameter editing The editor will expose a control panel containing all of th...
hepler function to manage enum as underlying types in VariableSet
Definition Cage.cpp:3