Ocular Engine
MaterialPropertiesPanel.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_EDITOR_MATERIAL_PROPERTIES_PANEL__H__
19 #define __H__OCULAR_EDITOR_MATERIAL_PROPERTIES_PANEL__H__
20 
21 #include <QtWidgets/qframe.h>
22 
23 #include "Graphics/Material/Material.hpp"
24 #include "Events/AEventListener.hpp"
25 
26 //------------------------------------------------------------------------------------------
27 
32 namespace Ocular
33 {
38  namespace Editor
39  {
40  class PropertyWidget;
41  class MaterialPropertiesDisplayBox;
42 
47  {
48  Q_OBJECT
49 
50  public:
51 
52  MaterialPropertiesPanel(QWidget* parent = nullptr);
54 
55  virtual QSize sizeHint() const override;
56 
57  void setMaterial(std::string const& mapping);
58  void onApply();
59 
60  protected:
61 
62  virtual bool onEvent(std::shared_ptr<Core::AEvent> event) override;
63 
64  void buildBaseWidgets();
65  void updateProperties();
66 
67  private slots:
68 
69  private:
70 
71  Graphics::Material* m_Material;
72  std::string m_MaterialMapping;
73 
74  QVBoxLayout* m_LayoutMain;
75 
76  PropertyWidget* m_PropertyMapping;
77  PropertyWidget* m_PropertyFile;
78 
79  MaterialPropertiesDisplayBox* m_PropertyBoxShaders;
80  MaterialPropertiesDisplayBox* m_PropertyBoxUniforms;
81  MaterialPropertiesDisplayBox* m_PropertyBoxTextures;
82  MaterialPropertiesDisplayBox* m_PropertyBoxRenderStates;
83  };
84  }
88 }
93 //------------------------------------------------------------------------------------------
94 
95 #endif
Parent class for all general property widgets.
Definition: PropertyWidget.hpp:51
Definition: MaterialPropertiesDisplayBox.hpp:41
Definition: MaterialPropertiesPanel.hpp:46
Definition: AEventListener.hpp:43
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
Definition: Material.hpp:62