28 ViewModelControllerBuilder::operator std::unique_ptr<ViewModelController>()
31 throw std::runtime_error(
"Error in ViewModelController: undefined model");
33 if (!context.children_strategy)
34 throw std::runtime_error(
"Error in ViewModelController: no children strategy defined.");
36 if (!context.row_strategy)
37 throw std::runtime_error(
"Error in ViewModelController: no row strategy defined.");
39 auto result = std::make_unique<ViewModelController>(context.model, context.view_model);
40 result->setChildrenStrategy(std::move(context.children_strategy));
41 result->setRowStrategy(std::move(context.row_strategy));
59 std::unique_ptr<ChildrenStrategyInterface> children_strategy)
Main class to hold hierarchy of SessionItem objects.
Base class for all view models to show content of SessionModel in Qt views.
Builder class for ViewModelController.
self & childrenStrategy(std::unique_ptr< ChildrenStrategyInterface > children_strategy)
~ViewModelControllerBuilder()
self & viewModel(ViewModelBase *view_model)
self & rowStrategy(std::unique_ptr< RowStrategyInterface > row_strategy)
self & model(SessionModel *model)
ViewModelControllerBuilder()
materialitems.h Collection of materials to populate MaterialModel.
ViewModelBase * view_model
std::unique_ptr< ChildrenStrategyInterface > children_strategy
std::unique_ptr< RowStrategyInterface > row_strategy