Ocular Engine
PropertiesDisplayBox.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_EDITOR_PROPERTIES_DISPLAY_BOX__H__
19 #define __H__OCULAR_EDITOR_PROPERTIES_DISPLAY_BOX__H__
20 
21 
22 #include <QtWidgets/qgroupbox.h>
23 #include <QtWidgets/qboxlayout.h>
24 
25 #include "Scene/SceneObject.hpp"
26 
27 //------------------------------------------------------------------------------------------
28 
33 namespace Ocular
34 {
39  namespace Editor
40  {
41  class PropertiesDisplayTitleBar;
42 
46  class PropertiesDisplayBox : public QFrame
47  {
48  public:
49 
50  PropertiesDisplayBox(std::string const& displayName, bool canMinimize = true, bool canClose = false, QWidget* parent = nullptr);
52 
53  virtual QSize sizeHint() const override;
54 
55  //------------------------------------------------------------
56 
57  void setTitle(std::string const& title);
58 
59  virtual void setObject(Core::SceneObject* object) = 0;
60  virtual void updateProperties() = 0;
61 
62  protected:
63 
64  void buildLayout();
65  void buildTitleBar(std::string const& displayName, bool canMinimize, bool canClsoe);
66 
67  //------------------------------------------------------------
68 
69  QVBoxLayout* m_Layout;
70  Core::SceneObject* m_Object;
71 
72  PropertiesDisplayTitleBar* m_TitleBar;
73 
74  private:
75  };
76  }
80 }
85 //------------------------------------------------------------------------------------------
86 
87 #endif
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
Definition: SceneObject.hpp:93
Definition: PropertiesDisplayBox.hpp:46
Definition: PropertiesDisplayTitleBar.hpp:44