BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
jsontaginfoconverter.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/model/mvvm/serialization/jsontaginfoconverter.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_MODEL_MVVM_SERIALIZATION_JSONTAGINFOCONVERTER_H
16 #define BORNAGAIN_MVVM_MODEL_MVVM_SERIALIZATION_JSONTAGINFOCONVERTER_H
17 
19 #include <QString>
20 
21 namespace ModelView {
22 
23 //! Default converter between TagInfo and json object.
24 
25 class MVVM_MODEL_EXPORT JsonTagInfoConverter : public JsonTagInfoConverterInterface {
26 public:
27  static inline const QString nameKey = "name";
28  static inline const QString minKey = "min";
29  static inline const QString maxKey = "max";
30  static inline const QString modelsKey = "models";
31 
32  QJsonObject to_json(const TagInfo& tag) override;
33 
34  TagInfo from_json(const QJsonObject& object) override;
35 
36  bool isTagInfo(const QJsonObject& object);
37 };
38 
39 } // namespace ModelView
40 
41 #endif // BORNAGAIN_MVVM_MODEL_MVVM_SERIALIZATION_JSONTAGINFOCONVERTER_H
Base class for all converters of TagInfo to/from json object.
Default converter between TagInfo and json object.
Holds info about single tag for SessionItem.
Definition: taginfo.h:28
materialitems.h Collection of materials to populate MaterialModel.