Ocular Engine
ResourceProperty.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_EDITOR_RESOURCE_PROPERTY__H__
19 #define __H__OCULAR_EDITOR_RESOURCE_PROPERTY__H__
20 
21 #include "Widgets/Properties/PropertyWidget.hpp"
22 #include "Widgets/Standard/LineEdit.hpp"
23 #include "Widgets/Standard/ButtonResourceBrowse.hpp"
24 
25 #include <string>
26 
27 //------------------------------------------------------------------------------------------
28 
33 namespace Ocular
34 {
39  namespace Editor
40  {
47  {
48  public:
49 
50  ResourceProperty(QWidget* parent = nullptr);
51  virtual ~ResourceProperty();
52 
56  virtual bool updateProperties() override;
57 
61  void setResourceType(Core::ResourceType type);
62 
67  virtual void setValue(void* value, uint32_t size = 0) override;
68 
72  virtual std::string getValue() const override;
73 
81  bool validateResource(bool isEmptyValid = true);
82 
83  protected:
84 
85  private:
86 
87  LineEdit* m_LineValue;
88  ButtonResourceBrowse* m_ButtonBrowse;
89 
90  Core::ResourceType m_Type;
91  };
92  }
96 }
101 //------------------------------------------------------------------------------------------
102 
103 #endif
bool validateResource(bool isEmptyValid=true)
Definition: ResourceProperty.cpp:132
Parent class for all general property widgets.
Definition: PropertyWidget.hpp:51
virtual void setValue(void *value, uint32_t size=0) override
Definition: ResourceProperty.cpp:107
virtual bool updateProperties() override
Definition: ResourceProperty.cpp:52
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
virtual std::string getValue() const override
Definition: ResourceProperty.cpp:127
Definition: ResourceProperty.hpp:46
Definition: ButtonResourceBrowse.hpp:43
Definition: LineEdit.hpp:56