15 #ifndef BORNAGAIN_MVVM_VIEW_MVVM_WIDGETS_ITEMSTREEVIEW_H
16 #define BORNAGAIN_MVVM_VIEW_MVVM_WIDGETS_ITEMSTREEVIEW_H
18 #include "mvvm/view_export.h"
24 class QItemSelectionModel;
30 class ViewModelDelegate;
42 QTreeView* treeView();
44 void setViewModel(std::unique_ptr<ViewModel> viewModel);
46 void setViewModelDelegate(std::unique_ptr<ViewModelDelegate> delegate);
58 void onSelectionChanged(
const QItemSelection&,
const QItemSelection&);
61 QItemSelectionModel* selectionModel();
63 void set_connected(
bool flag);
65 QTreeView* m_treeView{
nullptr};
Tree view to show items of SessionModel via ViewModel mechanism.
std::unique_ptr< ViewModelDelegate > m_delegate
std::unique_ptr< ViewModel > m_viewModel
void itemSelected(ModelView::SessionItem *)
~ItemsTreeView() override
The main object representing an editable/displayable/serializable entity.
Main class to represent content of SessionModel in Qt's trees and tables.
materialitems.h Collection of materials to populate MaterialModel.