Ocular Engine
MaterialEditorDialog.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_EDITOR_MATERIAL_EDITOR_DIALOG__H__
19 #define __H__OCULAR_EDITOR_MATERIAL_EDITOR_DIALOG__H__
20 
21 #include <QtWidgets/qdialog.h>
22 
23 //------------------------------------------------------------------------------------------
24 
29 namespace Ocular
30 {
35  namespace Editor
36  {
37  class MaterialTree;
38  class MaterialPropertiesPanel;
39 
44  class MaterialEditorDialog : public QDialog
45  {
46  Q_OBJECT
47 
48  public:
49 
50  MaterialEditorDialog(QWidget* parent = nullptr);
51  virtual ~MaterialEditorDialog();
52 
53  virtual void showEvent(QShowEvent* event) override;
54 
55  protected:
56 
57  void buildWidgets();
58  void buildLeftSide();
59  void buildRightSide();
60  void buildPropertyPanel();
61  void buildActionButtons();
62 
63  private slots:
64 
65  void onOK();
66  void onCancel();
67  void onApply();
68 
69  private:
70 
71  QHBoxLayout* m_MainLayout;
72  QVBoxLayout* m_RightLayout;
73  QHBoxLayout* m_ActionButtonLayout;
74  QVBoxLayout* m_MaterialTreeLayout;
75  QVBoxLayout* m_MaterialGroupLayout;
76  QVBoxLayout* m_PropertyGroupLayout;
77 
78  QPushButton* m_ButtonOK;
79  QPushButton* m_ButtonCancel;
80  QPushButton* m_ButtonApply;
81 
82  QFrame* m_LeftFrame;
83  QFrame* m_RightFrame;
84  QFrame* m_ActionButtonFrame;
85 
86  QGroupBox* m_MaterialGroupBox;
87  QGroupBox* m_PropertyGroupBox;
88 
89  MaterialTree* m_MaterialTree;
90  MaterialPropertiesPanel* m_MaterialProperties;
91  };
92  }
96 }
101 //------------------------------------------------------------------------------------------
102 
103 #endif
Definition: MaterialPropertiesPanel.hpp:46
Dialog to view and editor Material resource objects.
Definition: MaterialEditorDialog.hpp:44
Definition: MaterialTree.hpp:44
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70