Ocular Engine
ButtonResourceBrowse.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_BUTTON_RESOURCE_BROWSE__H__
19 #define __H__OCULAR_BUTTON_RESOURCE_BROWSE__H__
20 
21 #include <QtWidgets/qpushbutton.h>
22 #include "Resources/Resource.hpp"
23 
24 //------------------------------------------------------------------------------------------
25 
30 namespace Ocular
31 {
36  namespace Editor
37  {
43  class ButtonResourceBrowse : public QPushButton
44  {
45  Q_OBJECT
46 
47  public:
48 
49  ButtonResourceBrowse(QWidget* parent = nullptr);
50  virtual ~ButtonResourceBrowse();
51 
52  virtual QSize sizeHint() const override;
53 
58  bool wasEdited(bool reset = true);
59 
63  void setResourceType(Core::ResourceType type);
64 
68  std::string const& getSelectedResource() const;
69 
70  protected:
71 
72  private slots:
73 
74  void onButtonClick();
75 
76  private:
77 
78  bool m_WasEdited;
79 
80  Core::ResourceType m_Type;
81  std::string m_SelectedResource;
82  };
83  }
87 }
92 //------------------------------------------------------------------------------------------
93 
94 #endif
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
Definition: ButtonResourceBrowse.hpp:43
bool wasEdited(bool reset=true)
Definition: ButtonResourceBrowse.cpp:56