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

Defines class CLASS? More...

Include dependency graph for modelutils.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

MVVM_MODEL_EXPORT void ModelView::Utils::BeginMacros (const SessionItem *item, const std::string &macro_name)
 Begin undo/redo macros with given name. More...
 
template<typename T = SessionModel>
std::unique_ptr< T > ModelView::Utils::CreateClone (const T &model)
 Creates exact clone of given model. All item's ID will be preserved. More...
 
template<typename T = SessionModel>
std::unique_ptr< T > ModelView::Utils::CreateCopy (const T &model)
 Creates full deep copy of given model. All item's ID will be generated. More...
 
MVVM_MODEL_EXPORT void ModelView::Utils::DeleteItemFromModel (SessionItem *item)
 Removes and deletes item from its model. More...
 
MVVM_MODEL_EXPORT void ModelView::Utils::EndMacros (const SessionItem *item)
 Finishes undo/redo macros. More...
 
template<typename T = SessionItem>
std::vector< T * > ModelView::Utils::FindItems (const SessionModel *model)
 Returns all items in a tree of given type. More...
 
MVVM_MODEL_EXPORT SessionItemModelView::Utils::ItemFromPath (const SessionModel &moodel, const Path &path)
 Returns item found in the model following given Path. More...
 
MVVM_MODEL_EXPORT void ModelView::Utils::MoveDown (SessionItem *item)
 Moves item down (increments row of the item). Works on children belonging to single tag. More...
 
MVVM_MODEL_EXPORT void ModelView::Utils::MoveUp (SessionItem *item)
 Moves item up (decrements row of the item). Works on children belonging to single tag. More...
 
MVVM_MODEL_EXPORT Path ModelView::Utils::PathFromItem (const SessionItem *item)
 Constructs path to find given item. Item must belong to a model. More...
 
MVVM_MODEL_EXPORT void ModelView::Utils::PopulateEmptyModel (const JsonModelConverterInterface *converter, const SessionModel &source, SessionModel &target)
 Populate empty model with content of target model using provided converter. More...
 
MVVM_MODEL_EXPORT void ModelView::Utils::Redo (SessionModel &model)
 Redo model operation which was undone just before. If not undo/redo enabled, will do nothing. More...
 
template<typename T = SessionItem>
T * ModelView::Utils::TopItem (const SessionModel *model)
 Returns top level item of given type. More...
 
template<typename T = SessionItem>
std::vector< T * > ModelView::Utils::TopItems (const SessionModel *model)
 Returns all top level items of given type. More...
 
MVVM_MODEL_EXPORT void ModelView::Utils::Undo (SessionModel &model)
 Undo last model operation. If not undo/redo enabled, will do nothing. 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 modelutils.h.