Ocular Engine
ScenePropertiesDialog.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_EDITOR_SCENE_PROPERTIES_DIALOG__H__
19 #define __H__OCULAR_EDITOR_SCENE_PROPERTIES_DIALOG__H__
20 
21 #include <QtWidgets/qdialog.h>
22 
23 //------------------------------------------------------------------------------------------
24 
29 namespace Ocular
30 {
35  namespace Editor
36  {
37  class PropertyWidget;
38 
43  class ScenePropertiesDialog : public QDialog
44  {
45  Q_OBJECT
46 
47  public:
48 
49  ScenePropertiesDialog(QWidget* parent = nullptr);
50  virtual ~ScenePropertiesDialog();
51 
52  virtual void showEvent(QShowEvent* event) override;
53 
54  protected:
55 
56  void buildWidgets();
57  void buildScrollArea();
58  void buildActionButtons();
59 
60  void buildProperties();
61  void buildLightProperties();
62  void buildSceneTreeProperties();
63  void buildRendererProperties();
64 
65  void restorePropertyStates();
66 
67  private slots:
68 
69  void onOK();
70  void onCancel();
71  void onApply();
72 
73  private:
74 
75  QVBoxLayout* m_MainLayout;
76  QVBoxLayout* m_ScrollLayout;
77  QHBoxLayout* m_ActionButtonLayout;
78 
79  QPushButton* m_ButtonOK;
80  QPushButton* m_ButtonCancel;
81  QPushButton* m_ButtonApply;
82 
83  QScrollArea* m_ScrollArea;
84 
85  //------------------------------------------------------------
86  // Properties
87  //------------------------------------------------------------
88 
89  //------------------------------------------------------------
90  // SceneTree
91 
92  QLabel* m_SceneTreePropertiesLabel;
93  PropertyWidget* m_SceneTreeStaticProperty;
94  PropertyWidget* m_SceneTreeDynamicProperty;
95 
96  //------------------------------------------------------------
97  // Renderer
98 
99  QLabel* m_RendererPropertiesLabel;
100  PropertyWidget* m_RendererTypeProperty;
101 
102  //------------------------------------------------------------
103  // Light
104 
105  QLabel* m_LightPropertiesLabel;
106  PropertyWidget* m_AmbientColorProperty;
107  PropertyWidget* m_AmbientIntensityProperty;
108 
109  float m_AmbientIntensity;
110  Core::Color m_AmbientColor;
111  };
112  }
116 }
121 //------------------------------------------------------------------------------------------
122 
123 #endif
Parent class for all general property widgets.
Definition: PropertyWidget.hpp:51
Dialog that displays various scene-based properties (Main Menu -> Scene -> Scene Properties) ...
Definition: ScenePropertiesDialog.hpp:43
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
Definition: Color.hpp:40