BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
defaultcelldecorator.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/defaultcelldecorator.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_DEFAULTCELLDECORATOR_H
16 #define BORNAGAIN_MVVM_VIEWMODEL_MVVM_VIEWMODEL_DEFAULTCELLDECORATOR_H
17 
19 #include <optional>
20 
21 namespace ModelView {
22 
23 //! Generates default cell decorations for Qt trees and tables.
24 
25 class MVVM_VIEWMODEL_EXPORT DefaultCellDecorator : public CellDecoratorInterface {
26 public:
27  bool hasCustomDecoration(const QModelIndex& index) const override;
28  void initStyleOption(QStyleOptionViewItem* option, const QModelIndex& index) override;
29 
30 protected:
31  virtual std::optional<std::string> cellText(const QModelIndex& index) const;
32 };
33 
34 } // namespace ModelView
35 
36 #endif // BORNAGAIN_MVVM_VIEWMODEL_MVVM_VIEWMODEL_DEFAULTCELLDECORATOR_H
Defines class CLASS?
Interface class to generate cell decorations (i.e. text) in Qt trees and tables.
Generates default cell decorations for Qt trees and tables.
materialitems.h Collection of materials to populate MaterialModel.