Ocular Engine
MultiProperty.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_EDITOR_MULTI_PROPERTY__H__
19 #define __H__OCULAR_EDITOR_MULTI_PROPERTY__H__
20 
21 #include "Widgets/Properties/PropertyWidget.hpp"
22 #include "Widgets/Standard/LineEdit.hpp"
23 
24 #include <vector>
25 
26 //------------------------------------------------------------------------------------------
27 
32 namespace Ocular
33 {
38  namespace Editor
39  {
46  {
47  public:
48 
49  MultiProperty(QWidget* parent = nullptr);
50  virtual ~MultiProperty();
51 
52  virtual bool updateProperties() override;
53 
62  uint32_t addProperty(std::string const& name, LineType type);
63 
68  QLabel* getLabel(uint32_t index);
69 
74  LineEdit* getLineEdit(uint32_t index);
75 
79  uint32_t getNumProperties() const;
80 
81  protected:
82 
83  private:
84 
85  std::vector<std::pair<QLabel*, LineEdit*>> m_Properties;
86  };
87  }
91 }
96 //------------------------------------------------------------------------------------------
97 
98 #endif
LineEdit * getLineEdit(uint32_t index)
Definition: MultiProperty.cpp:77
Parent class for all general property widgets.
Definition: PropertyWidget.hpp:51
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
uint32_t addProperty(std::string const &name, LineType type)
Definition: MultiProperty.cpp:50
Definition: MultiProperty.hpp:45
QLabel * getLabel(uint32_t index)
Definition: MultiProperty.cpp:65
uint32_t getNumProperties() const
Definition: MultiProperty.cpp:89
virtual bool updateProperties() override
Definition: MultiProperty.cpp:45
Definition: LineEdit.hpp:56