Ocular Engine
PropertiesDisplayTitleBar.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_EDITOR_PROPERTIES_DISPLAY_TITLE_BAR__H__
19 #define __H__OCULAR_EDITOR_PROPERTIES_DISPLAY_TITLE_BAR__H__
20 
21 
22 #include <QtWidgets/qframe.h>
23 #include <QtWidgets/qboxlayout.h>
24 #include <QtWidgets/qpushbutton.h>
25 #include <QtWidgets/qlabel.h>
26 
27 //------------------------------------------------------------------------------------------
28 
33 namespace Ocular
34 {
39  namespace Editor
40  {
44  class PropertiesDisplayTitleBar : public QFrame
45  {
46  public:
47 
48  PropertiesDisplayTitleBar(std::string const& displayName, bool canMinimize = true, bool canClose = false, QWidget* parent = nullptr);
50 
51  virtual QSize sizeHint() const override;
52 
53  //------------------------------------------------------------
54 
55  void setTitle(std::string const& title);
56  void setCanMinimize(bool canMinimize);
57  void setCanClose(bool canClose);
58 
59  protected:
60 
61  void buildLayout();
62  void buildTitleBar();
63 
64  //------------------------------------------------------------
65 
66  QHBoxLayout* m_Layout;
67 
68  QLabel* m_LabelTitle;
69 
70  QPushButton* m_ButtonMinimize;
71  QPushButton* m_ButtonClose;
72 
73  bool m_CanMinimize;
74  bool m_CanClose;
75 
76  private:
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: PropertiesDisplayTitleBar.hpp:44