BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Provides logic for manipulating items belonging to GroupItem parent. More...
Public Member Functions | |
GroupItemController (SessionItem *groupItem, GroupInfo groupInfo) | |
QVariant | createCombo () const |
int | currentIndex () const |
SessionItem * | currentItem () |
QString | currentType () const |
SessionItem * | getItemOfType (const QString &type) |
Returns item of give type. More... | |
void | setCurrentIndex (int index) |
void | setCurrentType (const QString &type) |
Private Member Functions | |
SessionItem * | addItem (const QString &item_type) |
SessionItem * | createCorrespondingItem () |
QStringList | itemLabels () const |
QStringList | itemTypes () const |
int | toIndex (const QString &type) const |
QString | toString (int currentIndex) const |
Private Attributes | |
QString | m_current_type |
GroupInfo | m_groupInfo |
SessionItem * | m_groupItem |
Provides logic for manipulating items belonging to GroupItem parent.
Definition at line 26 of file GroupItemController.h.
GroupItemController::GroupItemController | ( | SessionItem * | groupItem, |
GroupInfo | groupInfo | ||
) |
Definition at line 20 of file GroupItemController.cpp.
References createCorrespondingItem(), GroupInfo::defaultType(), SessionItem::insertItem(), m_current_type, m_groupInfo, and m_groupItem.
|
private |
Definition at line 108 of file GroupItemController.cpp.
References ItemFactory::CreateItem().
Referenced by createCorrespondingItem(), and getItemOfType().
QVariant GroupItemController::createCombo | ( | ) | const |
Definition at line 90 of file GroupItemController.cpp.
References currentIndex(), itemLabels(), ComboProperty::setCurrentIndex(), ComboProperty::setValues(), and ComboProperty::variant().
|
private |
Definition at line 113 of file GroupItemController.cpp.
References addItem(), and currentType().
Referenced by GroupItemController(), and setCurrentType().
int GroupItemController::currentIndex | ( | ) | const |
Definition at line 80 of file GroupItemController.cpp.
References m_current_type, and toIndex().
Referenced by createCombo().
SessionItem * GroupItemController::currentItem | ( | ) |
Definition at line 27 of file GroupItemController.cpp.
References currentType(), SessionItem::getChildOfType(), and m_groupItem.
Referenced by setCurrentType().
QString GroupItemController::currentType | ( | ) | const |
Definition at line 32 of file GroupItemController.cpp.
References m_current_type.
Referenced by createCorrespondingItem(), currentItem(), getItemOfType(), and setCurrentType().
SessionItem * GroupItemController::getItemOfType | ( | const QString & | type | ) |
Returns item of give type.
If it doesn't exist, it will be created. Method do not change current item.
Definition at line 62 of file GroupItemController.cpp.
References addItem(), currentType(), SessionItem::getChildOfType(), SessionItem::insertItem(), m_groupItem, SessionItem::setEnabled(), and SessionItem::setVisible().
|
private |
Definition at line 103 of file GroupItemController.cpp.
References GroupInfo::itemLabels(), and m_groupInfo.
Referenced by createCombo().
|
private |
Definition at line 98 of file GroupItemController.cpp.
References GroupInfo::itemTypes(), and m_groupInfo.
Referenced by toIndex(), and toString().
void GroupItemController::setCurrentIndex | ( | int | index | ) |
Definition at line 85 of file GroupItemController.cpp.
References setCurrentType(), and toString().
void GroupItemController::setCurrentType | ( | const QString & | type | ) |
Definition at line 37 of file GroupItemController.cpp.
References createCorrespondingItem(), currentItem(), currentType(), SessionItem::getChildOfType(), SessionItem::insertItem(), m_current_type, and m_groupItem.
Referenced by setCurrentIndex().
|
private |
Definition at line 118 of file GroupItemController.cpp.
References itemTypes().
Referenced by currentIndex().
|
private |
Definition at line 123 of file GroupItemController.cpp.
References itemTypes().
Referenced by setCurrentIndex().
|
private |
Definition at line 51 of file GroupItemController.h.
Referenced by GroupItemController(), currentIndex(), currentType(), and setCurrentType().
|
private |
Definition at line 52 of file GroupItemController.h.
Referenced by GroupItemController(), itemLabels(), and itemTypes().
|
private |
Definition at line 50 of file GroupItemController.h.
Referenced by GroupItemController(), currentItem(), getItemOfType(), and setCurrentType().