BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
InfoPanel.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/coregui/Views/CommonWidgets/InfoPanel.h
6 //! @brief Defines class InfoPanel
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_GUI_COREGUI_VIEWS_COMMONWIDGETS_INFOPANEL_H
16 #define BORNAGAIN_GUI_COREGUI_VIEWS_COMMONWIDGETS_INFOPANEL_H
17 
18 #include <QFrame>
19 
20 class QStackedWidget;
21 class InfoPanelToolBar;
22 class QResizeEvent;
23 
24 //! Frame for widgets with tool bar on top and collapse/expand button functionality.
25 //! Intended for QDockWindow, to be able to quickly minimize/maximize its appearance.
26 
27 //! Used in JobMessagePanel.
28 
29 class InfoPanel : public QFrame {
30  Q_OBJECT
31 public:
32  explicit InfoPanel(QWidget* parent);
33 
34  QSize sizeHint() const;
35  QSize minimumSizeHint() const;
36 
37 signals:
39 
40 protected slots:
41  void onExpandButtonClicked();
42  void setContentVisible(bool editor_status, bool dock_notify = false);
43 
44 protected:
45  bool isContentVisible();
46  void resizeEvent(QResizeEvent* event);
47 
49  QStackedWidget* m_stackedWidget;
51 };
52 
53 #endif // BORNAGAIN_GUI_COREGUI_VIEWS_COMMONWIDGETS_INFOPANEL_H
Toolbar for InfoPanel with collapse/expand buttons.
Frame for widgets with tool bar on top and collapse/expand button functionality.
Definition: InfoPanel.h:29
bool isContentVisible()
Definition: InfoPanel.cpp:92
QStackedWidget * m_stackedWidget
Definition: InfoPanel.h:49
void setContentVisible(bool editor_status, bool dock_notify=false)
Definition: InfoPanel.cpp:71
InfoPanel(QWidget *parent)
Definition: InfoPanel.cpp:27
void widgetHeightRequest(int)
QSize minimumSizeHint() const
Definition: InfoPanel.cpp:61
void onExpandButtonClicked()
Definition: InfoPanel.cpp:66
InfoPanelToolBar * m_toolBar
Definition: InfoPanel.h:48
int m_cached_height
Definition: InfoPanel.h:50
QSize sizeHint() const
Definition: InfoPanel.cpp:47
void resizeEvent(QResizeEvent *event)
Definition: InfoPanel.cpp:100