BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
datarole.cpp
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/model/datarole.cpp
6 //! @brief Implements 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 #include "mvvm/model/datarole.h"
17 
18 using namespace ModelView;
19 
20 DataRole::DataRole(Variant data, int role) : m_data(std::move(data)), m_role(role) {}
21 
22 bool DataRole::operator==(const DataRole& other) const
23 {
24  return m_role == other.m_role && Utils::IsTheSame(m_data, other.m_data);
25 }
Represents pair of data,role for SessionItemData.
Definition: datarole.h:25
bool operator==(const DataRole &other) const
Definition: datarole.cpp:22
DataRole(Variant data=Variant(), int role=-1)
Definition: datarole.cpp:20
Defines class CLASS?
Defines class CLASS?
MVVM_MODEL_EXPORT bool IsTheSame(const Variant &var1, const Variant &var2)
Returns true if given variants have same type and value.
materialitems.h Collection of materials to populate MaterialModel.
Definition: filesystem.h:81
QVariant Variant
Definition: variant.h:23