Ocular Engine
SelectResourceDialog.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_EDITOR_SELECT_RESOURCE_DIALOG__H__
19 #define __H__OCULAR_EDITOR_SELECT_RESOURCE_DIALOG__H__
20 
21 #include <QtWidgets/qdialog.h>
22 #include <QtWidgets/qtreewidget.h>
23 
24 #include "Resources/Resource.hpp"
25 
26 //------------------------------------------------------------------------------------------
27 
32 namespace Ocular
33 {
38  namespace Editor
39  {
40  enum class ResourceType
41  {
42  Undefined = 0,
43  Renderable,
44  Routine
45  };
46 
50  class SelectResourceDialog : public QDialog
51  {
52  Q_OBJECT
53 
54  public:
55 
56  SelectResourceDialog(ResourceType const type, QWidget* parent = nullptr);
57  SelectResourceDialog(Core::ResourceType const type, QWidget* parent = nullptr);
58 
59  virtual ~SelectResourceDialog();
60 
61  std::string const& getSelectedName() const;
62 
63  protected:
64 
65  void buildWidgets();
66 
67  void populateTree(ResourceType const type);
68  void populateTree(Core::ResourceType const type);
69 
70  private slots:
71 
72  void onFinished();
73 
74  private:
75 
76  std::string m_ResourceName;
77 
78  QLabel* m_LabelTitle;
79 
80  QVBoxLayout* m_Layout;
81  QTreeWidget* m_TreeResource;
82 
83  QPushButton* m_ButtonSelect;
84  };
85  }
89 }
94 //------------------------------------------------------------------------------------------
95 
96 #endif
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
Definition: SelectResourceDialog.hpp:50