BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
SessionItemData::ItemData Class Reference

Description

Definition at line 32 of file SessionItemData.h.

Public Member Functions

 ItemData (int r=-1, QVariant v={})
 
bool operator== (const ItemData &other) const
 

Public Attributes

QVariant data
 
int role
 

Constructor & Destructor Documentation

◆ ItemData()

SessionItemData::ItemData::ItemData ( int  r = -1,
QVariant  v = {} 
)

Definition at line 20 of file SessionItemData.cpp.

21  : role(r)
22  , data(std::move(v))
23 {
24 }

Member Function Documentation

◆ operator==()

bool SessionItemData::ItemData::operator== ( const ItemData other) const

Definition at line 26 of file SessionItemData.cpp.

27 {
28  return role == other.role && GUI::Util::Variant::IsTheSame(data, other.data);
29 }
@ other
The unit has no enum value defined in here (e.g. when defined as an explicit string)
bool IsTheSame(const QVariant &var1, const QVariant &var2)
Returns true if given variants have same type and value. For custom variants (e.g....
Definition: VariantUtil.cpp:39

References SessionItemData::data(), GUI::Util::Variant::IsTheSame(), and other.

Here is the call graph for this function:

Member Data Documentation

◆ data

QVariant SessionItemData::ItemData::data

Definition at line 36 of file SessionItemData.h.

◆ role

int SessionItemData::ItemData::role

Definition at line 35 of file SessionItemData.h.


The documentation for this class was generated from the following files: