Ocular Engine
ButtonColorPicker.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_EDITOR_BUTTON_COLOR_PICKER__H__
19 #define __H__OCULAR_EDITOR_BUTTON_COLOR_PICKER__H__
20 
21 #include <QtWidgets/qpushbutton.h>
22 #include "Math/Color.hpp"
23 
24 //------------------------------------------------------------------------------------------
25 
30 namespace Ocular
31 {
36  namespace Editor
37  {
43  class ButtonColorPicker : public QPushButton
44  {
45  Q_OBJECT
46 
47  public:
48 
49  ButtonColorPicker(QWidget* parent = nullptr);
50  virtual ~ButtonColorPicker();
51 
52  virtual QSize sizeHint() const override;
53 
58  bool wasEdited(bool reset = true);
59 
63  Core::Color const& getSelectedColor() const;
64 
65  protected:
66 
67  private slots:
68 
69  void onButtonClick();
70 
71  private:
72 
73  bool m_WasEdited;
74 
75  Core::Color m_SelectedColor;
76  QColor m_QColor;
77  };
78  }
82 }
87 //------------------------------------------------------------------------------------------
88 
89 #endif
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
Definition: Color.hpp:40
Definition: ButtonColorPicker.hpp:43
bool wasEdited(bool reset=true)
Definition: ButtonColorPicker.cpp:56