BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
collapsiblelistwidget.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // qt-mvvm: Model-view-view-model framework for large GUI applications
4 //
5 //! @file mvvm/view/mvvm/widgets/collapsiblelistwidget.h
6 //! @brief Defines class CLASS?
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2020
11 //! @authors Gennady Pospelov et al, Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_MVVM_VIEW_MVVM_WIDGETS_COLLAPSIBLELISTWIDGET_H
16 #define BORNAGAIN_MVVM_VIEW_MVVM_WIDGETS_COLLAPSIBLELISTWIDGET_H
17 
18 #include "mvvm/view_export.h"
19 #include <QWidget>
20 
21 class QSplitter;
22 class QString;
23 
24 namespace ModelView {
25 
26 //! Vertical widget with column of panels displayed one under another.
27 //! Each panel contains user widget and can be collapsed/expanded. When expanded,
28 //! the place occupied by the panel can be changed by draging a splitter.
29 
30 class MVVM_VIEW_EXPORT CollapsibleListWidget : public QWidget {
31  Q_OBJECT
32 
33 public:
34  CollapsibleListWidget(QWidget* parent = nullptr);
35 
36  void addWidget(QWidget* widget, const QString& title, bool collapsed = false);
37 
38 private:
39  QSplitter* m_splitter{nullptr};
40 };
41 
42 } // namespace ModelView
43 
44 #endif // BORNAGAIN_MVVM_VIEW_MVVM_WIDGETS_COLLAPSIBLELISTWIDGET_H
Vertical widget with column of panels displayed one under another.
materialitems.h Collection of materials to populate MaterialModel.