BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
itemutils.h File Reference

Defines class CLASS? More...

Include dependency graph for itemutils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 ModelView
 materialitems.h Collection of materials to populate MaterialModel.
 
 ModelView::Utils
 Collection of various widget-related utils.
 

Functions

template<typename T >
std::vector< T * > ModelView::Utils::CastedItems (const std::vector< SessionItem * > &items)
 Returns vector of items casted to given type. More...
 
MVVM_MODEL_EXPORT SessionItemModelView::Utils::ChildAt (const SessionItem *parent, int index)
 Returns child at given index of parent. More...
 
MVVM_MODEL_EXPORT int ModelView::Utils::CopyNumber (const SessionItem *item)
 Returns copy number of given item in it's parent hierarchy. More...
 
MVVM_MODEL_EXPORT SessionItemModelView::Utils::FindNextItemToSelect (SessionItem *item)
 Finds next item to select Method is used in the context of next item selection after given item was deleted. More...
 
MVVM_MODEL_EXPORT SessionItemModelView::Utils::FindNextSibling (SessionItem *item)
 Returns next sibling with same tag. More...
 
MVVM_MODEL_EXPORT SessionItemModelView::Utils::FindPreviousSibling (SessionItem *item)
 Returns previous sibling with same tag. More...
 
MVVM_MODEL_EXPORT bool ModelView::Utils::HasTag (const SessionItem &item, const std::string &tag)
 Returns true if given item has registered tag. More...
 
MVVM_MODEL_EXPORT int ModelView::Utils::IndexOfChild (const SessionItem *parent, const SessionItem *child)
 Returns index in children array corresponding to given child. More...
 
MVVM_MODEL_EXPORT bool ModelView::Utils::IsItemAncestor (const SessionItem *item, const SessionItem *candidate)
 Returns true if 'candidate' is one of ancestor of given item. More...
 
MVVM_MODEL_EXPORT bool ModelView::Utils::IsSinglePropertyTag (const SessionItem &item, const std::string &tag)
 Returns true if given item has registered tag, and it belongs to single property. More...
 
MVVM_MODEL_EXPORT void ModelView::Utils::iterate (SessionItem *item, const std::function< void(SessionItem *)> &fun)
 Iterates through item and all its children. More...
 
MVVM_MODEL_EXPORT void ModelView::Utils::iterate_if (const SessionItem *item, const std::function< bool(const SessionItem *)> &fun)
 Iterates through all model indices and calls user function. More...
 
MVVM_MODEL_EXPORT std::vector< std::string > ModelView::Utils::RegisteredTags (const SessionItem &item)
 Returns vector of strings containing all registered tags of the given item. More...
 
MVVM_MODEL_EXPORT std::vector< std::string > ModelView::Utils::RegisteredUniversalTags (const SessionItem &item)
 Returns vector of strings containing all registered universal tags of the given item. More...
 
MVVM_MODEL_EXPORT std::vector< SessionItem * > ModelView::Utils::SinglePropertyItems (const SessionItem &item)
 Returns vector of children representing property items. More...
 
MVVM_MODEL_EXPORT std::vector< SessionItem * > ModelView::Utils::TopLevelItems (const SessionItem &item)
 Returns vector of children representing top level items. More...
 
MVVM_MODEL_EXPORT std::vector< SessionItem * > ModelView::Utils::UniqueItems (const std::vector< SessionItem * > &items)
 Returns vector with duplicates and 'nullptr' filtered out. More...
 

Detailed Description

Defines class CLASS?

Homepage:\n http://www.bornagainproject.org
License:\n GNU General Public License v3 or higher (see COPYING)
Authors
Gennady Pospelov et al, Scientific Computing Group at MLZ (see CITATION, AUTHORS)

Definition in file itemutils.h.