BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
propertiesrowstrategy.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/viewmodel/mvvm/viewmodel/propertiesrowstrategy.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_VIEWMODEL_MVVM_VIEWMODEL_PROPERTIESROWSTRATEGY_H
16 #define BORNAGAIN_MVVM_VIEWMODEL_MVVM_VIEWMODEL_PROPERTIESROWSTRATEGY_H
17 
19 
20 class QStandardItem;
21 
22 namespace ModelView {
23 
24 class SessionItem;
25 
26 //! Constructs row of QStandardItem's for given SessionItem.
27 //! Row consists of columns with all PropertyItem's of given SessionItem.
28 
29 class MVVM_VIEWMODEL_EXPORT PropertiesRowStrategy : public RowStrategyInterface {
30 public:
31  PropertiesRowStrategy(std::vector<std::string> labels = {});
32 
33  QStringList horizontalHeaderLabels() const override;
34 
35  std::vector<std::unique_ptr<ViewItem>> constructRow(SessionItem* item) override;
36 
37 private:
38  void update_column_labels(std::vector<ModelView::SessionItem*> items);
39  std::vector<std::string> current_column_labels;
40  std::vector<std::string> user_defined_column_labels;
41 };
42 
43 } // namespace ModelView
44 
45 #endif // BORNAGAIN_MVVM_VIEWMODEL_MVVM_VIEWMODEL_PROPERTIESROWSTRATEGY_H
Constructs row of QStandardItem's for given SessionItem.
std::vector< std::string > user_defined_column_labels
std::vector< std::string > current_column_labels
Base class to construct row of ViewItem's from given SessionItem.
The main object representing an editable/displayable/serializable entity.
Definition: sessionitem.h:38
materialitems.h Collection of materials to populate MaterialModel.
Defines class CLASS?