Ocular Engine
MeshRenderableDisplayMaterial.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_EDITOR_MESH_RENDERABLE_DISPLAY_MATERIAL__H__
19 #define __H__OCULAR_EDITOR_MESH_RENDERABLE_DISPLAY_MATERIAL__H__
20 
21 #include <QtWidgets/qframe.h>
22 #include <QtWidgets/qboxlayout.h>
23 #include <QtWidgets/qlabel.h>
24 
25 //------------------------------------------------------------------------------------------
26 
31 namespace Ocular
32 {
33  namespace Graphics
34  {
35  class Material;
36  }
37 
42  namespace Editor
43  {
44  class LineEdit;
45  class ButtonResourceBrowse;
46 
47  class MeshRenderableDisplayMaterial : public QFrame
48  {
49  public:
50 
51  MeshRenderableDisplayMaterial(uint32_t index, QWidget* parent = nullptr);
53 
54  virtual QSize sizeHint() const override;
55 
56  //------------------------------------------------------------
57 
61  bool wasEdited();
62 
66  void setMaterialMapping(std::string const& material);
67 
71  std::string const& getMaterialMapping() const;
72 
76  uint32_t getMaterialIndex() const;
77 
78  protected:
79 
80  private:
81 
82  void createLeftSide();
83  void createRightSide();
84  void createLayout();
85 
86  //------------------------------------------------------------
87 
88  QFrame* m_FrameLeftSide;
89  QFrame* m_FrameRightSide;
90 
91  QHBoxLayout* m_Layout;
92  QHBoxLayout* m_LayoutLeft;
93  QHBoxLayout* m_LayoutRight;
94 
95  QLabel* m_LabelName;
96 
97  LineEdit* m_LineValue;
98  ButtonResourceBrowse* m_ButtonBrowse;
99 
100  std::string m_Material;
101  uint32_t m_MaterialIndex;
102  };
103  }
107 }
112 //------------------------------------------------------------------------------------------
113 
114 #endif
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
Definition: MeshRenderableDisplayMaterial.hpp:47
Definition: ButtonResourceBrowse.hpp:43
bool wasEdited()
Definition: MeshRenderableDisplayMaterial.cpp:61
Definition: LineEdit.hpp:56