BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
celldecoratorinterface.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/interfaces/celldecoratorinterface.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_INTERFACES_CELLDECORATORINTERFACE_H
16 #define BORNAGAIN_MVVM_VIEWMODEL_MVVM_INTERFACES_CELLDECORATORINTERFACE_H
17 
18 #include "mvvm/viewmodel_export.h"
19 #include <string>
20 
21 class QModelIndex;
22 class QStyleOptionViewItem;
23 
24 namespace ModelView {
25 
26 //! Interface class to generate cell decorations (i.e. text) in Qt trees and tables.
27 
28 class MVVM_VIEWMODEL_EXPORT CellDecoratorInterface {
29 public:
30  virtual ~CellDecoratorInterface() = default;
31 
32  virtual bool hasCustomDecoration(const QModelIndex& index) const = 0;
33  virtual void initStyleOption(QStyleOptionViewItem* option, const QModelIndex& index) = 0;
34 };
35 
36 } // namespace ModelView
37 
38 #endif // BORNAGAIN_MVVM_VIEWMODEL_MVVM_INTERFACES_CELLDECORATORINTERFACE_H
Interface class to generate cell decorations (i.e. text) in Qt trees and tables.
virtual ~CellDecoratorInterface()=default
virtual void initStyleOption(QStyleOptionViewItem *option, const QModelIndex &index)=0
virtual bool hasCustomDecoration(const QModelIndex &index) const =0
materialitems.h Collection of materials to populate MaterialModel.