BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Provides logic for manipulating items belonging to GroupItem parent.
Definition at line 26 of file GroupItemController.h.
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. If it doesn't exist, it will be created. Method do not change current item. 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 |
GroupItemController::GroupItemController | ( | SessionItem * | groupItem, |
GroupInfo | groupInfo | ||
) |
Definition at line 22 of file GroupItemController.cpp.
References createCorrespondingItem(), GroupInfo::defaultType(), SessionItem::insertChild(), m_current_type, m_groupInfo, and m_groupItem.
|
private |
Definition at line 104 of file GroupItemController.cpp.
References GUI::Model::ItemFactory::CreateItem().
Referenced by createCorrespondingItem(), and getItemOfType().
QVariant GroupItemController::createCombo | ( | ) | const |
Definition at line 86 of file GroupItemController.cpp.
References currentIndex(), itemLabels(), ComboProperty::setCurrentIndex(), ComboProperty::setValues(), and ComboProperty::variant().
|
private |
Definition at line 109 of file GroupItemController.cpp.
References addItem(), and currentType().
Referenced by GroupItemController(), and setCurrentType().
int GroupItemController::currentIndex | ( | ) | const |
Definition at line 76 of file GroupItemController.cpp.
References m_current_type, and toIndex().
Referenced by createCombo().
SessionItem * GroupItemController::currentItem | ( | ) |
Definition at line 30 of file GroupItemController.cpp.
References currentType(), SessionItem::getChildOfType(), and m_groupItem.
Referenced by setCurrentType().
QString GroupItemController::currentType | ( | ) | const |
Definition at line 35 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::insertChild(), m_groupItem, and SessionItem::setEnabled().
|
private |
Definition at line 99 of file GroupItemController.cpp.
References GroupInfo::itemLabels(), and m_groupInfo.
Referenced by createCombo().
|
private |
Definition at line 94 of file GroupItemController.cpp.
References GroupInfo::itemTypes(), and m_groupInfo.
Referenced by toIndex(), and toString().
void GroupItemController::setCurrentIndex | ( | int | index | ) |
Definition at line 81 of file GroupItemController.cpp.
References setCurrentType(), and toString().
void GroupItemController::setCurrentType | ( | const QString & | type | ) |
Definition at line 40 of file GroupItemController.cpp.
References createCorrespondingItem(), currentItem(), currentType(), SessionItem::getChildOfType(), SessionItem::insertChild(), m_current_type, and m_groupItem.
Referenced by setCurrentIndex().
|
private |
Definition at line 114 of file GroupItemController.cpp.
References itemTypes().
Referenced by currentIndex().
|
private |
Definition at line 119 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().