Ocular Engine
ButtonFileBrowse.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_BUTTON_FILE_BROWSE__H__
19 #define __H__OCULAR_BUTTON_FILE_BROWSE__H__
20 
21 #include <QtWidgets/qpushbutton.h>
22 
23 //------------------------------------------------------------------------------------------
24 
29 namespace Ocular
30 {
35  namespace Editor
36  {
42  class ButtonFileBrowse : public QPushButton
43  {
44  Q_OBJECT
45 
46  public:
47 
48  ButtonFileBrowse(QWidget* parent = nullptr);
49  virtual ~ButtonFileBrowse();
50 
51  virtual QSize sizeHint() const override;
52 
57  bool wasEdited(bool reset = true);
58 
62  void setNameFilter(std::string const& filter);
63 
67  std::string const& getSelectedFile() const;
68 
69  protected:
70 
71  private slots :
72 
73  void onButtonClick();
74 
75  private:
76 
77  bool m_WasEdited;
78 
79  std::string m_FilterString;
80  std::string m_SelectedFile;
81  };
82  }
86 }
91 //------------------------------------------------------------------------------------------
92 
93 #endif
bool wasEdited(bool reset=true)
Definition: ButtonFileBrowse.cpp:55
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
Definition: ButtonFileBrowse.hpp:42
void setNameFilter(std::string const &filter)
Definition: ButtonFileBrowse.cpp:67