Ocular Engine
UniformsDisplayBox.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_EDITOR_MATERIAL_UNIFORMS_DISPLAY_BOX__H__
19 #define __H__OCULAR_EDITOR_MATERIAL_UNIFORMS_DISPLAY_BOX__H__
20 
21 #include "MaterialPropertiesDisplayBox.hpp"
22 
23 //------------------------------------------------------------------------------------------
24 
29 namespace Ocular
30 {
35  namespace Editor
36  {
37  class PropertyWidget;
38 
43  {
44  Q_OBJECT
45 
46  public:
47 
48  UniformsDisplayBox(QWidget* parent = nullptr);
50 
51  //------------------------------------------------------------
52 
53  virtual void setMaterial(Graphics::Material* material) override;
54  virtual void updateProperties() override;
55  virtual void onApply() override;
56 
57  protected:
58 
59  void buildWidgets();
60  void buildNewUniformWidget();
61 
62  void setUniform(std::string const& name, uint32_t& currRegister, std::string const& value, std::string const& type);
63 
64  private slots:
65 
66  void onUniformAdded();
67 
68  private:
69 
70  QVBoxLayout* m_UniformLayout;
71  QHBoxLayout* m_NewUniformLayout;
72  QHBoxLayout* m_NewUniformLeftLayout;
73  QHBoxLayout* m_NewUniformRightLayout;
74 
75  QFrame* m_NewUniformLeftFrame;
76  QFrame* m_NewUniformRightFrame;
77 
78  QLineEdit* m_NewUniformNameEdit;
79  QComboBox* m_NewUniformTypeCombo;
80  QPushButton* m_NewUniformAddButton;
81 
82  };
83  }
87 }
92 //------------------------------------------------------------------------------------------
93 
94 #endif
Definition: MaterialPropertiesDisplayBox.hpp:41
Definition: UniformsDisplayBox.hpp:42
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
Definition: Material.hpp:62