BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Defines info for GroupProperty, i.e. collection of model types, their labels and the name of default item's modelType.
Definition at line 25 of file GroupInfo.h.
Classes | |
struct | TypeAndLabel |
Public Member Functions | |
GroupInfo (bool is_sorted=true) | |
void | add (const QString &itemType, const QString &itemLabel) |
QString | defaultType () const |
QStringList | itemLabels () const |
QStringList | itemTypes () const |
template<typename T > | |
void | setDefaultType () |
void | setDefaultType (const QString &modelType) |
Private Member Functions | |
bool | containsType (const QString &itemType) const |
Default model type for given group (i.e. FFCylinder for formfactor group) More... | |
Private Attributes | |
bool | is_sorted |
QString | m_defaultItemType |
Info will be sorted if true, otherwise order of insertion will be preserved. More... | |
QVector< TypeAndLabel > | m_info |
|
explicit |
Definition at line 18 of file GroupInfo.cpp.
void GroupInfo::add | ( | const QString & | itemType, |
const QString & | itemLabel | ||
) |
Definition at line 23 of file GroupInfo.cpp.
References containsType(), is_sorted, and m_info.
|
private |
Default model type for given group (i.e. FFCylinder for formfactor group)
Definition at line 62 of file GroupInfo.cpp.
References m_info.
Referenced by add(), and setDefaultType().
QString GroupInfo::defaultType | ( | ) | const |
Definition at line 33 of file GroupInfo.cpp.
References m_defaultItemType, and m_info.
Referenced by GroupItemController::GroupItemController().
QStringList GroupInfo::itemLabels | ( | ) | const |
Definition at line 54 of file GroupInfo.cpp.
References m_info.
Referenced by GroupItemController::itemLabels().
QStringList GroupInfo::itemTypes | ( | ) | const |
Definition at line 46 of file GroupInfo.cpp.
References m_info.
Referenced by GroupItemController::itemTypes().
|
inline |
Definition at line 35 of file GroupInfo.h.
void GroupInfo::setDefaultType | ( | const QString & | modelType | ) |
Definition at line 40 of file GroupInfo.cpp.
References containsType(), and m_defaultItemType.
|
private |
Definition at line 55 of file GroupInfo.h.
Referenced by add().
|
private |
Info will be sorted if true, otherwise order of insertion will be preserved.
Definition at line 53 of file GroupInfo.h.
Referenced by defaultType(), and setDefaultType().
|
private |
Definition at line 56 of file GroupInfo.h.
Referenced by add(), containsType(), defaultType(), itemLabels(), and itemTypes().