Ocular Engine
PropertiesPanel.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_EDITOR_PROPERTIES_PANEL__H__
19 #define __H__OCULAR_EDITOR_PROPERTIES_PANEL__H__
20 
21 #include <QtWidgets/qframe.h>
22 #include "Events/AEventListener.hpp"
23 
24 //------------------------------------------------------------------------------------------
25 
30 namespace Ocular
31 {
36  namespace Editor
37  {
38  class CommonDisplay;
39  class CustomObjectDisplay;
40  class RenderableDisplay;
41  class RoutineDisplay;
42 
46  class PropertiesPanel : public QFrame, public Ocular::Core::AEventListener
47  {
48  Q_OBJECT
49 
50  public:
51 
52  PropertiesPanel(QWidget* parent = nullptr);
53  ~PropertiesPanel();
54 
55  virtual QSize sizeHint() const override;
56 
57  //------------------------------------------------------------
58 
59  void update();
60  void selectObject(Core::SceneObject* object);
61 
62  protected:
63 
64  virtual bool onEvent(std::shared_ptr<Core::AEvent> event) override;
65 
66  void objectDeselected();
67 
68  void refreshWidgets();
69 
70  void initializeCommon();
71  void initializeCustom();
72  void initializeRenderable();
73  void initializeRoutines();
74  void initializeAddButtons();
75 
76  private slots:
77 
78  void onAddRenderableClicked();
79  void onAddRoutineClicked();
80 
81  private:
82 
83  QVBoxLayout* m_Layout;
84  QHBoxLayout* m_LayoutAdd;
85 
86  Core::SceneObject* m_CurrentObject;
87  Core::UUID m_CurrentObjectUUID;
88 
89  CommonDisplay* m_CommonProperties;
90  PropertiesDisplayBox* m_CustomProperties;
91  RenderableDisplay* m_RenderableProperties;
92 
93  QPushButton* m_ButtonAddRenderable;
94  QPushButton* m_ButtonAddRoutine;
95 
96  std::vector<RoutineDisplay*> m_RoutineProperties;
97  };
98  }
102 }
107 //------------------------------------------------------------------------------------------
108 
109 #endif
Definition: AEventListener.hpp:43
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
Definition: SceneObject.hpp:93
Definition: UUID.hpp:45
Definition: PropertiesDisplayBox.hpp:46
Definition: RenderableDisplay.hpp:40
Definition: CommonDisplay.hpp:47
Definition: PropertiesPanel.hpp:46