Ocular Engine
ColorProperty.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_EDITOR_COLOR_PROPERTY__H__
19 #define __H__OCULAR_EDITOR_COLOR_PROPERTY__H__
20 
21 #include "Widgets/Properties/PropertyWidget.hpp"
22 #include "Widgets/Standard/ButtonColorPicker.hpp"
23 #include "Widgets/Standard/ColorPreview.hpp"
24 #include "Math/Color.hpp"
25 
26 //------------------------------------------------------------------------------------------
27 
32 namespace Ocular
33 {
38  namespace Editor
39  {
46  {
47  Q_OBJECT
48 
49  public:
50 
51  ColorProperty(QWidget* parent = nullptr);
52  virtual ~ColorProperty();
53 
54  virtual bool updateProperties() override;
55  virtual void setValue(void* value, uint32_t size) override;
56  virtual std::string getValue() const override;
57 
58  protected:
59 
60  private slots:
61 
62  void onColorPicked();
63 
64  private:
65 
66  ColorPreview* m_ColorPreview;
67  ButtonColorPicker* m_ButtonColor;
68  };
69  }
73 }
78 //------------------------------------------------------------------------------------------
79 
80 #endif
virtual std::string getValue() const override
Definition: ColorProperty.cpp:105
Parent class for all general property widgets.
Definition: PropertyWidget.hpp:51
virtual void setValue(void *value, uint32_t size) override
Definition: ColorProperty.cpp:85
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
virtual bool updateProperties() override
Definition: ColorProperty.cpp:55
Definition: ColorProperty.hpp:45
Definition: ButtonColorPicker.hpp:43
Definition: ColorPreview.hpp:43